<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/what-s-actually-inside-24-723-tokens-of-a-search-result-we-broke-it-down-field-by-field-pu1zqycjt" -->

---
title: What’s Actually Inside 24,723 Tokens of a Search Result?...
description: SerpApi now offers a Markdown output option alongside its standard JSON responses, aimed at reducing the token overhead AI agents incur when parsing search...
canonical: https://daily.dev/posts/what-s-actually-inside-24-723-tokens-of-a-search-result-we-broke-it-down-field-by-field-pu1zqycjt
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: What’s Actually Inside 24,723 Tokens of a Search Result? We Broke It Down, Field by Field | daily.dev
og:description: SerpApi now offers a Markdown output option alongside its standard JSON responses, aimed at reducing the token overhead AI agents incur when parsing search...
og:url: https://daily.dev/posts/what-s-actually-inside-24-723-tokens-of-a-search-result-we-broke-it-down-field-by-field-pu1zqycjt
og:image: https://api.daily.dev/og/posts/Pu1ZqYCjT.png
og:image:alt: What’s Actually Inside 24,723 Tokens of a Search Result? We Broke It Down, Field by Field
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# What’s Actually Inside 24,723 Tokens of a Search Result? We Broke It Down, Field by Field

**[Machine Learning Mastery](https://daily.dev/sources/mlm)** · 5 min read · 1 upvotes · 0 comments

## Summary

SerpApi now offers a Markdown output option alongside its standard JSON responses, aimed at reducing the token overhead AI agents incur when parsing search results. A sample search for 'coffee' dropped from 24,723 tokens in JSON to 6,435 tokens in Markdown, a 74% reduction, with further field restriction via json_restrictor cutting it to 1,298 tokens. Markdown works by stripping internal tracking links, icons, thumbnails, and duplicate metadata, merging titles and links into single readable lines. JSON remains preferable when downstream code needs typed, structured data like precise prices or coordinates. The Markdown output is available across all SerpApi APIs at no extra cost via a query parameter, dedicated endpoint, or request header.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://machinelearningmastery.com/2026-09-prnews-io-whats-actually-inside-24723-tokens-of-a-search-result-we-broke-it-down-field-by-field>

## Questions this post answers

### How much can Markdown output reduce token usage compared to JSON for SerpApi search results?

Markdown output reduces token usage by about 74 percent compared to JSON for SerpApi search results. A 'coffee' search that required 24,723 tokens in JSON dropped to 6,435 tokens in Markdown, and applying additional field restriction with json_restrictor cut it further to just 1,298 tokens for a more limited view.

_daily.dev surfaces practical token-optimization techniques for developers building AI agent pipelines._

### How do I request Markdown output instead of JSON from SerpApi?

Request Markdown output from SerpApi by adding the output=md query parameter to an existing search call, calling the /search.md endpoint instead of /search, or setting the Accept: text/markdown request header. This works across all of SerpApi's 100+ APIs at no extra cost and returns YAML frontmatter, tables, and inline links while stripping internal tracking fields.

_Developers tuning API responses for LLM context limits can track format changes like this on daily.dev._

### When should I use JSON instead of Markdown output for search API results in an AI pipeline?

JSON is the better choice when a pipeline depends on precise numeric data types, such as prices, coordinates, or ratings as floats, or needs structured arrays for downstream processing. For example, a Naver Shopping JSON result exposes price, old_price, coupon_price as integers and rating as a float, which a pricing engine needs but an LLM summarizer does not.

_Choosing between data formats for an AI workflow is easier when tracking these trade-offs on daily.dev._

## Similar posts on daily.dev

- [Why markdown is becoming the default language between search data and AI models](https://daily.dev/posts/why-markdown-is-becoming-the-default-language-between-search-data-and-ai-models-qtysxpc0p) · The Next Web · 0 upvotes · 0 comments
- [Power Up Your AI Agent With Live Web Search, for Fewer Tokens](https://daily.dev/posts/power-up-your-ai-agent-with-live-web-search-for-fewer-tokens-tksh6izca) · SitePoint · 1 upvotes · 0 comments
- [AI teams are spending months on web scrapers that SerpApi replaces with one API call](https://daily.dev/posts/ai-teams-are-spending-months-on-web-scrapers-that-serpapi-replaces-with-one-api-call-pjoalfsh4) · The New Stack · 1 upvotes · 0 comments
- [Agents Need a New Kind of Web Search](https://daily.dev/posts/agents-need-a-new-kind-of-web-search-wibepp98q) · Daily Dose of Data Science \| Avi Chawla \| Substack · 1 upvotes · 0 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#markdown](https://daily.dev/tags/markdown), [#context-engineering](https://daily.dev/tags/context-engineering)

[View this post on daily.dev](https://daily.dev/posts/what-s-actually-inside-24-723-tokens-of-a-search-result-we-broke-it-down-field-by-field-pu1zqycjt)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"What’s Actually Inside 24,723 Tokens of a Search Result? We Broke It Down, Field by Field","url":"https://daily.dev/posts/what-s-actually-inside-24-723-tokens-of-a-search-result-we-broke-it-down-field-by-field-pu1zqycjt","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/what-s-actually-inside-24-723-tokens-of-a-search-result-we-broke-it-down-field-by-field-pu1zqycjt"},"datePublished":"2026-09-18T10:39:47.923Z","dateModified":"2026-09-18T10:42:03.522Z","description":"SerpApi now offers a Markdown output option alongside its standard JSON responses, aimed at reducing the token overhead AI agents incur when parsing search...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/bc30f871d597373d72eeb351dc9dcf21?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/bc30f871d597373d72eeb351dc9dcf21?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Machine Learning Mastery","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Machine Learning Mastery","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/795781ffb32446c39eba040feb64f505","url":"https://daily.dev/sources/mlm"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/what-s-actually-inside-24-723-tokens-of-a-search-result-we-broke-it-down-field-by-field-pu1zqycjt","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ai-agents,markdown,context-engineering","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Machine Learning Mastery","item":"https://daily.dev/sources/mlm"},{"@type":"ListItem","position":3,"name":"What’s Actually Inside 24,723 Tokens of a Search Result? We Broke It Down, Field by Field"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/what-s-actually-inside-24-723-tokens-of-a-search-result-we-broke-it-down-field-by-field-pu1zqycjt#faq","mainEntity":[{"@type":"Question","name":"How much can Markdown output reduce token usage compared to JSON for SerpApi search results?","acceptedAnswer":{"@type":"Answer","text":"Markdown output reduces token usage by about 74 percent compared to JSON for SerpApi search results. A 'coffee' search that required 24,723 tokens in JSON dropped to 6,435 tokens in Markdown, and applying additional field restriction with json_restrictor cut it further to just 1,298 tokens for a more limited view. daily.dev surfaces practical token-optimization techniques for developers building AI agent pipelines."}},{"@type":"Question","name":"How do I request Markdown output instead of JSON from SerpApi?","acceptedAnswer":{"@type":"Answer","text":"Request Markdown output from SerpApi by adding the output=md query parameter to an existing search call, calling the /search.md endpoint instead of /search, or setting the Accept: text/markdown request header. This works across all of SerpApi's 100+ APIs at no extra cost and returns YAML frontmatter, tables, and inline links while stripping internal tracking fields. Developers tuning API responses for LLM context limits can track format changes like this on daily.dev."}},{"@type":"Question","name":"When should I use JSON instead of Markdown output for search API results in an AI pipeline?","acceptedAnswer":{"@type":"Answer","text":"JSON is the better choice when a pipeline depends on precise numeric data types, such as prices, coordinates, or ratings as floats, or needs structured arrays for downstream processing. For example, a Naver Shopping JSON result exposes price, old_price, coupon_price as integers and rating as a float, which a pricing engine needs but an LLM summarizer does not. Choosing between data formats for an AI workflow is easier when tracking these trade-offs on daily.dev."}}]}
```

