Use the Accept Header to Serve Markdown Instead of HTML to LLMs
skeptrune.com·1w·
Discuss: Hacker News

September 27, 2025 , Nicholas Khami

Agents don’t need to see websites with markup and styling; anything other than plain Markdown is just wasted money spent on context tokens.

I decided to make my Astro sites more accessible to LLMs by having them return Markdown versions of pages when the Accept header has text/plain or text/markdown preceding text/html. This was very heavily inspired by this post on X from bunjavascript.

Hopefully this helps SEO too, since agents are a big chunk of my traffic. The Bun team reported a 10x token drop for Markdown and frontier labs pay per token, so cheaper pages should get scraped more, be more likely to end up in training data, and give me a little extra lift from assistants and sear…

Similar Posts

Loading similar posts...