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 markdown to true to enable the conversion.
  • The response body is the Markdown itself (text/markdown). The tokens used are in the token_usage response 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.
GET
/

Query Parameters

token*string

API token.

url*string

URL-encoded URL of the page you want to scrape, such as https%3A%2F%2Fbooks.toscrape.com%2F. Must include the protocol (https://).

Formaturi
markdown*boolean

Converts the page content into clean Markdown format, stripping HTML tags. Required for this use case.

Defaulttrue
super?boolean

Routes the request through a real device to improve results on complex websites. On by default; set to false to use standard routing.

Defaulttrue
browserRendering?boolean

Loads 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.

Defaultfalse
timeout?integer

Maximum 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.

Default300
Range1 <= value <= 330
geoCode?string

Two-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.

Default"us"
Length2 <= length <= 2
proxyCountry?string

Two-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.

Default"us"
Length2 <= length <= 2
warmStart?boolean

Opens 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.

Defaultfalse
waitForSelector?string

Waits 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.

Lengthlength <= 500
waitForDelay?number

Extra seconds to wait after the page loads, from 0 to 30. Decimals are allowed, such as 1.5. Turns on browser rendering.

Range0 <= value <= 30
action?string

Routes the request to a specific scraper action, or simply flags it. Useful for separating analytics per domain.

saveResult?boolean

Saves the result to the Result tab.

Defaulttrue
maxAge?integer

Serves 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.

Range0 <= value <= 604800000
tokenCap?integer

Maximum 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.

Range1 <= value
maxRetries?integer

Maximum number of retries for the request. Omit for no limit.

Range0 <= value

Header Parameters

x-api-token*string

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. [![A Light in the Attic](media/cache/2c/da/2cdad67c44b002e7ead0cc35693c0e8b.jpg)](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>"
}