NEW ScrapingAnt MCP for Claude Code, Cursor & Windsurf — try it free →

URL to Markdown API. LLM-ready Markdown from any web page.

One GET to /v2/markdown with a URL returns a JSON object with url and markdown. It takes the same parameters as the general endpoint (headless browser, proxies, cookies, waits), and the response panel is the real one for our fixture article.

1 credit per page without a browser · 10 with the default headless browser · the cost is in the Ant-credits-cost header

$ curl 'https://api.scrapingant.com/v2/markdown?url=https://scrapingant.github.io/scrapingant-examples/fixtures/markdown-article.html' \
    -H 'x-api-key: YOUR_API_KEY'
# pip install requests
import requests

r = requests.get(
    "https://api.scrapingant.com/v2/markdown",
    params={"url": "https://scrapingant.github.io/scrapingant-examples/fixtures/markdown-article.html"},
    headers={"x-api-key": "YOUR_API_KEY"},
    timeout=120,
)
print(r.status_code, r.headers.get("Ant-credits-cost"))
doc = r.json()
print(doc["url"])
print(doc["markdown"])
// Node 22: node --experimental-strip-types request.ts
const url = "https://scrapingant.github.io/scrapingant-examples/fixtures/markdown-article.html";
const res = await fetch(
  "https://api.scrapingant.com/v2/markdown?" + new URLSearchParams({ url }),
  { headers: { "x-api-key": "YOUR_API_KEY" } },
);
const { url: finalUrl, markdown } = (await res.json()) as { url: string; markdown: string };
console.log(res.status, res.headers.get("ant-credits-cost"), finalUrl);
console.log(markdown);
HTTP/2 200 · ant-credits-cost: 10 · content-type: application/json
[Home](/) · [Reviews](/reviews) · [Guides](/guides) · [Pricing](/pricing) ·
[Contact](/contact)

COOKIE-SENTINEL-2b8e: We use cookies to remember your preferences. [Manage
settings](/cookies)

# Ant Farm Deluxe review

The Ant Farm Deluxe is a two-chamber acrylic habitat for harvester ants that
ships with a sand block, a feeding tray and a magnifier, and after six weeks
of daily observation it is the enclosure we would recommend to a first-time
keeper who wants to watch tunnels form without cleaning sand off the kitchen
table every morning.

## What is in the box

  * Two acrylic chambers connected by a 12 cm tube
  * One sand block (blue, 400 g)
  * Feeding tray, water dropper and a 3x magnifier

## Setup in three steps

  1. Soak the sand block for ten minutes and press it into the main chamber.
  2. Connect the tube and check both seals with the supplied key.
  3. Introduce the ants through the top hatch and close it within thirty seconds.
