cloro
← cloro Research

What a search result costs an LLM: HTML vs JSON vs markdown, measured on 6 AI surfaces

If you feed AI search answers to a model, the format you send decides the bill. We sent 20 prompts to six AI surfaces through the cloro API and counted every answer three ways, as raw HTML, as JSON and as markdown with inline citations, using the o200k_base tokenizer. Markdown came out a median 924 to 1,399 tokens per answer. The raw HTML of the same answers ran a median 207,781 to 715,118, too large to send for most of them.

Published November 10, 2026 · 119 answers · 20 prompts · 6 AI surfaces · US · tokenizer: o200k_base

On this page

Key findings

89 of 119

raw HTML snapshots were above 272K tokens, where OpenAI bills gpt-6.1-terra input at twice the normal rate. 4 were larger than its whole 1,050,000-token context window, so the model cannot take them at all.

31% to 81%

fewer tokens with markdown than with cloro's full JSON, median per answer. AI Overview saved the most (81%). ChatGPT saved the least, 31%, and on one ChatGPT answer only 2%.

$0.92 to $1.40

per 1,000 answers as markdown at gpt-6.1-terra's $1.00 per 1M input tokens. The same answers as raw HTML cost a median $208 to $1,430 per 1,000.

10% to 18%

is all markdown saves on the chat surfaces once you cut the JSON to the answer text and its sources. Most of the JSON overhead is citation detail a model rarely needs. AI Overview is the exception, at 43%.

Tokens per answer, by format and surface

Each cell is the median over the prompts that surface answered. "JSON" is cloro's full response object, compact, without the markdown and HTML fields. For AI Overview it is the AI Overview block alone, not the whole results page. "Plain text" is the answer with no links, the floor for any format that keeps the words.

SurfaceAnswersRaw HTMLStripped HTMLJSONMarkdownPlain textMarkdown vs JSON
ChatGPT20264,413102,8561,8721,251623-31%
Gemini20647,03028,5512,0321,275720-46%
AI Mode (desktop)20527,41586,6912,5221,044612-67%
AI Mode (mobile)20532,95484,1182,605924537-65%
AI Overview20715,118141,6184,846996446-81%
Bing AI Mode19207,781163,5022,6831,399698-46%

The takeaway: the format choice that matters most is HTML against anything else. Every structured format lands between about 450 and 4,900 tokens per answer. Raw HTML is 150 to 750 times larger than the markdown of the same answer. Markdown against JSON is the smaller, second decision.

Raw HTML breaks the budget, and often the context window

Most of an AI answer page is code the answer does not need. On Gemini, scripts, style sheets and SVG icons make up about 95% of the page's tokens. We measured the HTML exactly as the page rendered for a logged-out session, the same file a do-it-yourself browser scraper would capture. OpenAI prices input above 272K tokens at the long-context rate, which for gpt-6.1-terra is $2.00 per 1M instead of $1.00 (OpenAI pricing, read 2026-11-10). The model's context window is 1,050,000 tokens with a 922,000-token input cap (model page).

ChatGPT45.0%Gemini100.0%AI Mode (desktop)100.0%AI Mode (mobile)100.0%AI Overview100.0%Bing AI Mode0.0%
Share of raw HTML snapshots above 272K o200k_base tokens, OpenAI's long-context threshold. 89 of 119 overall.

Gemini, both AI Mode views and every AI Overview results page went over 272K on all 20 prompts. ChatGPT went over on 9 of 20, and three ChatGPT pages ran past 1.1 million tokens, more than the model can take at all. Bing AI Mode was the lightest at a median 207,781, under the threshold on every answer.

With every <script>, <style>, <svg> and comment removed, the median page still ran from 28,551 tokens on Gemini to 163,502 on Bing AI Mode. Across the six surfaces, that is 22 to 142 times the median markdown of the same surface, with AI Overview the highest. What remains is markup and interface text, and the model still has to find the answer inside it. If you scrape AI answers yourself, budget for the parsing step that turns the page into text; without it, every model call pays for the whole page.

Markdown cuts full JSON by 31% on ChatGPT and by 81% on AI Overview

cloro's API returns each LLM answer as JSON: the answer text plus structured lists of the sources and of every inline citation, each with its label, URL, description snippet, position and redirect link. The markdown keeps the answer and writes each citation as an inline link. So the saving tracks how much citation detail a surface returns.

AI Overview81.0%AI Mode (desktop)67.0%AI Mode (mobile)65.0%Gemini46.0%Bing AI Mode46.0%ChatGPT31.0%
Median per-answer token saving of markdown against cloro's full JSON response, o200k_base.

