Scrape Markdown
Convert any web page into clean, LLM-friendly Markdown with the Scrape Markdown endpoint, stripping navigation, scripts, and ads for token-efficient AI input.
Scrape a page and return its content as Markdown. Navigation menus, scripts, advertisements, and layout HTML are stripped while semantic structures such as headings, lists, code blocks, and links are preserved.
Note
- Use the Scraper API Server (
https://api.mrscraper.com) host when calling this endpoint. - Set
markdowntotrueto enable the conversion. - The response body is the Markdown itself (
text/markdown). The tokens used are in thetoken_usageresponse header. - The output is typically 70-90% smaller than raw HTML, which makes it well suited for AI prompts, RAG pipelines, and document stores.
- See Scrape Markdown in the Scraper API guide for the full list of settings.
Query Parameters
API token.
URL-encoded URL of the page you want to scrape, such as https%3A%2F%2Fbooks.toscrape.com%2F. Must include the protocol (https://).
uriConverts the page content into clean Markdown format, stripping HTML tags. Required for this use case.
trueRoutes the request through a real device to improve results on complex websites. On by default; set to false to use standard routing.
trueLoads the page in a real browser. Set true for JavaScript-heavy sites, SPAs, and pages that load content dynamically. Sending waitForSelector or waitForDelay also turns it on.
falseMaximum seconds to wait for the scrape before the request times out. Up to 330, after which the API stops waiting. Increase for slow or complex pages.
3001 <= value <= 330Two-letter country code to load the page from, such as us or gb. Defaults to the United States. Send geoCode or proxyCountry; if you send both, they must match.
"us"2 <= length <= 2Two-letter country code of the proxy server, such as us or gb. Same as geoCode; if you send both, they must match. Defaults to the United States.
"us"2 <= length <= 2Opens the site's home page first to warm the session before loading the target URL. Useful for sites that expect a normal browsing session before deeper pages.
falseWaits until a specific CSS selector appears in the DOM before returning the page, such as #results. Up to 500 characters. Useful for content that loads asynchronously after the initial page load. Turns on browser rendering.
length <= 500Extra seconds to wait after the page loads, from 0 to 30. Decimals are allowed, such as 1.5. Turns on browser rendering.
0 <= value <= 30Routes the request to a specific scraper action, or simply flags it. Useful for separating analytics per domain.
Saves the result to the Result tab.
trueServes a cached result of the same request when it is newer than this age, in milliseconds, such as 86400000 for 1 day. Up to 604800000 (7 days). Omit or send 0 to always scrape fresh. A cached result costs the same tokens as the original scrape.
0 <= value <= 604800000Maximum total tokens the scrape and its retries can use. Automatic retries are bounded by this cap, so the total tokens for a single run stay at or below the value you set. Omit for no limit.
1 <= valueMaximum number of retries for the request. Omit for no limit.
0 <= valueHeader Parameters
API token.
Response Body
text/markdown
application/json
application/json
curl -X GET "https://api.mrscraper.com/?token=string&url=https%3A%2F%2Fbooks.toscrape.com%2F&markdown=true" \ -H "x-api-token: string""[Books to Scrape](index.html) We love being scraped!\n\n- [Home](index.html)\n- All products\n\n# All products\n\n**1000** results - showing **1** to **20**.\n\n1. [](catalogue/a-light-in-the-attic_1000/index.html)\n\n ### [A Light in the ...](catalogue/a-light-in-the-attic_1000/index.html \"A Light in the Attic\")\n\n £51.77\n\n In stock"{
"message": "Unauthorized access",
"data": null
}{
"success": false,
"message": "Something failed on our side. Please retry. If it keeps failing, contact support@mrscraper.com with request id <trace_id>.",
"data": null,
"error": "internal",
"traceId": "<trace_id>"
}Scrape HTML GET
Retrieve the raw HTML of any webpage with the Scrape HTML endpoint, supporting browser rendering, geo-targeting, and waiting for DOM selectors.
Get Screenshot GET
Capture full-page or viewport screenshots of dynamic, JavaScript-rendered pages with the Get Screenshot endpoint, with real browser rendering enabled by default.