What Is the Best LLM for Web Scraping?

The frontier can already do this. So we gave four models from the tier below it one job: build a production scraping workflow. Then we scored them on 36 pages they never saw.

By Parseium Team ·

The short answer

Skipping the frontier was deliberate. GPT-5.6 Sol, Fable 5, and Opus 5 can all build a working scraper, so paying for one is the easy answer. What we did not know is how far down the price curve that competence survives. So we took four models from the tier just below, gave each the same 1 KB prompt and one example URL, asked for a working two-stage scraping workflow, and scored the results against 36 held-out pages the models never saw. GPT-5.6 Luna and Grok 4.5 tied for the best extraction quality (99.14/100). On cost, they are not close: GPT-5.6 Luna is the Pareto-optimal model, hitting that same tied-best quality for $0.037 in API tokens, 7.5× cheaper than Grok 4.5. Grok 4.5 wins on speed (2m 44s to a shipped scraper), GPT-5.6 Terra wrote the most robust selectors, and Claude Sonnet 5 landed at 98.20. All four scored above 98, so treat the ordering as provisional. This is one run per model on one target site.

Quality vs. cost: the Pareto frontier

A model is Pareto-optimal when no other model beats it on one axis without losing on the other. Among the three models run on an identical harness, GPT-5.6 Luna dominates the frontier alone: Grok 4.5 matches its quality at 7.5× the token cost, and GPT-5.6 Terra costs 6.4× more while scoring 0.08 points lower.

Extraction quality vs. API cost per authoring runUp and to the left is better. API cost in USD, log scale.

* Claude Sonnet 5 ran under Claude Code rather than the Pi harness; its API cost is not comparable to the other three. Quality scores are comparable for all four models.

Full results

Quality = gate × (0.35·link F1 + 0.50·required fields + 0.15·bonus fields) × 100, scored only on held-out pages. Robustness Δ is the score on the 8 example pages the model could study minus the score on the 32 pages it could not. A positive delta means the model overfit to what it saw. Every model passed the workflow gate, extracted all 32 held-out product URLs with perfect precision and recall, and shipped at the cheapest execution tier.

ModelQuality (held-out)Robustness ΔAPI cost / runWall clockTool calls
GPT-5.6 LunaPareto-optimal99.14+0.031$0.0374m 29s39
Grok 4.599.14+0.031$0.2792m 44s27
GPT-5.6 Terra99.06+0.009$0.2372m 46s34
Claude Sonnet 598.20+0.040$2.457 *5m 15s *47

* Claude Sonnet 5 ran under Claude Code rather than the Pi harness; its API cost and wall clock are not comparable to the other three. Quality and platform credits are.

Where the models actually differed: two edge cases

Nine of eleven fields were extracted perfectly by every model. The entire quality spread comes from two classic scraping traps, both invisible on the example pages the models were allowed to study.

FieldEdge caseGPT-5.6 LunaGrok 4.5GPT-5.6 TerraClaude Sonnet 5
pricecomma thousands separator (£1,249.00)32/3232/3229/3229/32
releasedpositional <dd> selector breaks when spec rows are added21/3221/3232/3221/32
9 remaining fields (title, sku, brand, description, in_stock, stock_count, image_url, tags, gtin)32/32 for all four models

The thousands-separator trap

Every example-page price was under £1,000, so a price regex that ignores comma separators passes every test the model can run. Three held-out products cost more. On £1,249.00, GPT-5.6 Terra's regex ([0-9]+(?:[.,][0-9]{1,2})?) captured 124 and Claude Sonnet 5's ([0-9.]+) captured 1. Both returned well-typed floats that were silently wrong. Grok 4.5 and GPT-5.6 Luna captured the full number and stripped the comma.

The positional-selector trap

The release date lives in a spec list. On all 8 example pages it is the first <dd>, so Grok 4.5, GPT-5.6 Luna, and Claude Sonnet 5 all wrote the positional selector dl.spec dd. On 11 of the 32 held-out pages, extra spec rows push the date out of first position and the selector silently returns a material or capacity string instead. GPT-5.6 Terra was the only model to anchor on the label itself, using //dt[normalize-space()='Released']/following-sibling::dd[1], and it did so without ever seeing a page that required it. On this evidence, that is the single most valuable authoring decision in the benchmark, and it is why Terra posted the best robustness delta (+0.009).

Speed and platform spend

No model came close to the budget caps of 150 credits, 60 tool calls, or 15 minutes. Grok 4.5 was the most frugal: 4 platform credits and 27 tool calls, partly because it verified its workflow with a dry run and never executed it end-to-end.