AI Overview saves the most because its JSON block carries long citation entries for every source chip. ChatGPT saves the least, 31%, with a range of 2% to 71% across the 20 prompts. Its answers are longer and carry fewer inline citations, so the JSON has less to cut. Gemini shows the same effect at the edge: on 3 of 20 prompts it answered without any sources, the JSON was just the text, and the markdown came out the same size or up to 7% larger because of its formatting.

Pretty-printed JSON makes it worse: indentation added a median 8% to 9% on most surfaces, 18% on Bing AI Mode and 26% on ChatGPT. If you send JSON to a model, send it compact.

If you already trim your JSON, markdown saves 10% to 18%

Many pipelines do not send the full response. They keep the answer text and the source list and drop the rest. We measured that trimmed JSON too. Against it, markdown's lead shrinks to a few hundred tokens on the chat surfaces.

SurfaceFull JSONJSON, text + sourcesMarkdownMarkdown vs trimmed JSON
ChatGPT1,8721,2881,251-11%
Gemini2,0321,3841,275-11%
AI Mode (desktop)2,5221,1471,044-10%
AI Mode (mobile)2,6051,076924-17%
AI Overview4,8461,863996-43%
Bing AI Mode2,6831,7011,399-18%

Most of markdown's saving over full JSON is citation detail a pipeline would drop anyway. What markdown adds is convenience: each citation already sits next to the claim it supports, and you write no trimming code. AI Overview is the exception, where markdown still saves 43% over the trimmed JSON because its source entries are long.

What 1,000 answers cost at OpenAI's prices

Input cost per 1,000 answers at gpt-6.1-terra's $1.00 per 1M input tokens, the long-context $2.00 rate applied to each HTML answer above 272K. At gpt-6-luna ($0.10) divide by ten; at gpt-6.1-sol ($2.00) double it.

SurfaceRaw HTMLFull JSONMarkdown
ChatGPT$264$1.87$1.25
Gemini$1,294$2.03$1.28
AI Mode (desktop)$1,055$2.52$1.04
AI Mode (mobile)$1,066$2.61$0.92
AI Overview$1,430$4.85$1.00
Bing AI Mode$208$2.68$1.40

At a few thousand answers a day the gap between JSON and markdown is a few dollars a month. The gap between HTML and either one is far larger: a pipeline that reads 10,000 AI Overview pages a day as raw HTML spends about $14,300 a day on input, against about $10 as markdown.

AI Mode on mobile returns the same lean markdown

We ran AI Mode twice per prompt, once as desktop and once as mobile, since the two layouts differ. The mobile markdown was a median 924tokens against 1,044 on desktop, and saved 65% against JSON. We read all 20 mobile markdown files by eye and found no interface text, HTML tags or broken links. Mobile answers carried slightly fewer inline links, a median of 7 against 9 on desktop, with the same median of two sources.

How SerpApi's markdown figures compare, and why they measure something else

SerpApi added markdown output in August 2026 and reports that it gives "roughly half the tokens of JSON on average" across its APIs, from 36% on Walmart to 91% on Apple Maps (SerpApi, August 21, 2026). In a later test, also counted with o200k_base, SerpApi measured one Google search for "coffee" at 66,237 tokens as JSON and 13,025 as markdown, and compared it with Exa, Tavily and Firecrawl, whose full-page modes ran 30,802 to 133,343 tokens (SerpApi, October 1, 2026).

Those figures are about organic Google results: the ten blue links and the features around them. This study measures AI answers. cloro returns organic Google results as JSON and HTML only, with no markdown option, so there is no cloro number to set beside SerpApi's. The queries, locations and payloads differ too, so the two sets of numbers cannot be compared directly.

Which format to send: markdown for models, JSON for data, HTML for neither

  • For an agent or a RAG pipeline, send markdown. It is the smallest format that keeps the citations next to the claims they support, and it needs no clean-up code.
  • For dashboards and citation tracking, keep the JSON. Source positions, domains and citation entries are fields you count, and markdown flattens them into text.
  • To do both, request both formats in one call. Store the JSON, send the markdown to the model.
  • Keep raw HTML for audits and screenshots. At 200,000 to 700,000 tokens a page it is the wrong input for a model.

With cloro the flow is one request: send the prompt with include.markdown set to true, cloro runs the query and parses the answer, and you get the JSON and the markdown back together. For AI Overview, request include.aioverview with markdown: true. Markdown costs no extra credits (provider docs).

