SerpApi has added Markdown output to all of its 100-plus search-data APIs at no extra cost, cutting token use in one benchmark from 24,723 tokens as JSON to 6,435 tokens as Markdown for a single Google search for "coffee". The 74% reduction captures a wider infrastructure change: data formatted the way models were trained to read costs less to process. For companies running agents that ingest search results daily, the format of API responses now affects context limits and inference spend directly.

SerpApi adds Markdown output across 100 APIs to cut AI context costs

How the Markdown option works

SerpApi, a nine-year-old search-data provider working with developers, researchers and Fortune 500 companies, pulls structured insights from Google, Bing, YouTube and other sources. Developers can now request the same results in token-light Markdown instead of JSON without adopting a new endpoint. The option is enabled by adding output=md to the query string, calling the /search. md route, or setting an Accept: text/markdown header. Responses carry YAML frontmatter for metadata, structured Markdown tables for result sets and native inline links, ready to drop into prompts or agent memory.

The saving comes from removing what models do not need to reason over. JSON search payloads carry redirect links, favicons, tracking parameters, deeply nested metadata and duplicate fields, which inflate token counts without adding decision value. Markdown output keeps titles, snippets, links, prices and ratings in lists and tables while stripping tracking noise and duplication. In the "coffee" example, field filtering on top of Markdown brought the response down further to 1,298 tokens. Across its catalogue SerpApi reports average savings of roughly 50%, with reductions of up to 90% on some endpoints.

The change builds on how models learn and how chat products display answers. Large language models trained on documentation sites, README files, technical blogs, forum threads and knowledge bases already parse headers, lists, tables and code fences as semantic signals rather than noise. Chat interfaces render Markdown cleanly without extra transformation, so a model that ingests Markdown and outputs Markdown stays inside one loop. OpenAI prompt engineering documentation recommends the same pattern, with double hash marks for major sections, bullet lists, tables and inline backticks for code. Third-party guides repeat the advice for complex prompts, especially for newer GPT-5 series models, while JSON keeps its role for programmatic manipulation and strict schema enforcement.

What cheaper context means for AI teams

For product teams the immediate effect is more usable context per request at lower cost. Search, e-commerce, maps and content APIs produce the noisiest payloads for agents, so a 50% average cut lets an agent examine more results inside the same window or run more retrieval cycles for the same budget. A small company running one support or sales-research agent sees lower per-task cost and fewer truncation failures. A larger operation running thousands of searches per day across Google, Bing and YouTube sources sees the same efficiency compound into inference capacity and response speed.

The trade-off is selection of format by stage of work. Markdown fits the ingestion phase, when an agent needs titles, snippets and ratings to reason, while JSON remains the safer choice when code must validate fields, enforce types or update systems of record. Buyers should check which fields are dropped in Markdown mode, how YAML frontmatter maps to existing parsers, and whether agent frameworks preserve tables and links without re-expansion. The launch does not by itself prove accuracy gains or remove the need to test retrieval quality, latency and error handling on live queries.

The marker to watch is replication. If more search, e-commerce, maps and content providers add Markdown variants in the coming months, and agent frameworks standardize on Markdown sections and tables for retrieved context, the format will have moved from optimization to default. Tooling for measuring token footprint would then follow. Absence of that spread would leave it as a useful option for heavy search users rather than infrastructure norm.