scrapingbench

How to benchmark web scraping APIs for your AI agent

By Leo · Published · Benchmark run wb-v2, published October 26, 2026

Run every API on the same tasks from the sites your agent visits, with the same model and limits, and grade the agent's final answer by script. Then compare cost per finished task and a paired interval before you say one API is better.

Below are the seven steps, a worksheet for writing one task, and what each step looked like in scrapingbench v2.

Paragraphs below are marked by where their facts come from:

  • Measuredfrom the benchmark's results.json, built into the page
  • Our callour judgment, not a measurement

The seven steps

Scroll the table sideways to see every column.

Seven steps for benchmarking a web scraping API, and what scrapingbench v2 did for each
StepWhat to doWhat scrapingbench v2 did
1. Grade the finished taskA script checks the agent's final answer against a key from an official sourceClaude Haiku 5.5 using one provider's API at a time, pass or fail per task
2. Use many real sitesTasks from the sites your agent visits, spread over many of themCore sets of 40 scrape tasks from 37 sites, 30 search tasks from 18 sites, 15 map tasks from 15 sites and 12 crawl tasks from 12 sites
3. Run controlsThe model with no tool, and the model with the right page handed to itNo-tool baseline on every track; correct page given on scrape only
4. Hold everything else fixedSame model, prompt, tool-call budget, time and spend caps for every APIOne cap set per track when the provider calls were collected (table below)
5. Count what failures costAll spend, failed tasks included, divided by tasks finishedCost per finished task: provider charges for the calls used plus model tokens at list price
6. Compare with an intervalPaired comparison on the same tasks, resampling whole sitesA 95% interval for every gap to a track's leader
7. Publish itTasks, grader, rows and the limitsTasks, grader and graded provider-task rows are public; stored responses stay private

Worksheet: write down one task an example, not a scrapingbench task

Before you run anything, write each task down so a script can grade it.

The fields to write down for one benchmark task, with an example scrape task
FieldExample for a scrape task
InputA documentation page URL your agent will really fetch
AskReturn the page's first heading, exactly as written
Answer keyThe heading read from the page's own HTML, saved once and frozen
GraderNormalize both strings the same way (Unicode, whitespace, Markdown syntax), then require an exact match
SiteRecord it, so tasks from one site can be resampled together
BudgetTool calls, seconds and dollars allowed, the same for every API
ControlsThe model with no tool, and the model given the frozen page

Our callIf you can't write the answer key and the grader rule before the run, the task is too vague to score. Freeze the keys first, so no result can change what counts as right.

1. Grade the finished task, not the fetch

Grade whether the agent got the answer, not whether the API returned a page.

Our callAn HTTP 200 only says the API sent something back. The page can be a login wall, a cookie banner or a shell that needs JavaScript, and a metric that checks only HTTP status counts all of those as wins. What you need to know is whether your agent, using that API, finished the job.

MeasuredIn scrapingbench, Claude Haiku 5.5 works through one provider's API at a time and must return a specific fact. A script compares the answer with a key from an official source and marks the task pass or fail. No model grades anything.

2. Take tasks from many of your own sites

Use the pages your agent will really visit, and spread the tasks over as many sites as you can.

Our callTasks from one site tend to pass or fail together. A site that blocks one request usually blocks the next, so ten tasks from one site tell you less than ten tasks from ten sites.

MeasuredThe v2 core sets, which every provider on a track ran:

  • Scrape: 40 tasks from 37 sites, so one task is 2.5 points.
  • Search: 30 tasks from 18 sites, so one task is 3.3 points.
  • Map: 15 tasks from 15 sites, so one task is 6.7 points.
  • Crawl: 12 tasks from 12 sites, so one task is 8.3 points.

3. Run two controls before you score any API

Run the model with no tool, and the model with the right page handed to it.

Our callThe no-tool run is a baseline: it shows how many tasks the model gets right with no retrieval at all, so you can read each API's score against it. The correct-page run shows how close to perfect the model gets when retrieval isn't the problem. When it fails there, check the model's reading, the evidence and the grading before you blame retrieval.

MeasuredWith no tool, Claude Haiku 5.5 finished 0 of 40 scrape tasks (0%), 5 of 30 search tasks (17%), 0 of 15 map tasks (0%) and 0 of 12 crawl tasks (0%). In v2 the correct-page control ran on scrape only. Both are described on the methodology page.

4. Give every API the same model, limits and settings