curl -X POST https://api.cloro.dev/v1/async/task \
  -H "Authorization: Bearer $CLORO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "taskType": "AIMODE",
    "payload": {
      "prompt": "Which provider gives the most reliable Google AI Mode coverage?",
      "country": "US",
      "include": { "markdown": true }
    }
  }'

If you are moving from another provider, the migration guide maps SerpApi, DataForSEO and four other vendors to cloro's fields, and thellms.txt guide covers the same token problem from the publisher's side.

Methodology

We took 20 prompts from the 176 buyer questions cloro tracks in AI engines (every ninth one, covering SERP API buying, AI visibility tracking and AI scraping) and sent each one to ChatGPT, Gemini, Google AI Mode on desktop and on mobile, Bing AI Mode, and Google Search with the AI Overview, through cloro's async API, country US, on November 10, 2026. For AI Overview the prompt was the Google query, and all 20 returned an AI Overview. Each request asked for markdown and HTML in the same call. One Bing AI Mode request failed twice and is excluded, so Bing has 19 answers. Perplexity was not measured: its API was unavailable on the day.

Formats: raw HTML is the rendered page snapshot cloro stores for each request. Stripped HTML removes script, style,svg, noscript, template, link and meta elements and comments. JSON is the result object serialized compact, without the markdown and HTML fields; for AI Overview, the AI Overview object alone. Trimmed JSON keeps only the answer text and the sources list. Markdown is the response's markdown field. Plain text is the answer text field.

Tokens are counted with tiktoken's o200k_base encoding, used by OpenAI's gpt-4o generation. OpenAI does not publish the encoding of its newer models, so the counts are a proxy for them. A second count withcl100k_base came out a median 1.1% higher on the markdown. Every figure is a median of per-answer values; savings are the median of each answer's own saving. Prices are OpenAI's standard input rates as published on November 10, 2026. Answers vary by day and by session, so treat these as a one-day measurement on one prompt set.

Data: the token counts for every answer and format, with the prompt text, are free to reuse under CC BY 4.0:json-vs-markdown-tokens-2026-11-10.csv.

Cite this study

cloro. (November 10, 2026). JSON vs Markdown Tokens: What a Search Result Costs an LLM. cloro Research. https://cloro.dev/research/json-vs-markdown-tokens/

More studies from cloro's monitoring corpus are in the research index.

Questions this study answers

How many fewer tokens does markdown use than JSON for AI answers?

In our test of 119 answers counted with the o200k_base tokenizer, markdown used a median 31% to 81% fewer tokens than cloro's full JSON response, depending on the surface. AI Overview saved the most (81%), AI Mode 67%, Gemini and Bing AI Mode 46%, and ChatGPT the least (31%). Against JSON cut down to the answer text and its sources, markdown saved only 10% to 18% on the chat surfaces and 43% on AI Overview.

How many tokens is the raw HTML of an AI answer page?

The median raw HTML snapshot ran from 207,781 tokens (Bing AI Mode) to 715,118 tokens (Google's results page with an AI Overview). 89 of 119 snapshots were above 272K tokens, the point where OpenAI bills gpt-6.1-terra input at its long-context rate, and 4 were larger than that model's whole 1,050,000-token context window. Removing scripts, styles and SVG still left a median of 28,551 to 163,502 tokens.

Why does ChatGPT save the least when converted to markdown?

Most of the JSON overhead on AI surfaces is the citation data: each inline citation carries a label, URL, description snippet, position and redirect link. ChatGPT answers in our sample carried fewer of those inline citations and longer answer text, so there was less to remove. The median saving was 31%, with a range from 2% to 71% across the 20 prompts.

Which tokenizer did this study use?

Every count uses tiktoken's o200k_base encoding, the encoding OpenAI's gpt-4o generation models use. OpenAI does not state which encoding its newer models use, so treat the counts as a close proxy for current OpenAI models. We also counted the markdown with cl100k_base: it came out a median 1.1% higher, within 5% on every answer.

Does cloro charge extra for markdown output?

No. cloro's documentation lists markdown as included on every AI surface it covers (include.markdown: true), and for AI Overview it comes with the AI Overview add-on (include.aioverview with markdown: true). Raw HTML through include.html is also free. Google Search and Google News organic results come back as JSON and HTML, with no markdown option.

Get AI answers as markdown, ready for your model

cloro returns ChatGPT, Gemini, AI Mode, AI Overview and Bing AI Mode answers as JSON and markdown from one API, with markdown at no extra credit. Start with 500 free credits a month.