You already have the HTML. Get the markdown.
Transform never touches the network. POST stored pages or PDF bytes and clean markdown, text, or sanitized HTML comes back, starting at 0.1 credits per document. No browser, no proxy, nothing re-fetched.
POST /transform
{
"data": [{ "html": "<h1>Hello</h1><p>World</p>" }],
"return_format": "markdown"
}{ "content": ["# Hello\nWorld"] }Verbatim response. 0.1 credits, one round trip.
One page, three outputs.
A real 891-byte page, sent to POST /transform with three different settings. The responses are shown unedited, byte counts included.
<body><nav class="site-nav"><a href="/">Home</a> <a href="/pricing">Pricing</a> <a href="/blog">Blog</a></nav><div class="cookie-banner">We use cookies. <a href="/privacy">Learn more</a></div><article class="post" data-id="8412"> <h1 class="post-title">Rate limiting the ingest queue</h1> <p>Workers fell over at <strong>40k jobs/min</strong>. The fix, with numbers.</p> <table class="data-grid"> <tr><th>Queue</th><th>p95 before</th><th>p95 after</th></tr> <tr><td>ingest</td><td>2,140 ms</td><td>310 ms</td></tr> <tr><td>webhooks</td><td>980 ms</td><td>120 ms</td></tr> </table> <p>Details in <a href="/docs/rate-limits">the docs</a>.</p></article><div class="share"><a href="https://x.com/share">Share</a></div><aside class="promo"><h3>Try Pro free</h3><p>14-day trial.</p></aside><footer>© 2026 Acme · <a href="/terms">Terms</a></footer></body>
"return_format": "markdown" 314 bytes, 65% smallerWe use cookies. [Learn more](/privacy)# Rate limiting the ingest queueWorkers fell over at **40k jobs/min**. The fix, with numbers.|Queue|p95 before|p95 after||ingest|2,140 ms|310 ms||webhooks|980 ms|120 ms|Details in [the docs](/docs/rate-limits).[Share](https://x.com/share)### Try Pro free14-day trial.
Nav, footer, script, and style are gone without any flags. The dimmed lines are what survives, the cookie notice and promo are ordinary divs. Table rows, links, and bold all made it through.
Better than the turndown call in your repo?
A markdown library converts whatever you hand it, faithfully. On a real page, faithful means the cookie banner ships to your model.
The junk is already handled
Markdown and text modes drop nav, footer, script, and style blocks on their own. Turn on readability and reader-mode extraction keeps the article alone, cookie banners and promos included in what goes.
Links come back absolute
Send the source url with each document and relative hrefs resolve against it, so the markdown still points at real pages once it leaves your pipeline.
Structure survives
Tables arrive as pipe rows, pre blocks as fenced code, bold and inline code intact. Headings keep their levels, so chunking on ## still works.
It scales past one document
The data field is an array. Convert a whole collection of saved pages in one request, up to 10 MB, and PDF bytes go through the same endpoint, OCR included.
When the library is enough
Short, clean fragments you control convert fine with turndown. Transform earns its 0.1 credits on whole pages, the kind with three navs and a cookie modal.
What it costs.
There is no fetch in the price because there is no fetch: no proxy, no browser, no retry budget. The spend that matters sits downstream anyway. The sample above shed 74 percent of its bytes on the way to markdown, and that saving repeats in every prompt the content ever enters.
After your fetcher, before your model.
Transform converts what you already hold, wherever it came from.
Crawler cache
You paid to fetch it once. Converting the stored HTML costs 0.1 credits per document, not a second fetch and not a browser session.
Webhooks and email
HTML that arrives on its own: newsletters, notification payloads, scraped inboxes. Send it as it lands, markdown comes back ready for the index or the model.
PDF archives for RAG
Research papers, 10-Ks, contracts. Structured markdown with headings, tables, and reading order kept, scanned documents handled by OCR.
CMS migration
Export rendered HTML from the old system, import markdown into the static site or headless CMS. Batch an array of pages per request.
Five parameters. The whole endpoint.
Everything /transform accepts fits on one screen. The full request and response schema is in the reference.
data required · object listThe documents to convert, as { html, url } objects. url is optional and used to resolve links when readability is on.
return_format optional · string | arraymarkdown, commonmark, raw, text, xml, bytes, or empty.
default: rawreadability optional · booleanReader-mode extraction, the same algorithm behind Safari Reader. Keeps the main content and drops the rest.
default: falseclean optional · booleanCleans the markdown or text output for AI use, removing footers, navigation, and similar boilerplate.
default: falseclean_full optional · booleanStrips unwanted attributes from HTML output: classes, IDs, and inline styles.
default: falseYour first request, in your stack.
The SDKs return the response JSON as is: content is an array, one string per document you sent.
from spider import Spider
client = Spider()
result = client.transform(
[{ "html": "<h1>Hello</h1><p>World</p>" }],
params={ "return_format": "markdown" },
)
print(result["content"][0])
# "# Hello\nWorld"More from the API.
Send the HTML you are sitting on.
One call, clean markdown back, starting at 0.1 credits per document.