Skip to main content
Infographic: Markdown search results show 74% token reduction to 6,435, improving SEO and efficiency.

Editorial illustration for Markdown Search Results Cut Tokens by 74% to 6,435

Markdown Search Results Cut Tokens by 74%

4 min read

A search for "coffee" through SerpApi's API used to cost 24,723 tokens in standard JSON. Nested objects, tracking links, metadata fields nobody asked for, all of it billed the same as text an AI model actually reads. SerpApi says its new Markdown output brings that same search down to 6,435 tokens, a 74 percent cut, and tighter filtering can push it as low as 1,298.

The waste isn't hypothetical. Agents that call search APIs repeatedly, rerun queries in loops, or pull in full comment threads and log files end up paying token costs for data the model never touches. A single "look up coffee shops" request can turn into a sprawling payload of nested arrays and boilerplate metadata, most of which gets ignored downstream but still shows up on the bill.

SerpApi's fix keeps the same underlying search data intact while changing the format it ships in. The company built a side-by-side comparison of the JSON and Markdown responses to show exactly which fields survive the conversion and which ones get stripped or restructured. That breakdown is where the real savings show up.

Using conventional JavaScript Object Notation (JSON), a search for "coffee" resulted in a response that required 24,723 tokens. Using Markdown, the same search only used 6,435 tokens. That's a 74 percent reduction and there is more to be gained, as further filtering can require just 1,298 tokens for a more restricted view.

Why this matters

For anyone building AI agents that lean on search APIs, token overhead is a direct line item, not an abstraction. Going from 24,723 tokens down to 6,435, and potentially to 1,298 with tighter filtering, changes what fits in a context window and what a query actually costs to run. That's the difference between an agent that can hold onto conversation history and one that has to keep truncating it just to fit in a single search result.

We'd want to know what got dropped to hit that 74 percent number. JSON carries structure and redundancy that Markdown strips out, but some of that redundancy exists for parsing reasons, and teams should check whether downstream tools still get what they need. If the answer is yes, this is a straightforward win: lower API costs, more room for reasoning, fewer truncated results. Worth testing against your own retrieval pipeline before assuming the savings carry over one-to-one, since result structure varies a lot by use case.

Common Questions Answered

How much can SerpApi's Markdown output reduce token usage compared to standard JSON format?

SerpApi's Markdown output reduces token usage by 74 percent for the same search query, bringing a "coffee" search from 24,723 tokens in JSON down to 6,435 tokens in Markdown format. With additional filtering applied, the token count can be reduced even further to as low as 1,298 tokens, providing significant cost savings for API users.

Why is token overhead a critical concern for AI agents that use search APIs?

Token overhead represents a direct cost line item for AI agents calling search APIs repeatedly or running queries in loops, as every token consumed is billable. Reducing token usage from 24,723 to 6,435 or lower directly impacts what fits within a context window and allows agents to maintain conversation history instead of truncating it to accommodate search results.

What specific elements in JSON search responses contribute to unnecessary token consumption?

Standard JSON responses include nested objects, tracking links, metadata fields, and other data that gets billed at the same rate as text an AI model actually reads, even when users didn't request this information. This unnecessary overhead is eliminated in Markdown format, which focuses on delivering only the relevant content needed for AI processing.

What is the practical impact of token reduction for AI agents that repeatedly call search APIs?

For agents that make multiple search API calls or rerun queries in loops, the 74 percent token reduction significantly lowers operational costs and allows more efficient use of limited context windows. This efficiency gain means agents can maintain longer conversation histories and process more information without hitting token limits or requiring expensive truncation of search results.

LIVE00:36Markdown Search Results Cut Tokens by 74% to 6,435