Change one thing at a time: the API.

Our callKeep the model, the prompt, the number of tool calls, and the time and spend caps the same for every provider. If you tune one provider's settings, tune all of them, or run them all on defaults.

MeasuredThe caps per task when the v2 provider calls were collected:

Time, spend and tool-call caps per task on each scrapingbench v2 track, as collected
TrackTimeSpendTool calls
Scrape60 s$0.102
Search60 s$0.103
Map120 s$0.252
Crawl600 s$2.001

MeasuredThe published v2 scores weren't a second live run. Every provider response was stored once, and the scores re-run the agent on those stored responses, served one provider at a time and read page by page within a reading budget per task. No provider was called again. MEASURE-v2.md has the rules. If you can, store your raw responses too: then a grading fix doesn't mean paying for every call again.

5. Count what failures cost

Divide everything you spent, failed tasks included, by the tasks that finished.

Our callA low price per request flatters an API that fails often, because a failed task still costs the API calls it made and the model tokens it used. Cost per finished task puts a cheap API that fails and a pricier one that works on the same scale.

MeasuredIn v2, a task's cost is the provider charges for the calls used in the replay plus the replay's model tokens at list price, failed tasks included, and cost per finished task divides the total by tasks done. Time is likewise the provider time for those calls plus the replay's model time.

6. Compare providers on the same tasks, with an interval

Before you say one API is better, check how much the gap moves when you resample the sites you tested.

Our callCompare two providers on the same tasks. Resample the observed sites with replacement, whole sites rather than single tasks, and recompute the gap in percentage points each time. If the middle 95% of those gaps includes zero, the gap is too small to call. If it excludes zero, that is evidence about your tasks, not proof for every site. Screening many pairs without adjustment raises the chance that one clears by luck, so confirm a gap you care about on a separate run with new sites.

Measuredscrapingbench compares each provider with its track's leader by a bootstrap that redraws whole sites, and labels the comparisons exploratory and unadjusted. Every gap and its interval is on why most gaps are noise.

7. Publish the tasks, the grader and the limits

Publish enough that someone else can check your scores.

Our callShare the tasks, the grader and every graded row, and write down what limits the result: which model, which plans, where it ran, and which kinds of pages the tasks favor.

Measuredscrapingbench's tasks and grader are open source under the MIT license, and the graded v2 provider-task rows are in rows.jsonl. The stored provider responses hold full copies of third-party pages, so they stay private: you can audit the published scores, but not rerun the exact measurement. The v2 run used one model (Claude Haiku 5.5), free plans and one server, and most of its tasks come from documentation sites.

Questions

How many tasks do I need to benchmark a scraping API?

More than the score resolution suggests. One task's worth in points only sets the smallest step a score can move: in scrapingbench v2's core sets, scrape has 40 tasks from 37 sites, so one task is 2.5 points, search has 30 tasks from 18 sites, so one task is 3.3 points, map has 15 tasks from 15 sites, so one task is 6.7 points and crawl has 12 tasks from 12 sites, so one task is 8.3 points. How precise a comparison is depends on how many independent sites you have and on how often two providers disagree on the same tasks. Run a small paired pilot, look at how wide the interval is, and grow the set until it is narrow enough for the gap you care about.

Why most gaps are noise

Should a model grade the answers?

Use a script wherever the answer can be checked exactly, such as a heading, a version number or a list of URLs. A script gives the same answer the same grade every time. A model judge adds a second source of error to every score. scrapingbench grades every task by script.

How scrapingbench grades

What should a scraping API benchmark report besides the success rate?

Cost per finished task, time on tasks that passed, the controls, and a 95% interval for each score and for each gap between providers. Report each job (scrape, search, map, crawl) on its own rather than one overall ranking, and say how the numbers were produced.

Methodology

Sources

  1. How v2 is measured (MEASURE-v2.md) (github.com/opencoredev/scraping-bench/blob/main/docs/MEASURE-v2.md)
  2. scrapingbench methodology and v2 corrections (METHODOLOGY.md) (github.com/opencoredev/scraping-bench/blob/main/docs/METHODOLOGY.md)
  3. Graded v2 provider-task rows (rows.jsonl) (github.com/opencoredev/scraping-bench/blob/main/results/measure-v2-string/rows.jsonl)
  4. The site's results summary (results.json) (github.com/opencoredev/scraping-bench/blob/main/site/src/data/results.json)

More guides