Blog · 2026-08-15 · Vynaris Team
What LLM web-data extraction costs per 1,000 pages: the 16x model spread and the boilerplate tax
Scraping 1,000 web pages to structured JSON costs $1.12 to $18.48 per 1,000 pages across six models. Boilerplate stripping cuts 64% before caching. Prices verified 2026-08-15.
Scraping 1,000 web pages to structured JSON costs between $1.12 and $18.48 in model fees across six models, a 16.6x spread, with prices verified 2026-08-15. The model you pick is not the biggest lever. Boilerplate stripping is: it cuts 64% of the bill before you touch a model or a cache. This is a reproducible cost model, per 1,000 pages, you can re-run with your own token counts.
The finding, before the model
A web-data extraction pipeline takes raw HTML and returns a structured JSON row: title, price, specs, whatever the schema demands. The page source is noisy. Most of its tokens are navigation, scripts, and boilerplate the model does not need to read. Strip that noise before the model sees it and the input drops by 68%, which drops the bill by 64% on every model in the table.
We built this from public pricing only. No product data. Every token count below is an assumption you can edit, and every price is from a provider's live page, captured 2026-08-15.
The workload (edit these)
One batch of 1,000 pages. These knobs set the bill.
Assumption Value Note
------------------------- ---------------------------------------------------------------- -----------------------------------------------
Pages per batch 1,000 the outcome unit is cost per 1,000 pages
Raw HTML per page 25,000 [input tokens](https://vynaris.com/glossary/input-tokens) unprocessed page source, mostly noise
Stripped HTML per page 8,000 input tokens after boilerplate removal, data-bearing content
Shared prefix (cacheable) 2,000 input tokens schema, instructions, few-shot examples
Unique content 6,000 input tokens the page's actual data, different every call
Output per page 300 [output tokens](https://vynaris.com/glossary/output-tokens) extracted JSON row
Verify pass 15% of pages re-extract low-confidence results
Schema-drift retries 5% of pages re-extract after a schema mismatchTwo structural facts drive the cost. First, input dominates: the 83:1 input-to-output ratio means the bill is almost entirely about how many input tokens you send, not how many you get back. This is the opposite of document extraction, where a 700-token JSON output at output rates is more than half the bill on pricier models. Second, the 2,000-token schema prefix repeats on all 1,200 calls (1,000 base plus 150 verify plus 50 drift), which is exactly what prompt caching is for.
With the verify and drift passes, one batch is 1,200 model calls: 30 million raw input tokens or 9.6 million stripped, and 0.36 million output tokens.
Cost per 1,000 pages, six models
Same workload, same cost-per-token math, six extraction-grade models. Raw HTML, boilerplate-stripped, then stripped plus cached prefix. Prices verified 2026-08-15.
Model Raw HTML / 1k pages Stripped / 1k pages Stripped + cached / 1k pages Strip saves
------------------------------------------------------------------------- ------------------- ------------------- ---------------------------- -----------
[deepseek-v4-flash](https://vynaris.com/models#deepseek-v4-flash) $4.30 $1.44 $1.12 66%
[Gemini 3.1 Flash-Lite](https://vynaris.com/models#gemini-3-1-flash-lite) $8.04 $2.94 $2.40 63%
[Gemini 3.6 Flash](https://vynaris.com/models#gemini-3-6-flash) $23.85 $8.55 $6.93 64%
[gpt-5.6-luna](https://vynaris.com/models#gpt-5-6-luna) $32.16 $11.76 $9.60 63%
[Claude Haiku 4.5](https://vynaris.com/models#claude-haiku-4-5) $31.80 $11.40 $9.24 64%
[Claude Sonnet 5](https://vynaris.com/models#claude-sonnet-5) $63.60 $22.80 $18.48 64%deepseek-v4-flash cached at $1.12 is 16.6x cheaper than Claude Sonnet 5 cached at $18.48 for the identical job. The gap is input price: DeepSeek bills input at $0.14 per million tokens, Sonnet 5 at $2.00, a 14.3x difference on the tokens that dominate this workload.
Boilerplate stripping saves 63% to 66% across every model, because it cuts 17,000 of the 25,000 raw tokens before the model sees them. The small variance comes from each model's input-to-output price ratio: stripping removes input tokens only, so models where input is a larger share of the bill benefit slightly more.
Caching adds 18% to 23% on top of stripping. The 2,000-token schema prefix served from cache costs a tenth of full input on most providers. DeepSeek saves most at 23%, because its cache-hit read is $0.0028 per million, 2% of its input price. The savings are smaller than in document extraction (19% to 33% there) because the unique 6,000-token content block is larger relative to the cacheable prefix, and it pays full rate on every call.
Where a router changes the unit economics
The verify pass is the interesting cell. In the single-model numbers, the low-confidence 15% get re-extracted on the same model. A model-routing strategy runs the whole batch on the cheapest model, then escalates only the low-confidence 15% to a frontier model.
Strategy Cost / 1k pages vs all-Sonnet-5
------------------------------------------------- --------------- ---------------
All deepseek-v4-flash (cached) $1.12 94% less
Routed: DeepSeek bulk + Sonnet 5 escalation (15%) $3.29 82% less
All Claude Sonnet 5 (cached) $18.48 —The routed run costs $3.29: $0.93 to extract all 1,000 pages on deepseek-v4-flash cached, plus $2.31 to re-extract the hard 150 on Sonnet 5 cached, plus $0.05 for 50 schema-drift retries on DeepSeek. That buys frontier accuracy on the pages that need it for 82% less than running Sonnet 5 on everything.
Routing earns its keep here because extraction confidence is measurable. A JSON schema with required fields, a field-count check, or a low log-probability on a parsed value: each is a signal that the first pass missed something. Run your own escalation rate and token shape through the calculator, which takes the per-page input and output counts directly.

The boilerplate tax
The honest failure mode: sending raw HTML to the model and expecting it to sort the signal from the noise. A 25,000-token page source is 68% boilerplate by our assumption. Every one of those tokens bills at full input rate, and caching cannot help because the boilerplate is different on every page.
The fix is deterministic, not statistical. A readability extractor, a DOM selector, or a headless-browser render that strips scripts and navigation before the model sees the page removes 17,000 tokens per call. On 1,200 calls that is 20.4 million input tokens removed. At DeepSeek's $0.14 per million, that is $2.86 saved. At Sonnet 5's $2.00 per million, it is $40.80 saved.
The stripping step has its own cost: a headless browser adds latency and infrastructure. But it runs on CPU, not on GPU-priced inference tokens, and the per-page cost is fractions of a cent. The token savings dwarf the infrastructure cost on every model above DeepSeek.
Build notes
Web-data extraction has constraints a token model does not capture.
- Schema drift is a retry tax, not a quality problem. When a site changes its layout, the extraction schema breaks and the page needs a second pass. The 5% drift rate is an assumption. A site that redesigns monthly will push it higher. Each drift retry costs the same as a base extraction, so a 10% drift rate adds 10% to the bill, not 2x.
- The [context window](https://vynaris.com/glossary/context-window) is rarely the constraint. A stripped page is 8,000 tokens. Even 10 pages batched into one call for cross-page normalization is 80,000 tokens, well under the 200k threshold where Gemini 3.1 Pro re-rates to $4 in and $18 out. The constraint is extraction accuracy, not window size.
- Batch API halves the bill for async work. Google's Batch API offers 50% off Standard pricing. Gemini 3.1 Flash-Lite Batch costs $1.47 per 1,000 pages stripped, and Gemini 3.6 Flash Batch costs $4.28. If your extraction is not interactive, Batch is the cheapest listed tier. The tradeoff is latency: Batch jobs complete in minutes to hours, not seconds.
- Caching mechanics are secondary here. Unlike the PR-review playbook where a 21,000-token prefix caches across 3 passes, the cacheable prefix here is only 2,000 tokens against 6,000 unique. Caching helps, but boilerplate stripping is the dominant lever.
When this workload does not need a router
The honest tradeoff: if deepseek-v4-flash or Gemini 3.1 Flash-Lite clears your extraction-quality bar on the hard pages, do not build a router. Pay $1.12 to $2.40 per 1,000 pages and move on. A router adds a confidence classifier, an escalation path, and a second provider integration, and it only earns that complexity when a missed field on a high-value page costs more than the escalation premium. For a price-monitoring pipeline where a wrong number triggers a bad trade, escalating the low-confidence 15% to Sonnet 5 for $2.31 per 1,000 pages is cheap insurance. For a directory scraper where a missing field is harmless, the router is over-engineering, and a single cached cheap model with a tight schema is the right build. Route on data value, not on model prestige.
FAQ
What does LLM web-data extraction cost per 1,000 pages? On this model, $1.12 to $18.48 per 1,000 pages in model fees across deepseek-v4-flash through Claude Sonnet 5, stripped and cached, with 8,000 input and 300 output tokens per page, 1,200 total calls including verify and drift passes. Prices verified 2026-08-15.
How much does boilerplate stripping save? Between 63% and 66% across all six models, because it removes 17,000 of the 25,000 raw HTML tokens before the model sees them. The savings are consistent because input dominates this workload.
Does prompt caching help with web scraping? Yes, by 18% to 23% on top of stripping, but less than in document extraction. The cacheable schema prefix is 2,000 tokens against 6,000 unique content tokens, so most of the input still pays full rate.
When should a web scraper route between models? When you can classify extraction confidence and the cost of a missed field is high. Running every page on deepseek-v4-flash and escalating the low-confidence 15% to Sonnet 5 costs $3.29 per 1,000 pages, 82% less than running Sonnet 5 on everything at $18.48.
Is Batch API cheaper for web extraction? Yes, for asynchronous work. Gemini 3.1 Flash-Lite Batch costs $1.47 per 1,000 pages stripped, half the Standard rate. The tradeoff is latency: Batch completes in minutes to hours, not seconds.
Sources
- Google Gemini API pricing (3.1 Flash-Lite, 3.6 Flash, Batch, cache read and storage), captured 2026-08-15: https://ai.google.dev/gemini-api/docs/pricing
- Anthropic API pricing (Haiku 4.5, Sonnet 5, cache-hit and write multipliers), captured 2026-08-15: https://docs.anthropic.com/en/docs/about-claude/pricing
- OpenAI API pricing (gpt-5.6-luna), captured 2026-08-15: https://platform.openai.com/docs/pricing
- DeepSeek API pricing (v4-flash, cache-hit rate), captured 2026-08-15: https://api-docs.deepseek.com/quick_start/pricing
- Hacker News, Context.dev launch (119 points), 2026-07-09: https://news.ycombinator.com/item?id=48847562
- Reproducible arithmetic:
artifacts/web-data-extraction-cost-per-1k-pages-math.py
Prices change. We re-verify every figure in this post monthly and stamp updates. Numbers here are current as of 2026-08-15.
Vynaris is an OpenAI-compatible gateway that routes each extraction call to the cheapest right-sized model, escalates on your confidence signal, caches the schema prefix correctly, and shows the per-page cost. One base URL swap. Get an API key at vynaris.com.
Further reading: `Accept: text/markdown` cost math measures producer-side negotiation on three live pages before consumer-side boilerplate stripping begins.