<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: SerpKite</title>
    <description>The latest articles on DEV Community by SerpKite (@serpkite).</description>
    <link>https://dev.to/serpkite</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4174238%2F87a36964-7d93-4725-b742-9a4bd4890fe1.jpg</url>
      <title>DEV Community: SerpKite</title>
      <link>https://dev.to/serpkite</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/serpkite"/>
    <language>en</language>
    <item>
      <title>JSON vs Markdown SERPs: we measured tokens</title>
      <dc:creator>SerpKite</dc:creator>
      <pubDate>Fri, 09 Oct 2026 21:22:01 +0000</pubDate>
      <link>https://dev.to/serpkite/json-vs-markdown-serps-we-measured-tokens-m5l</link>
      <guid>https://dev.to/serpkite/json-vs-markdown-serps-we-measured-tokens-m5l</guid>
      <description>&lt;p&gt;When an agent calls a search tool, the whole response lands in the model's context. You pay for every token, and the model has to read past every one of them to find the three links that matter. So the format of a SERP response is not a detail: it is a cost line and a quality lever.&lt;/p&gt;

&lt;p&gt;We took one Google results page and rendered it three ways.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;These are &lt;strong&gt;estimates on a single sample&lt;/strong&gt;, not a benchmark. The sample is an abridged results page (an answer box, three organic results, two People Also Ask questions, three related searches). Tokens are estimated at about 4 characters per token. Real pages are bigger and real tokenizers differ. The ratios are what to take away.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The results
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Format&lt;/th&gt;
&lt;th&gt;Estimated tokens&lt;/th&gt;
&lt;th&gt;vs pretty JSON&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;JSON, pretty-printed&lt;/td&gt;
&lt;td&gt;668&lt;/td&gt;
&lt;td&gt;baseline&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;JSON, minified&lt;/td&gt;
&lt;td&gt;534&lt;/td&gt;
&lt;td&gt;-20%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;compact JSON&lt;/td&gt;
&lt;td&gt;248&lt;/td&gt;
&lt;td&gt;-63%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Markdown&lt;/td&gt;
&lt;td&gt;240&lt;/td&gt;
&lt;td&gt;-64%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;On this sample, Markdown is about 64% smaller than pretty JSON, and compact JSON about 63%. That is in line with the 60-80% reduction we see on full pages. For scale: a full, unfiltered Google SERP as JSON can reach roughly 24,700 tokens once every widget, sitelink and thumbnail is included. At that size the format choice is the difference between a cheap tool call and an expensive one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the tokens go in JSON
&lt;/h2&gt;

&lt;p&gt;Most of a JSON SERP is structure, not content: repeated keys (&lt;code&gt;"position"&lt;/code&gt;, &lt;code&gt;"title"&lt;/code&gt;, &lt;code&gt;"link"&lt;/code&gt;, &lt;code&gt;"snippet"&lt;/code&gt;), quotes, braces, indentation, and fields the model never uses (the request echo, metadata, sitelinks, thumbnails). Minifying helps with whitespace but keeps every key.&lt;/p&gt;

&lt;h2&gt;
  
  
  Compact: JSON for tools
&lt;/h2&gt;

&lt;p&gt;Compact JSON keeps the structure but shortens keys and drops fields agents rarely read. Use it when a program, not the model, consumes the output, or when your tool schema needs structured fields.&lt;/p&gt;

&lt;h2&gt;
  
  
  Markdown: text for models
&lt;/h2&gt;

&lt;p&gt;Markdown renders the page as prose with numbered links. Models read it the way they read any document, and citations stay attached to URLs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# best espresso machine 2026&lt;/span&gt;

&lt;span class="gu"&gt;## Results&lt;/span&gt;
&lt;span class="p"&gt;1.&lt;/span&gt; &lt;span class="gs"&gt;**The Best Espresso Machines of 2026, Tested and Reviewed**&lt;/span&gt; — example.com
   https://www.example.com/best-espresso-machines
   We pulled more than 1,200 shots on 42 machines to find the best espresso makers for every budget.
&lt;span class="p"&gt;2.&lt;/span&gt; &lt;span class="gs"&gt;**Espresso Machine Buying Guide (2026)**&lt;/span&gt; — coffee.example.org
   https://coffee.example.org/guides/espresso
   Single boiler, heat exchanger or dual boiler? What the specs mean.

&lt;span class="gu"&gt;## People also ask&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**What is the #1 rated espresso machine?**&lt;/span&gt; Reviewers most often rank dual-boiler machines with PID control at the top…

&lt;span class="gu"&gt;## Related searches&lt;/span&gt;
best espresso machine under $500 · best espresso machine for beginners
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Going further: project the fields
&lt;/h2&gt;

&lt;p&gt;If your agent only needs titles, links and the knowledge graph, ask for just those:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"q"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"best espresso machine 2026"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"fields"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"results.title,results.link,knowledge_graph"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Log an estimated token count per call (we return it in an &lt;code&gt;X-Tokens-Estimate&lt;/code&gt; response header) so you can see what each tool call actually costs you.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we recommend
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Agent reads the results directly:&lt;/strong&gt; Markdown.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code post-processes the results:&lt;/strong&gt; compact JSON or field projection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You store results or need every field:&lt;/strong&gt; full JSON.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We built this into &lt;a href="https://serpkite.com" rel="noopener noreferrer"&gt;SerpKite&lt;/a&gt;, a Google SERP API for AI agents, where the three formats cost the same (1 credit per page). You can try them on your own queries in the &lt;a href="https://serpkite.com/tools/serp-token-counter" rel="noopener noreferrer"&gt;SERP token counter&lt;/a&gt;, and the parameters are in the &lt;a href="https://serpkite.com/docs" rel="noopener noreferrer"&gt;docs&lt;/a&gt;. Whichever API you use, measure your own pages before you pick a format.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://serpkite.com/blog/json-vs-markdown-serp-tokens" rel="noopener noreferrer"&gt;https://serpkite.com/blog/json-vs-markdown-serp-tokens&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>api</category>
      <category>webdev</category>
      <category>llm</category>
    </item>
  </channel>
</rss>
