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
Any webpage to markdown,
one API call away
80% fewer tokens
Flexible scope control
YAML frontmatter metadata
Sub-second cached responses
URL to markdown API
in JavaScript, Python, Ruby, PHP & Golang
The following examples show how to use the Microlink API with CLI, cURL, JavaScript, Python, Ruby, PHP & Golang, targeting 'https://docs.stripe.com/api' URL with 'data' & 'embed' API parameters:
CLI Microlink API example
microlink markdown https://docs.stripe.com/apicURL Microlink API example
curl -G "https://api.microlink.io" \
-d "url=https://docs.stripe.com/api" \
-d "data.markdown.attr=markdown" \
-d "embed=markdown"JavaScript Microlink API example
import createClient from 'microlink.io'
const microlink = createClient()
const markdown = await microlink.markdown('https://docs.stripe.com/api')Python Microlink API example
import requests
url = "https://api.microlink.io/"
querystring = {
"url": "https://docs.stripe.com/api",
"data.markdown.attr": "markdown",
"embed": "markdown"
}
response = requests.get(url, params=querystring)
print(response.text)Ruby Microlink API example
require 'uri'
require 'net/http'
base_url = "https://api.microlink.io/"
params = {
url: "https://docs.stripe.com/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://docs.stripe.com/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://docs.stripe.com/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 createClient from 'microlink.io'
const microlink = createClient()
const markdown = await microlink.markdown('https://docs.stripe.com/api')Free to start, scales when ready
Free
Pro
- Everything in Free
- Automatic proxy resolution
- Configurable TTL
- Custom HTTP headers
- Custom cache key
- Priority email support
Business & Enterprise
- Everything in Pro, plus:
- Card or invoice, PO number, net 30
- NDA, DPA & service agreement
- Vendor assessments on request
- Same named contact
- Annual billing, 10% discount
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 more content per context window
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.
One conversion problem, one recipe.
Frontmatter metadata, content-only conversions, LLM context, office documents, YouTube transcripts and more. Each use case shows the exact options and the code to run.
Markdown with metadata frontmatter
Clean Markdown, no boilerplate
LLM context from any URL
PDF and office documents to Markdown
YouTube transcripts as Markdown
Markdown from JavaScript-rendered pages
Product Information
Everything you need to know about
Microlink URL to markdown API.
What is Microlink Markdown?
Why do AI agents prefer markdown over HTML?
How much do I save on tokens by converting to markdown?
Does it work on any website?
How does Microlink compare to other URL to markdown providers?
Can I control what content is extracted?
Can I get metadata alongside the markdown?
How do I integrate it?
Where can I see all parameters?
Is the URL to markdown API free?
What is a URL to markdown service and how does it work?
How do I convert a web page to markdown for AI or LLMs?
markdown.microlink.io/{url} for quick scripts and pipeline prototyping. Try it live in our interactive URL to Markdown tool.