…  (56 lines, 1,824 characters in total)
HTTP/2 200 · ant-credits-cost: 10 · content-type: application/json
{"url":"https://scrapingant.github.io/scrapingant-examples/fixtures/markdown-article.html","markdown":"[Home](/) · [Reviews](/reviews) · [Guides](/guides) · [Pricing](/pricing) ·\n[Contact](/contact)\n\nCOOKIE-SENTINEL-2b8e: We use cookies to remember your preferences. [Manage\nsettings](/cookies)\n\n# Ant Farm Deluxe review\n\nThe Ant Farm Deluxe is a two-chamber acrylic habitat for harvester…  (first 400 bytes of the body as returned; the markdown string continues for 1,824 characters)
<script>window.SENTINEL_SCRIPT = "SCRIPT-SENTINEL-7f3a"; console.log(window.SENTINEL_SCRIPT);</script>
<noscript>NOSCRIPT-SENTINEL-9c1d: this page works without JavaScript.</noscript>
…
<nav aria-label="Site">
  <a href="/">Home</a> · <a href="/reviews">Reviews</a> · <a href="/guides">Guides</a> · <a href="/pricing">Pricing</a> · <a href="/contact">Contact</a>
</nav>
<div class="cookie">COOKIE-SENTINEL-2b8e: We use cookies to remember your preferences. <a href="/cookies">Manage settings</a></div>
<main>
<article>
<h1>Ant Farm Deluxe review</h1>
<p>The Ant Farm Deluxe is a two-chamber acrylic habitat for harvester ants that ships with a san …</p>
…
<h2>Measurements</h2>
<table>
  <thead><tr><th>Metric</th><th>Value</th><th>Unit</th></tr></thead>
  <tbody>
    <tr><td>Chamber volume</td><td>1.8</td><td>litre</td></tr>
  …
</table>
…
<pre><code>def feed(day):
    return "honey water" if day % 2 == 0 else "seed mix"</code></pre>
…
<p><img src="/images/ant-farm-deluxe.jpg" alt="Ant Farm Deluxe with two chambers and a magnifier"></p>
…
</article>
<aside class="sponsored">ASIDE-SENTINEL-5d6f: Sponsored — Ant Supply ships colonies in 48 hours. <a href="/shop">Shop now</a></aside>
</main>
<footer>FOOTER-SENTINEL-4a2c: © Ant Supply fixture. <a href="/privacy">Privacy</a> · <a href="/terms">Terms</a></footer>
[Home](/) · [Reviews](/reviews) · [Guides](/guides) · [Pricing](/pricing) ·
[Contact](/contact)

COOKIE-SENTINEL-2b8e: We use cookies to remember your preferences. [Manage
settings](/cookies)

# Ant Farm Deluxe review
…
## What is in the box

  * Two acrylic chambers connected by a 12 cm tube
  * One sand block (blue, 400 g)
  * Feeding tray, water dropper and a 3x magnifier
…
> Tunnels reached the second chamber on day nine, earlier than the manual
> suggests.
…
ASIDE-SENTINEL-5d6f: Sponsored — Ant Supply ships colonies in 48 hours. [Shop
now](/shop) FOOTER-SENTINEL-4a2c: © Ant Supply fixture. [Privacy](/privacy) ·
[Terms](/terms)
The response

The page in, the page out, as Markdown.

The first tab is an excerpt of our fixture article, the second is what /v2/markdown returned for it. Script and noscript elements are removed; everything else on the page is converted: headings, paragraphs, lists, inline links, tables, code blocks, blockquotes and image alt text. Navigation, the cookie banner and the footer are part of the page, so they come back as Markdown too, and the next section shows how to drop them.

  • Headings, lists, links, tables, code and image alt text converted
  • Script and noscript content gone (checked with sentinel strings)
  • The whole page is converted; use js_snippet to trim it first
What the conversion does, in the docs →
document.querySelectorAll('nav, footer, .cookie, aside').forEach(e => e.remove());

// sent base64-encoded as js_snippet=… together with browser=true
HTTP 200 · Ant-credits-cost: 10 · 1,458 characters (1,824 without the snippet)
# Ant Farm Deluxe review

The Ant Farm Deluxe is a two-chamber acrylic habitat for harvester ants that
ships with a sand block, a feeding tray and a magnifier, and after six weeks
of daily observation it is the enclosure we would recommend to a first-time
keeper who wants to watch tunnels form without cleaning sand off the kitchen
…
Cleanup you control

Drop the navigation before the conversion.

The API does not guess which parts of a page are boilerplate. You decide, in the browser: a base64-encoded js_snippet runs after the page loads, and whatever it removes never reaches the Markdown. With the one-line snippet shown, the fixture came back without its navigation, cookie banner, sponsored block and footer, and with the article intact. js_snippet needs browser=true, so the request costs 10 credits.

  • Any selector you can write in the browser console
  • wait_for_selector for content that arrives late
  • Same call, same response shape
JavaScript execution docs →
PageHTML tokensMarkdown tokensRatioo200k ratio
Fixture article (ours)8644981.7x1.8x
Python tutorial, docs.python.org23,9626,8703.5x3.5x
pandas read_html reference30,0323,5768.4x8.3x
Wikipedia: Markdown168,17316,86410.0x10.0x

Measured 2026-09-24. Raw HTML is the /v2/general response for the same URL with browser=true; tokens counted with tiktoken (cl100k_base; the last column is the o200k_base ratio) on the exact bytes returned. Byte counts are in the packet. Pages change, so re-run the packet for current numbers.

Token counts, measured

Between 1.7× and 10× fewer tokens, depending on the page.

Our short fixture article shrinks by less than half, the Python tutorial by 3.5 times, and the pandas reference page and the Wikipedia article by eight to ten times. The numbers in the table are from one run on the date shown, with the URLs, so you can reproduce them; there is no typical page.

  • Both tokenizers agree within 0.1× on every page
  • Bytes and tokens both reported, with the URLs
  • The measuring script is in the public evidence packet
Evidence packet on GitHub →
ParameterWhat it does
url, x-api-keyRequired: the page and your key
browserHeadless browser on (default, 10 credits) or off (1 credit)
proxy_type, proxy_countryDatacenter (default) or residential proxies, with a country
timeout5 to 60 seconds, default 60
cookiesSend cookies with the request
js_snippet, wait_for_selector, block_resourceRun JavaScript after load; wait for an element; skip images, fonts or other resource types (browser only)
Credits per requestDatacenter proxyResidential proxy
browser=false125
browser=true (default)10125
Parameters, limits, latency

Same request, different output.

One key and one credit table serve /v2/general (HTML), /v2/markdown (this page) and /v2/extract (typed JSON, which uses this Markdown as the model's input and bills by its length). Methods: GET, POST, PUT and DELETE, forwarded to the target. Paid plans have no limit on concurrent requests; the free plan allows one concurrent request, and a request beyond the limit returns HTTP 409.

  • Measured latency on the fixture, 10 sequential requests each, full HTTP call including TLS and download, one client in Kyiv on home broadband, 2026-09-24: with the browser median 2.22 s, p90 2.81 s, range 1.85–6.12 s; without it median 0.99 s, p90 1.67 s, range 0.82–1.71 s
  • Errors are JSON with a detail string (403 wrong key, 422 bad URL, 404 unreachable host in our run) and are not charged; a target that answers 404, or a wait_for_selector that never appears, still returns 200 with that page's Markdown and is charged
  • The Ant-credits-cost header on every successful response
Request and response format →
  • MCPget_web_page_markdown in the ScrapingAnt MCP server; Claude Code: claude mcp add scrapingant --transport http https://api.scrapingant.com/mcp -H "x-api-key: <YOUR-API-KEY>"
  • GitHub Actionsscrapingant/scrape-action with output-type: markdown returns content and url — docs
  • n8nGet Markdown operation — docs
  • MakeGet Page as Markdown module — docs
Integrations

One account, four ways in.

The same endpoint is available where your pipeline already runs: as a tool in MCP-aware clients, as a step in a GitHub Actions workflow, and as a node in n8n and Make. The credits, the key and the response are the same as the HTTP call above.

Markdown endpoint docs →
Pricing

Industry leading pricing that scales with your business.

Compare plans side by side. Every tier includes 10,000 free credits to start.
👈Swipe to compare all 5 plans👉
Plans
Enthusiast
100K credits / mo
$19/mo
★ Most Popular
Startup
500K credits / mo
$49/mo
Business
3M credits / mo
$249/mo
Business Pro
8M credits / mo
$599/mo
Custom
10M+ credits / mo
$699+/mo
Monthly API credits 100,000 500,000 3,000,000 8,000,000 10M+
Support channel Email Priority email Priority email Priority email Priority + dedicated
Integration help Docs only Custom code snippets Debug sessions Priority debug sessions Full enterprise onboarding
Expert assistance — included included included included
Custom proxy pools — — included included included
Custom anti-bot avoidances — — included included included
Dedicated account manager — — included included included
Start Free Start Free → Start Free Start Free Talk to Sales
⚡
Hit your limit mid-month?
Restart your plan instantly — no waiting for the next billing cycle. Credits refresh the moment you pay, so scraping never has to stop.
✓10,000 free credits every month
✓No credit card required
✓Pay only for successful scrapes — failed requests cost 0
Customers

What teams are saying.

From solo developers shipping side projects to enterprise pipelines at Fortune 500s.

★★★★★ 5.0 on Capterra →
★★★★★

“Onboarding and API integration was smooth and clear. Everything works great. The support was excellent.”

Illia K.
Android Software Developer
★★★★★

“Great communication with co-founders helped me to get the job done. Great proxy diversity and good price.”

Andrii M.
Senior Software Engineer
★★★★★

“This product helps me to scale and extend my business. The setup is easy and support is really good.”

Dmytro T.
Senior Software Engineer
FAQ

Frequently asked questions.

Still curious? Get in touch with our team — we usually reply within hours.

What is a URL to Markdown API?

An HTTP endpoint that takes a page URL and returns that page as Markdown instead of HTML. ScrapingAnt's is /v2/markdown: it accepts the same request structure as the general endpoint (url and x-api-key required) and returns a JSON object with url and markdown properties; it supports GET, POST, PUT and DELETE. “LLM-ready” means the output is text you can pass to a model or an embedding step without an HTML parser in between.

What does the response look like?

JSON with two properties, url and markdown, with HTTP 200 and the Ant-credits-cost header. The response panel at the top of this page is the captured response for our fixture article: 2,934 bytes of HTML became 1,824 characters of Markdown in 56 lines. In our run the responses of this endpoint did not carry the Ant-page-status-code header that the general endpoint's do. Check that markdown is not empty before you store it: in about 60 calls on the test day, one came back as HTTP 200 with an empty body (charged) and succeeded on the retry; it is reported as a product issue.

What is removed and what is kept?

Script and noscript elements are removed; everything else on the page is converted: headings, paragraphs, lists, inline links, tables, code blocks, blockquotes and image alt text. Navigation, cookie banners and footers are part of “everything else”, so they come back as Markdown too. To drop them, remove them in the browser first with a base64-encoded js_snippet (requires browser=true); the “Cleanup you control” section shows the snippet and its output.

Does it handle JavaScript-rendered pages?

Yes. By default the page is loaded in a headless browser (browser=true) and converted after rendering; that request costs 10 API credits through a datacenter proxy. Setting browser=false performs the request without a headless browser (no JavaScript rendering); the docs describe it for static content, and such a request costs 1 API credit through a datacenter proxy. On our static fixture both modes returned identical Markdown.

How are credits charged?

A Markdown request with browser=true (the default) costs 10 API credits; with browser=false it costs 1 API credit (datacenter proxy). A request without a browser through a residential proxy costs 25 API credits, and with JavaScript rendering through a residential proxy 125. Only successful responses are charged, and each response carries the Ant-credits-cost header with the number of credits spent. Note that a page that loads but answers 404 is a successful fetch: in our run it returned HTTP 200 with # 404 as the Markdown and was charged. Every plan starts with 10,000 free API credits every month, and no credit card is required to sign up.

How is /v2/markdown different from /v2/general and /v2/extract?

/v2/general returns the page's HTML. /v2/markdown returns the same page converted to Markdown. The AI extractor, /v2/extract, takes the general endpoint's parameters plus extract_properties and returns a JSON object with the properties you name; it uses the Markdown transformation of the page as the model's input, and its cost counts the Markdown characters (each 30 characters of Markdown and output text cost 1 API credit, on top of the request cost). Same key, same parameters, same credit table across the three.

How much smaller is the Markdown than the HTML?

It depends on the page. On 2026-09-24 we counted tokens (tiktoken, exact response bytes, browser=true) on four pages: our fixture article 864 → 498 tokens (1.7×), the Python tutorial on docs.python.org 23,962 → 6,870 (3.5×), the pandas read_html reference 30,032 → 3,576 (8.4×), the Wikipedia article on Markdown 168,173 → 16,864 (10.0×); the o200k tokenizer was within 0.1× of each. The table in the “Token counts” section links each page; the packet has the byte counts as well.

What are the limits and the error codes?

The timeout parameter is 5 to 60 seconds, default 60. Paid plans have no limit on concurrent requests; the free plan allows one concurrent request, and a request beyond the limit returns HTTP 409. Errors come back as JSON with a detail string; the documented codes are 400, 403, 404, 405, 409, 422, 423 and 500 (see the errors page). In our run a wrong key returned 403, url=not-a-url 422 and an unreachable host 404, none of them charged; a wait_for_selector that never appeared returned 200 after the 5-second timeout and was charged, so check the Markdown for the element you waited for.

Can agents and workflows call it without writing code?

The ScrapingAnt MCP server exposes get_web_page_markdown, which fetches a URL and returns its content as Markdown (parameters url, browser, proxy_type, proxy_country). The scrapingant/scrape-action GitHub Action with output-type: markdown calls /v2/markdown and returns the Markdown as content plus the final url. The n8n node has a Get Markdown operation and the Make app a Get Page as Markdown module.

Talk to us

Building an LLM pipeline at scale?

Volume crawls, dedicated capacity, or a one-off corpus — drop us a line and a real human gets back to you.

“Our clients are pleasantly surprised by the response speed of our team.”

Oleg Kulyk
Founder, ScrapingAnt

A real human replies within a few hours · we don't share your email

Thanks — we'll be in touch shortly.
Something went wrong submitting the form. Please try again or email us directly.

Ready to scrape the web?

10,000 free credits every month. No credit card. Pay only for successful requests.

Sign up in under 30 seconds — no card, no commitment.