Web page to Markdown API
Send a page URL, get clean Markdown or text for an LLM: main content, headings, tables, code blocks and links.
- Main content as Markdown or plain text, with code blocks, tables, links and headings kept
- Up to 100,000 output characters a call (20,000 by default), or one section by its ID
- Pages that build their content with JavaScript: the rendered reader loads them in a real browser
- Empty pages, browser challenges and errors are never charged
No account to create. Failed calls are never charged.
One request
curl -H "Authorization: Bearer $API_KEY" \
"https://agent-data-tools.revmesh2074.workers.dev/extract?url=https%3A%2F%2Fexample.com"
Python
import os, requests
r = requests.get(
"https://agent-data-tools.revmesh2074.workers.dev/extract",
params={
"url": "https://example.com",
},
headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
timeout=60,
)
r.raise_for_status()
print(r.json())
Node.js
const params = new URLSearchParams({
url: "https://example.com",
});
const r = await fetch(`https://agent-data-tools.revmesh2074.workers.dev/extract?${params}`, {
headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
if (!r.ok) throw new Error(await r.text());
console.log(await r.json());
The answer
{
"url": "https://agent-data-tools.revmesh2074.workers.dev/examples/extract/sources/short-article.html",
"finalUrl": "https://agent-data-tools.revmesh2074.workers.dev/examples/extract/sources/short-article.html",
"status": 200,
"contentType": "text/html;charset=utf-8",
"sourceFormat": "html",
"linkBaseUrl": "https://agent-data-tools.revmesh2074.workers.dev/examples/extract/sources/short-article.html",
"sourceMetadata": {
"verification": "not_verified",
"authors": [],
"dates": [],
"truncated": false
},
"title": "Owned sample: short article",
"description": null,
"lang": "en",
"canonical": null,
"headings": [
{
"level": 1,
"text": "A short release note",
"id": null
}
],
"section": null,
"links": [],
"tables": [],
"codeBlocks": [],
"contentSelection": "main",
"warnings": [],
"format": "text",
"text": "A short release note\n\nVersion 1.1.1 preserves literal code whitespace and nested list structure.\n\nThe price remains $0.002 per successful extraction. This is an owned sample, not a purchase receipt.",
"textLength": 198,
"truncated": false,
"contentHash": "sha256:6cd3137dc4735c9ab317c764c78b47712dc9ca8eabe435dd0db9142bdaacbe2c",
"hashFormat": "text",
"fetchedAt": "2026-10-16T11:06:01.780Z"
}
Pricing
One API key, paid by card through Stripe. $0.002 per successful call with a key; failed calls cost nothing.
A plan adds its credits each month when the payment succeeds; unused credits stay, and you can cancel at any time. Packs never expire. After paying you get your key on the next page. The same key works on every tool in the catalog. Details: credits and plans.
Inputs
| Name | Type | Description |
|---|---|---|
url (required) | string | Absolute http(s) URL of the page to fetch |
maxChars | integer | Maximum characters of body text to return (500-100000, default 20000) |
format | string | Returned representation: text (default), markdown, or both. HTML structured details are included in every format; Markdown/plain sources have empty details. |
section | string | Optional exact visible HTML ID within primary content, 1-500 characters. Heading scope includes subsections until next same/higher-level heading; section/article/main/div scope is its subtree. Missing/ambiguous/unsupported targets fail uncharged. URL fragments alone do not select a section. |
What it does not do
- Public pages only: no logins or paywalls.
- The static reader does not run JavaScript; use the rendered reader for single-page apps.
Also on the same key
- Web page to Markdown, rendered: a JavaScript-rendered page as text or Markdown · $0.01 a call
- PDF to text, PDF text extraction: extract the text of a PDF document from a URL, page by page · $0.002 a call
- Sitemap parser, URL extractor: documentation URLs from a bounded XML sitemap · $0.002 a call
Questions
Does it render JavaScript?
The static reader does not. The rendered reader loads the page in a real browser first and returns the same output; it costs more per call.
How much of a page do I get?
20,000 characters by default and up to 100,000 a call. Pass a section ID to read one part of a long page.
What is not charged?
Empty pages, missing sections, browser challenges and errors.
Is there a subscription?
There is a monthly plan and there are one-off credit packs. Both give one API key; a plan adds credits each month and unused credits stay.
Guides
For AI agents
The same tool is on the MCP server https://agent-data-tools.revmesh2074.workers.dev/mcp (the first 25 successful calls are free), and an agent with a wallet can pay per call in USDC: the tool URL answers 402 Payment Required with x402 and MPP terms. Reference: tool page · OpenAPI · docs for agents.