mdapi

Web pages in, LLM-ready Markdown or structured JSON out. Paid per call over x402. No signup, no API key, no account.

$0.005 USDC per call, on Base. You pay per request with a signed payment header — there is nothing to create, nothing to cancel, and no minimum.

Just want to convert one page by hand? Use the free URL to Markdown converter in your browser — no payment, no setup.

Endpoints

Both take the same body: {"url": "https://…"} (fetched server-side) or {"html": "<html>…"} (raw source you already have). Optional mode is article (default — main content only) or full (whole body). POST /md also accepts render:true — it runs the page through a real headless browser first, so JavaScript-rendered SPAs (React/Next/Vue) that return empty HTML to a plain fetch come back with their real content. That is the one thing a free self-hosted converter can't do.

POST /md

Give it a URL, get back LLM-ready Markdown with the nav, cookie banners, ads, scripts, and footers stripped out. Readability article extraction keeps tables and code blocks. Optional render:true executes JavaScript in a headless browser for SPAs (React/Next/Vue) that a plain fetch returns empty.

curl -X POST https://md.fastdb.in/md \
  -H 'content-type: application/json' \
  -d '{"url":"https://example.com/article"}'

Returns: markdown title byline excerpt mode words url rendered ms

Example response
{
  "markdown": "# Title\n\nBody...",
  "title": "Title",
  "byline": "Author name or null",
  "mode": "article",
  "words": 7139,
  "rendered": false
}

POST /extract

Web data extraction for AI agents, RAG ingestion, and LLM pipelines: title, byline, publish time, plain text, and every link and image on the page, absolutized and deduped.

curl -X POST https://md.fastdb.in/extract \
  -H 'content-type: application/json' \
  -d '{"url":"https://example.com/article"}'

Returns: title byline excerpt siteName publishedTime lang text words links images meta

Example response
{
  "title": "Title",
  "siteName": "Example",
  "publishedTime": "2026-01-01T00:00:00Z",
  "words": 2037,
  "links": [
    {
      "href": "https://example.com/abs",
      "text": "link text"
    }
  ]
}

Paying for a call

This API speaks x402. The flow is standard, and any x402 client library does it for you:

  1. POST without payment. You get 402 Payment Required and a JSON body describing exactly what to pay: amount, asset (USDC on Base), and recipient.
  2. Sign that payment authorization with your wallet and retry the same POST with an X-PAYMENT header.
  3. You get your 200 and the result. The facilitator settles USDC on-chain.

You never need ETH for gas — the facilitator sponsors it — and this API never holds your funds. Payment goes buyer → 0x072F3a2bD93bB75b1Eb84a9E45D17a4F90a6D801 directly.

Requests that fail get no payment taken: the paywall settles only after the handler succeeds.

MCP server

Agents that speak MCP can use these endpoints as tools — html_to_markdown and extract_page — instead of raw HTTP:

Discovery

This same URL returns the machine-readable catalog to anything that isn't a browser:

curl https://md.fastdb.in/