Documentation as markdown
How to create LLM ready documentation
Kiko Beats
February 6, 2026 ()
We shipped a simple improvement: every Microlink documentation page can now be consumed as markdown.
# human readable version
curl https://microlink.io/docs/api/getting-started/overview
# LLM ready version
curl https://microlink.io/docs/api/getting-started/overview.mdAlternatively you can specify markdown as content type:
curl -H 'Accept: text/markdown' https://microlink.io/docs/api/getting-started/overviewWhy this matters
Documentation consumption has changed.
It is no longer just humans reading pages in a browser. Today, teams paste docs into AI tools, agents fetch references from links, and IDE copilots benefit from clean markdown inputs.
Markdown is the most practical format for LLM context windows: fewer layout artifacts, cleaner hierarchy, less noise. It also makes copy/paste workflows faster for developers using ChatGPT, Claude, Codex, Cursor, or internal agents.
The key benefit for us was architectural: one canonical docs source, multiple delivery formats. We avoided maintaining a separate markdown documentation system while still exposing machine-friendly content.
How we implemented it
Some time ago, we shipped text, markdown, and HTML serialization as part of MQL data rules, using attr (and an optional selector) to define how to extract content.
We also shipped quick aliases so you can serialize any URL via
html.microlink.io, text.microlink.io, or markdown.microlink.io:curl https://markdown.microlink.io/https://example.comThose endpoints are just aliases for creating an extraction rule:
const url = 'https://microlink.io/docs/api/getting-started/overview'
const { data } = await mql(url, {
apiKey,
data: {
markdown: {
attr: 'markdown' // # the magic!
}
},
meta: false
})
console.log(data.markdown)The code above is exactly the code we are using: 14 lines of code to have a markdown version of your documentation. No more, no less.
We only need to run that code in our pipeline to generate an accurate markdown representation of production URLs.
Additionally, at Vercel, we added a rewrite for docs routes:
{
"source": "/docs/(.*)",
"destination": "/docs/$1.md",
"has": [
{
"type": "header",
"key": "accept",
"value": ".*text/markdown.*"
}
]
}So consumers can request the same URL and choose format via headers.
Why Microlink API made this easy
The hard part of markdown endpoints is to have a realible html-to-markdown conversion.
When Microlink API is instructed to return markdown, it runs a content-cleaning pipeline first. In practice, that means:
- Removing headers, footers, and navigation chrome.
- Removing hidden and non-content elements.
- Keeping the primary textual content and structure.
- Normalizing links and formatting for consistent markdown output.
- Returning a clean result ready for copy/paste or agent consumption.
- and a lot of more stuf we tested against tons of documentation sites.
Just after that the content can be serialized into high quality markdown that represents the main content of the target URL.
Join the community
All of these improvements or features are community driven: We listen to your feedback and act accordingly.
Whether you are building a product, an indie developer, or just interested in web technologies, come chat with us.