Build1 publisher3 min readPublished
Markup filled 263,968 of a scraped product page's 267,361 tokens
Decodo's own runs on ten pages put raw HTML at 3 to 24 times the token count of the same pages as Markdown, with every model still answering correctly and the JSON-LD fields lost in the conversion.
The Engineer · Build desk

What happened
- A Decodo write-up on dev.to measured ten scraped pages and found the raw HTML used 3 to 24 times more tokens than the same pages converted to Markdown, using the author's own September 2026 runs.
- One product page arrived as 267,361 tokens, of which 3,393 were visible text, and across the ten pages visible text ran from 0.3% to 18.5% of everything fetched.
- Three models across two vendors answered every question correctly from both the HTML and the Markdown, 60 answers each way, and managed only one or two with no page attached at all.
- A 57,266-token page was refused outright by a gpt-4.1 account plan, and only 622 of those tokens were the visible text the question was about.
- Markdown conversion strips the script blocks that hold JSON-LD, so ratings, stock status and publication dates were missing on three of the five pages that carried it.
Compiled by The EngineerSomething wrong?How this is made
Why it matters
- cost The markup is billed to whoever owns the prompt, and it scales with volume: a thousand of the heaviest pages runs $1,157 as HTML against $49 converted, on top of the scrape fees.
- exposure Once a page crosses the account input limit the request fails instead of answering slowly, so raw-HTML pipelines carry a size-dependent failure mode that testing on small pages will not surface.
- decision Any pipeline that needs price, rating or stock status has to choose per page type: keep paying for the HTML on those pages, or parse the ld+json blocks in-house and send only prose to the model.
- constraint The ratio is the portable part of this measurement and the dollar figures are not, since the same HTML measured up to 50% larger on other vendors' tokenizers while the pooled ratio held between 11 and 14 times.
The count works by subtraction. Each page was fetched once with requests.get and a Chrome User-Agent, then one category of markup was removed at a time and the remainder re-counted with tiktoken's o200k_base, each category measured after the ones above it so the rows sum to the fetched total [8]. On the Next.js docs page the largest single line was hydration JSON, most of it inside 65 self.next_f.push calls that repeat the page content as escaped strings [9]. You pay for the prose, then you pay for the escaped copy of the prose. The Hacker News front page has almost no scripts or styles and still came in at 90% markup, because it is built from layout tables [10].
Subtract the visible text from that product page total and 263,968 tokens of markup remain, about 98.7% of what was fetched [1][2]. At the $2.00 per million input rate the post prices against, reading it once costs roughly 53 cents, and the part anyone wanted costs under a cent [3]. Across all ten pages the totals were $3.04 as HTML and $0.25 as Markdown [12], a pooled ratio near 12 to 1 [6].
The refusal message the post prints is "Request too large ... Limit 30000, Requested 57266" [16]. The request was about 1.9 times the account limit, and the visible text on that page would have used 2% of it [4].
Latency tracked size. On gpt-5.6-terra the raw version took 2.0 to 2.8 times longer to first token on the four pages above 130K tokens, and 1.0 to 1.4 times longer on the four below 75K; two other models ran up to 5.7 times slower to start [15]. Four raw pages loaded into 396K-token prompts still returned the right answer in all three runs [18].
Conversion is a subtraction too. Markdown drops style blocks, SVG paths, class and data- attributes and scripts, and keeps headings, lists, tables and link URLs [19]; the Hacker News front page came back as tables carrying story titles, URLs, scores and comment counts in 3,644 tokens instead of 11,817, a cut of about 3.2 times [20][5]. JSON-LD sits inside a script block, so it leaves with the scripts. Asked for a product's price, rating and review count, the model got all three from the HTML and only the price from the Markdown [21]. That same Markdown retained 99.4% of the page's words, because the rating and review count are 2 tokens out of 16,844 [23]. Decodo's recommended fix is to read the application/ld+json blocks with an HTML parser, since quoting varies, and send the model the prose [24].
Every figure is the author's own runs from September 2026 [7], published by Decodo, whose Web Scraping API takes a markdown flag that runs the conversion server-side [5][25]. Ten pages, one unrendered fetch each [8]. Across OpenAI, Anthropic and Google tokenizers the same HTML measured up to 50% larger while the pooled ratio held between 11 and 14 times, and the post's own advice is to trust the ratio and re-count the dollars for your model [14][27]. It also says docs, news and storefronts would each need a different rule [11].
What to watch
- A count taken through a rendered browser fetch instead of requests.get, to see whether hydration JSON still dominates Next.js-style pages.
- An independent replication on a page set not chosen by a vendor that sells the markdown flag.
- Whether account-level input caps like the 30,000-token plan that refused the 57,266-token page move upward.