Time to a shipped scraperWall clock, first to last agent event
Platform credits spent authoringParseium credits used while building and testing

How we tested

  • Model selection: four models from the tier below the current frontier. We left out GPT-5.6 Sol, Fable 5, and Opus 5 because a benchmark all of them pass tells you nothing about what to run in production.
  • Task: author a two-stage workflow on Parseium via MCP: crawl paginated listing pages of a server-rendered demo shop, follow to product detail pages, extract 11 typed fields (price, SKU, stock, GTIN, release date, and more).
  • Identical inputs: one example URL and a 1,079-byte prompt, byte-identical across all four runs, reasoning effort set to high everywhere.
  • Held-out scoring: we scored each workflow against a separate deploy of the shop (4 listing pages, 32 detail pages) with zero links between the example site and the scoring site.
  • Isolation, audited: we grepped every session transcript for all 32 held-out product slugs and the scoring site's URL prefix: zero hits for every model.

That audit exists because our first attempt failed it. In the original batch, the scoring pages were reachable by pagination and Grok 4.5 found them. It browsed a scoring page, discovered the extra spec rows, and wrote the label-anchored selector, scoring a perfect 100. With the leak closed, its score dropped to 99.14 and it wrote the same positional selector as everyone else. The other three scores were identical to two decimal places across both batches. An unreachable held-out set changed both a number and a conclusion, which is exactly why we score only on pages the models cannot see.

Which model should you use?

ModelChoose it when
GPT-5.6 LunaBest overall value: tied-best quality at 7.5× lower API cost than Grok 4.5.
Grok 4.5Fastest to a working scraper (2m 44s) with the fewest tool calls and platform credits.
GPT-5.6 TerraMost robust selectors: the only model to anchor on labels instead of position, unprompted.
Claude Sonnet 5Solid quality (98.20); ran under Claude Code, so cost and speed are not comparable.

What this benchmark does not tell you

  • One run per model: the 0.94-point spread between first and last is within plausible single-run variance. We are running repeats before treating the ordering as settled.
  • One target, and an easy one: a server-rendered shop does not test the decision that separates scraping agents most: when to pay for browser rendering. That harder target is next.
  • Quality is saturated: all four models sit above 98, and three are within 0.1 of each other. This benchmark is a competence floor, not a fine-grained ranking.
  • Cross-harness numbers are not comparable: Claude Sonnet 5 ran under Claude Code, so its token cost and wall clock reflect that harness as much as the model.

FAQ

What is the best LLM for web scraping?

In our held-out benchmark, GPT-5.6 Luna and Grok 4.5 tied for the best quality score (99.14/100) building a two-stage scraping workflow. GPT-5.6 Luna is the Pareto-optimal choice: it delivers that tied-best quality at $0.037 in API cost per run, about 7.5× cheaper than Grok 4.5 ($0.279).

Which LLM is cheapest for web scraping tasks?

GPT-5.6 Luna, at $0.037 in API tokens for the full authoring run in our benchmark. That is the cheapest of the three models run on an identical harness, with no quality penalty. Grok 4.5 used the fewest platform credits (4) and finished fastest (2m 44s), so it wins on speed rather than token cost.

Why aren't GPT-5.6 Sol, Fable 5, or Opus 5 in this benchmark?

We left them out on purpose. The current frontier models can all author a working scraper, so testing them would confirm something we already knew. The open question is whether the tier below them can do the same job, how well, and at what cost. That is what this benchmark measures.

How was scraping quality measured?

Each model authored a two-stage scraping workflow (listing pages → product detail pages, 11 fields) from one example URL and a 1 KB prompt, identical across models. The workflow was then scored against a held-out mirror site the model never saw: 4 listing pages and 32 detail pages. Quality combines link extraction F1 (35%), required-field accuracy (50%), and bonus-field accuracy (15%). We audited every transcript to confirm no model accessed any held-out page.

Do these results mean one model is definitively better?

No. This is a single run per model on one target site, and all four scored above 98, so the spread rests on two edge cases across 32 pages. Treat the ordering as provisional; we are running repeats and a harder target that tests browser-tier decisions next.

Benchmark run on 2026-08-03 by the Parseium team. All four models built their scrapers on Parseium over MCP, using the same tooling available on every account.

Free your Data

Stop wasting hours writing parsing scripts for each site. Stop overpaying for tokens with LLM extraction.

  • easy integration
  • one simple API call
  • fast and accurate
  • scalable performance
  • thousands of pages per day