By output · HTML to markdown
URL to markdown API: webpage to markdown and HTML to markdown in one call
The short answer
An HTML to markdown API converts a live web page into clean markdown in one call: it fetches the URL, renders the JavaScript, strips the navigation, ads and scripts, and returns just the content with headings, lists, tables and links intact. Markdown matters here because it carries the document structure a model needs while costing far fewer tokens than raw HTML, which is why it has become the default input format for RAG pipelines and AI agents. ClawEngine renders before converting, so single page apps come back complete rather than empty. It runs on public, permitted pages only. Plans start at $39 a month.
Clean markdown & JSON · JavaScript rendered · robots.txt respected
Last updated August 2026
Hit Extract to turn this page into clean, LLM-ready data.
robots.txt respected · public data only
A naive HTML to markdown converter chokes on modern sites, because the content is not in the HTML until JavaScript runs. ClawEngine is an HTML to markdown API that renders the page in a real browser environment first, then converts the resulting DOM into clean markdown with the boilerplate stripped out.
Give it a public URL and you get back tidy markdown that preserves headings, lists, tables and links, ready to embed or index. There is no browser or converter to run on your side. ClawEngine processes public, permitted pages only, respects robots.txt and site Terms of Service, and honors crawl-delay, so the conversion is both clean and compliant.
Worth being straight about where this is and is not the right tool. If you already hold the HTML and the page is plain static markup, a local library like Turndown, html2text or markdownify does the job for free, and you should use one. An API earns its keep when the page needs rendering, when you are converting at volume, or when you want a whole site rather than a single document. That is the line we would draw if you asked us directly.
Any URL in LLM-ready data out
robots.txt respected public data only
Why it works
What you get with HTML to markdown
Renders, then converts
JavaScript runs before conversion, so content that only exists in the rendered DOM makes it into the markdown, unlike a static HTML parser.
Clean, faithful markdown
Headings, lists, tables and links are preserved while ads, navigation and scripts are dropped, so the markdown mirrors the real content.
No browser to run
The rendering and conversion happen in the API, so you skip running and scaling a headless browser just to get markdown.
What it handles
Any URL in, clean structured data out
Point ClawEngine at a public page and it crawls, renders the JavaScript and extracts clean markdown or typed JSON in one call. Define a schema for structured fields, and respect robots.txt and Terms of Service by default.
- Converts any public URL to markdown
- Renders JavaScript before converting
- Strips ads, navigation and scripts
- Preserves headings, lists, tables and links
- Returns LLM-ready, embed-ready output
- Stays on public, permitted pages only
{
"url": "https://example.com/products/atlas",
"title": "Atlas Field Notebook",
"markdown": "# Atlas Field Notebook\n\nDurable...",
"data": {
"name": "Atlas Field Notebook",
"price": 24.00,
"currency": "USD",
"rating": 4.7
},
"links": [ "/products", "/cart" ],
"metadata": { "rendered": true }
}
Why ClawEngine
One API that crawls, renders and extracts
Not a raw HTML dump, not a headless browser fleet to run, and not a brittle parser to maintain. One call crawls a public page, renders its JavaScript and returns clean markdown or typed JSON, built for RAG pipelines and AI agents.
LLM-ready output
Clean markdown or typed JSON with the boilerplate stripped, so the data drops straight into a vector store, a prompt or an agent without a cleanup step.
JavaScript rendered
Each page loads in a real browser environment before extraction, so single-page apps and client-rendered content come back complete, not as an empty shell.
Compliance-first
ClawEngine works on public, permitted data only. It respects robots.txt and site Terms of Service and honors crawl-delay, so responsible scraping is the default.
Code examples
Convert a URL to markdown in one call
Send a public URL and read the markdown out of the response. The second sample crawls a whole documentation site and writes one markdown file per page, which is the usual way teams build a knowledge base from docs.
curl -X POST https://api.clawengine.ai/v1/extract \
-H "Authorization: Bearer $CLAWENGINE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/docs/getting-started",
"format": "markdown",
"render": true
}'
import os, pathlib, requests
headers = {"Authorization": f"Bearer {os.environ['CLAWENGINE_API_KEY']}"}
res = requests.post("https://api.clawengine.ai/v1/crawl", headers=headers, json={
"url": "https://example.com/docs",
"path_prefix": "/docs", # stay inside the docs tree
"limit": 500,
"format": "markdown",
"render": True,
})
res.raise_for_status()
out = pathlib.Path("docs_markdown")
out.mkdir(exist_ok=True)
for page in res.json()["pages"]:
name = page["url"].rstrip("/").split("/")[-1] or "index"
(out / f"{name}.md").write_text(page["markdown"])
print(f"wrote {len(res.json()['pages'])} markdown files")
const res = await fetch("https://api.clawengine.ai/v1/extract", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CLAWENGINE_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
url: "https://example.com/blog/post",
format: "markdown",
render: true,
schema: {
title: "string",
author: "string",
published_at: "string",
},
}),
});
const { markdown, data } = await res.json();
console.log(data.title, data.published_at);
console.log(markdown.slice(0, 500));
People also ask
HTML to markdown API: the questions buyers ask
What is an HTML to markdown API?
It is a hosted endpoint that takes a URL, loads the page, and gives you back markdown instead of HTML. The service handles the fetch, the JavaScript rendering and the cleanup, so you receive the article content with its heading structure preserved and the navigation, ads and scripts removed. You call it like any REST API and get text you can embed, index or pass to a model directly.
How do I convert a URL to markdown?
Send the URL to a conversion endpoint and read the markdown out of the response. With ClawEngine that is a single POST with the URL and a format of markdown, and the reply contains the cleaned document. Doing it locally instead means fetching the page yourself, running a headless browser if the site is JavaScript-heavy, and then passing the DOM through a converter library.
Why convert HTML to markdown for LLMs?
Raw HTML spends most of its tokens on markup, classes and scripts that carry no meaning, which inflates cost and buries the actual content. Markdown keeps the parts a model needs, headings, lists, tables and emphasis, in a fraction of the tokens. Cleaner input also produces measurably better retrieval, because the embedded chunks contain content rather than boilerplate.
Can I convert HTML to markdown for free?
Yes, if you already have the HTML. Turndown for JavaScript, html2text and markdownify for Python are free, mature libraries that convert markup you hold locally, and for static pages they are the correct choice. What they cannot do is fetch and render the page. On a site that builds its content client-side, the HTML you feed the library is an empty shell, and that is the gap an API fills.
How do I convert a whole website to markdown?
Crawl it rather than converting page by page. Give the crawl endpoint a seed URL, a path prefix to stay inside and a page limit, and it walks the site and returns one markdown document per page in the same shape. That is the usual way teams turn a documentation site into a knowledge base, and it is one job instead of thousands of individual conversions.
Does an HTML to markdown API handle JavaScript-rendered pages?
Only if it renders, and many do not. A converter that reads the raw HTTP response sees whatever the server sent, which on a React or Vue site is often a nearly empty document. ClawEngine loads each page in a real browser environment and waits for the content to build before converting, so client-side content and lazy-loaded sections appear in the markdown just like static markup.
Does markdown conversion preserve tables and links?
Yes. Tables become pipe tables, links keep their href targets, and headings map to their matching markdown levels, so the document hierarchy survives the conversion. That matters more than it sounds: chunking a document for retrieval usually splits on headings, and a converter that flattens them to plain text destroys the structure your pipeline depends on.
Good questions
Questions about HTML to markdown
Explore more
More ways to turn the web into data with ClawEngine
LLM-ready data
Web content cleaned, structured and formatted for models to use.
Learn moreScrape a website to JSON
Get any public page back as clean, structured JSON your code can use.
Learn moreScrape a website to CSV
Turn a listing page or a whole site into spreadsheet rows, one line per item.
Learn moreStop wrangling raw HTML. Get LLM-ready data.
Point ClawEngine at a public page and one call crawls, renders the JavaScript and extracts clean markdown or typed JSON, ready for your RAG pipeline or AI agent. Public, permitted data only.
Crawl · render JS · extract markdown & JSON · robots.txt respected, public data only