URL to markdown API for AI agents
The URL to markdown API that converts any web page to clean markdown with 80% fewer tokens than raw HTML. Built for AI agent crawling, LLM ingestion, and RAG pipelines.
Send the URL Get clean markdown back
2.0
secs
P95 cold response
—
loading…
99.9
%
SLA Guaranteed
Any webpage to markdown,
one API call away
Markdown
HTML
80% fewer tokens
Markdown reduces token usage by 80% compared to raw HTML. A 20,000-token page becomes 4,000 tokens — fit 5x more content into every LLM context window.
Flexible scope control
Extract the whole page, narrow to a CSS selector like main or article, or combine multiple selectors with fallback arrays for precise content targeting.
YAML frontmatter metadata
Enable the meta parameter to get title, author, date, description, word count, and reading time as structured YAML frontmatter prepended to the markdown output.
Sub-second cached responses
Cached responses return in milliseconds from 240+ Cloudflare edge locations. Configure TTL caching rules to keep your content fresh with minimal latency.
URL to markdown API
in
Microlink URL to markdown API delivers enterprise-grade URL to markdown conversion through a developer-friendly REST API endpoint.
The following examples show how to use the Microlink API with CLI, cURL, JavaScript, Python, Ruby, PHP & Golang, targeting 'https://stripe.com/docs/api' URL with 'data' & 'embed' API parameters:
CLI Microlink API example
microlink https://stripe.com/docs/api&data.markdown.attr=markdown&embed=markdowncURL Microlink API example
curl -G "https://api.microlink.io" \
-d "url=https://stripe.com/docs/api" \
-d "data.markdown.attr=markdown" \
-d "embed=markdown"JavaScript Microlink API example
import mql from '@microlink/mql'
const { data } = await mql('https://stripe.com/docs/api', {
data: {
markdown: {
attr: "markdown"
}
},
embed: "markdown"
})Python Microlink API example
import requests
url = "https://api.microlink.io/"
querystring = {
"url": "https://stripe.com/docs/api",
"data.markdown.attr": "markdown",
"embed": "markdown"
}
response = requests.get(url, params=querystring)
print(response.json())Ruby Microlink API example
require 'uri'
require 'net/http'
base_url = "https://api.microlink.io/"
params = {
url: "https://stripe.com/docs/api",
data.markdown.attr: "markdown",
embed: "markdown"
}
uri = URI(base_url)
uri.query = URI.encode_www_form(params)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
response = http.request(request)
puts response.bodyPHP Microlink API example
<?php
$baseUrl = "https://api.microlink.io/";
$params = [
"url" => "https://stripe.com/docs/api",
"data.markdown.attr" => "markdown",
"embed" => "markdown"
];
$query = http_build_query($params);
$url = $baseUrl . '?' . $query;
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET"
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #: " . $err;
} else {
echo $response;
}Golang Microlink API example
package main
import (
"fmt"
"net/http"
"net/url"
"io"
)
func main() {
baseURL := "https://api.microlink.io"
u, err := url.Parse(baseURL)
if err != nil {
panic(err)
}
q := u.Query()
q.Set("url", "https://stripe.com/docs/api")
q.Set("data.markdown.attr", "markdown")
q.Set("embed", "markdown")
u.RawQuery = q.Encode()
req, err := http.NewRequest("GET", u.String(), nil)
if err != nil {
panic(err)
}
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
panic(err)
}
fmt.Println(string(body))
}import mql from '@microlink/mql'
const { data } = await mql('https://stripe.com/docs/api', {
data: {
markdown: {
attr: "markdown"
}
},
embed: "markdown"
})Last month usage
641M
reqs per month
7%
cache hit rate
14TB
data served
some clients
Free to start, scales when ready
No login required. No credit card needed. URL to markdown API free to use — just start calling it.
Free
$0
/month
Markdown API free — 50 requests/day, no login, no credit card.
Markdown extraction
CSS selector scoping
Metadata + YAML frontmatter
Adblock & cookie banners
Headless browser rendering
Pro
€39
/month
46,000 requests/month for production workloads.
Built on open source,
trusted by developers
The Microlink markdown engine is powered by battle-tested open source libraries used by thousands of developers worldwide. Explore the code, contribute, or run it yourself.
Try it live, right now
Skip the setup. Our interactive markdown tool lets you test the API instantly — paste any URL, configure options, and see the result in real time.
80% fewer tokens per page 5x more content per context window
A markdown converter for LLMs: 20,000 HTML tokens becomes 4,000 markdown tokens.
Feed more content into every LLM call and cut inference costs at scale.
Feed more content into every LLM call and cut inference costs at scale.
The best URL to markdown service, with no compromises.
No more custom scrapers or brittle parsing — our URL to markdown API lets you convert any web page to markdown with easy integration via the URL to Markdown API documentation.
Token Efficient by Default
Return clean markdown instead of HTML noise so your agents spend context budget on meaning, not markup. 80% fewer tokens on average.
Works on Any Website
Our HTML to markdown converter processes any public URL without the target site needing CDN opt-in or special configuration. The entire web is your dataset.
Built for Agent Workloads
Purpose-built for AI crawling, summarization, RAG indexing, LangChain, LlamaIndex, and large-scale LLM data preparation.
Streaming Friendly
Compact markdown payloads move cleanly through queues, workers, and inference services with lower latency than HTML.
Metadata Included
Pair markdown content with structured metadata — title, description, author, date — for better chunking, ranking, and traceability.
Fast Integration
Ship quickly from browser demos, server workers, or SDK clients. One URL in, clean markdown out. Minimal glue code.
Flexible Scope Control
Extract the whole page, narrow to a CSS selector like main or article, or combine multiple selectors with fallback arrays for precise content targeting.
YAML Frontmatter
Enable the meta parameter to prepend structured YAML frontmatter — title, author, date, description — for downstream chunking and traceability.
Shortcut Endpoint
Skip the full API call. Use markdown.microlink.io/{url} for direct markdown output — ideal for quick scripts, curl one-liners, and pipeline prototyping.
Token Efficient by Default
Return clean markdown instead of HTML noise so your agents spend context budget on meaning, not markup. 80% fewer tokens on average.Works on Any Website
Our HTML to markdown converter processes any public URL without the target site needing CDN opt-in or special configuration. The entire web is your dataset.Built for Agent Workloads
Purpose-built for AI crawling, summarization, RAG indexing, LangChain, LlamaIndex, and large-scale LLM data preparation.
Streaming Friendly
Compact markdown payloads move cleanly through queues, workers, and inference services with lower latency than HTML.Metadata Included
Pair markdown content with structured metadata — title, description, author, date — for better chunking, ranking, and traceability.Fast Integration
Ship quickly from browser demos, server workers, or SDK clients. One URL in, clean markdown out. Minimal glue code.
Flexible Scope Control
Extract the whole page, narrow to a CSS selector like main or article, or combine multiple selectors with fallback arrays for precise content targeting.YAML Frontmatter
Enable the meta parameter to prepend structured YAML frontmatter — title, author, date, description — for downstream chunking and traceability.Shortcut Endpoint
Skip the full API call. Use markdown.microlink.io/{url} for direct markdown output — ideal for quick scripts, curl one-liners, and pipeline prototyping.
Start now
Get 50 requests/day free — our URL to markdown API needs no account and no credit card. Just call the API and start converting URLs to markdown in seconds.
No login needed
50 reqs/day free
No credit card
Product Information
Everything you need to know about
Microlink URL to markdown API.
What is Microlink Markdown?
Microlink Markdown is an extraction API that takes any URL and returns clean markdown content ready for AI workflows. It is built on the same Microlink API surface your team already uses for metadata, screenshots, and PDFs.
Use it for crawling, summarization, and RAG ingestion where clean text beats noisy HTML.
Why do AI agents prefer markdown over HTML?
HTML pages are padded with navigation bars, script tags, class attributes, and styling that carry zero semantic value for AI. Markdown's explicit structure lets AI models focus on meaning, not markup, which improves comprehension and reduces LLM API costs at scale.
You can further tune extraction with CSS selector scoping to target only the content your agents need.
How much do I save on tokens by converting to markdown?
On average, markdown reduces token usage by 80% compared to raw HTML. A page costing 20,000 tokens as HTML costs around 4,000 tokens as markdown. Giving you 5x more content per context window.
This directly lowers your LLM API costs and increases how much information you can process per request. Try it instantly in the interactive HTML to Markdown tool.
Does it work on any website?
Yes. Microlink extracts markdown from any public URL. The target website does not need to natively serve markdown or have any special CDN or server-level configuration.
Unlike solutions that require opt-in at the infrastructure layer, Microlink works on the entire web immediately. See delivery and response for production configuration options.
Can I control what content is extracted?
Absolutely. Use the selector parameter to target specific DOM elements — narrow to main, article, or any CSS selector. You can also use fallback arrays that try selectors in order.
Omit the selector entirely to convert the whole page, or combine multiple fields to extract different sections of the same page in a single API call.
Can I get metadata alongside the markdown?
Yes. Set meta: true to prepend a YAML frontmatter block with normalized metadata — title, description, author, publisher, date, word count, and reading time.
This structure supports LLM and RAG pipelines by providing source context without additional requests. See structured metadata extraction for details.
How do I integrate it?
In minutes. Visit our documentation for interactive playground examples, official MQL client (Node.js, Python, Ruby, Go, etc.), and copy-paste code snippets.
Or use the shortcut endpoint markdown.microlink.io/<url> for the simplest possible integration — just an HTTP GET.
Where can I see all parameters?
Visit the Microlink API documentation for parameter details, request examples, and SDK usage guides.
Key parameters include embed for raw markdown output, ttl for cache control, and the data extraction rules for CSS selector scoping.
Is the URL to markdown API free?
Yes. The URL to markdown API is free to use with 50 requests per day — no login, no credit card, and no setup required. Just call the endpoint and get clean markdown back.
For production workloads that need higher volume, automatic proxy rotation, and priority support, see our Pro plans.
What is a URL to markdown service and how does it work?
A URL to markdown service takes any web page URL as input, fetches the page with a full headless browser, strips away HTML noise (ads, navigation, scripts), and returns clean, structured markdown text.
Microlink’s URL to markdown API does this in a single REST call: https://api.microlink.io?url=example.com&data.markdown.attr=markdown. The result is ready for AI agents, RAG pipelines, or any downstream text processing.
How do I convert a web page to markdown for AI or LLMs?
Send the page URL to the Microlink API with the markdown data extraction rule. The API renders the page, removes clutter, and returns clean markdown with up to 80% fewer tokens than raw HTML.
You can also use the shortcut endpoint
markdown.microlink.io/{url} for quick scripts and pipeline prototyping. Try it live in our interactive URL to Markdown tool.