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 Playground API Server (https://api.mrscraper.com) host when calling this endpoint.
  • Set markdown to true to enable the conversion.
  • 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 Playground guide for the full list of settings.
POST
/

Query Parameters

token*string

API token.

markdown*boolean

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

Defaulttrue
super?boolean

Uses additional resources to improve extraction accuracy on complex websites. Enable for sites protected by anti-bot systems or containing heavily dynamic content.

Defaultfalse
browserRendering?boolean

Render the page using a real Chromium browser. Required for JavaScript-heavy sites, SPAs, and pages that load content dynamically.

Defaultfalse
waitUntil?string

Defines when the browser considers navigation complete. networkidle0 waits until all network activity stops — the most thorough option, but the slowest.

Default"domcontentloaded"
Value in"domcontentloaded" | "load" | "networkidle0" | "networkidle2"
timeout?integer

Maximum seconds to wait for the page to fully load before the request times out. Increase for slow or complex pages.

Default300
screenshot?string

Captures a screenshot of the rendered page as a base64-encoded image. Use full for the entire scroll height, or top for the visible viewport only.

Default"full"
Value in"full" | "top"
geoCode?string

Country to load the page from. Defaults to the United States.

Default"us"
proxyCountry?string

Country of the proxy server. Defaults to the United States.

Default"us"
blockResources?boolean

Skips non-essential assets such as images, fonts, and stylesheets to improve performance. Useful for text-only or structured data extraction.

Defaultfalse
waitForSelector?string

Waits until a specific CSS selector appears in the DOM before starting extraction. Useful for content that loads asynchronously after the initial page load.

action?string

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

proxy?string

Sends the request through your own proxy server, such as http://user:pass@host:port.

returnCookie?boolean

Returns the browser session cookies generated during the request. Useful for debugging sessions or reusing authenticated requests.

Defaultfalse
saveResult?boolean

Saves the result to the Result tab.

Defaulttrue

Header Parameters

x-api-token*string

API token.

Request Body

application/json

url*string

The full URL of the page you want to scrape. Must include the protocol (https://).

Formaturi
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

Response Body

application/json

application/json

application/json

curl -X POST "https://api.mrscraper.com/?token=string&markdown=true" \  -H "x-api-token: string" \  -H "Content-Type: application/json" \  -d '{    "url": "https://books.toscrape.com/"  }'
{
  "code": null,
  "screenshots": [],
  "recording_path": null,
  "extractions": "{}",
  "data": {},
  "data_path": "results/6cef400f-ec7f-4a21-86df-0c7d46bfcf49/data.json",
  "html_path": "results/6cef400f-ec7f-4a21-86df-0c7d46bfcf49/page.html",
  "error": null,
  "residential_proxy_usage": {
    "received": 0.0009365081787109375,
    "sent": 0.0002651214599609375,
    "total": 0.001201629638671875
  },
  "runtime": 4.082163572311401,
  "token_usage": 2,
  "listen_network_data": {},
  "html": "<!DOCTYPE html>...</html>",
  "markdown": "# All products\n\n**1000** results - showing **1** to **20**.\n\n1. [A Light in the ...](catalogue/a-light-in-the-attic_1000/index.html)\n\n   In stock",
  "screenshot": ""
}
{
  "error": "Unauthorized",
  "message": "Invalid or missing API token",
  "statusCode": 401
}
{
  "error": "Internal Server Error",
  "message": "An unexpected error occurred",
  "statusCode": 500
}