Scrape JSON
Extract structured, strongly-typed JSON from a single page with the Scrape JSON endpoint, using a natural language prompt instead of CSS selectors or XPath.
Scrape a single page and return structured JSON. The general agent analyzes the page against your prompt and returns clean, strongly-typed data without fragile CSS selectors or custom XPath parsers.
Note
- Use the Playground API Server (
https://api.mrscraper.com) host when calling this endpoint. - The
promptonly parses the scraped content. It cannot instruct the scraper itself. - To shape the output with a JSON schema, append it to the prompt as a
Json Schema:section. - For multi-page catalogs, search results, and infinite-scroll listings, use the Listing Page endpoint instead.
- See Scrape JSON in the Playground guide for the full list of settings.
Query Parameters
API token.
Returns the raw HTML of the scraped page in the response.
trueRender the page using a real Chromium browser. Required for JavaScript-heavy sites, SPAs, and pages that load content dynamically.
falseDefines when the browser considers navigation complete. networkidle0 waits until all network activity stops — the most thorough option, but the slowest.
"domcontentloaded""domcontentloaded" | "load" | "networkidle0" | "networkidle2"Maximum seconds to wait for the page to fully load before the request times out. Increase for slow or complex pages.
300Captures a screenshot of the rendered page as a base64-encoded image. Useful for verifying what the scraper actually saw.
falseUses additional resources to improve extraction accuracy on complex websites. Enable for sites protected by anti-bot systems or containing heavily dynamic content.
falseCountry to load the page from. Defaults to the United States.
"us"Country of the proxy server. Defaults to the United States.
"us"Saves the result to the Result tab.
trueHeader Parameters
API token.
Request Body
application/json
The full URL of the page you want to scrape. Must include the protocol (https://).
uriDescribe the data shape you want back, for example fields like title, price, and rating. The prompt only parses the scraped content — it cannot instruct the scraper itself. To shape the output with a JSON schema, append it to the prompt as a 'Json Schema:' section.
"Extract all data as complete as possible."The AI agent used for extraction. Scrape JSON uses the general agent, optimised for single-page structured extraction.
"general""general"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.
1 <= valueMaximum number of retries for the request. Omit for no limit.
0 <= valueResponse Body
application/json
application/json
application/json
curl -X POST "https://api.mrscraper.com/?token=string" \ -H "x-api-token: string" \ -H "Content-Type: application/json" \ -d '{ "url": "https://quotes.toscrape.com/", "prompt": "Extract all data as complete as possible.", "agent": "general" }'{
"code": null,
"screenshots": [],
"recording_path": null,
"extractions": "{}",
"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": 214,
"listen_network_data": {},
"html": "<!DOCTYPE html>...</html>",
"markdown": "",
"screenshot": "",
"data": {
"quotes": [
{
"text": "The world as we have created it is a process of our thinking. It cannot be changed without changing our thinking.",
"author": "Albert Einstein",
"author_url": "/author/Albert-Einstein",
"tags": [
"change",
"deep-thoughts",
"thinking",
"world"
]
},
{
"text": "It is our choices, Harry, that show what we truly are, far more than our abilities.",
"author": "J.K. Rowling",
"author_url": "/author/J-K-Rowling",
"tags": [
"abilities",
"choices"
]
}
]
}
}{
"error": "Unauthorized",
"message": "Invalid or missing API token",
"statusCode": 401
}{
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"statusCode": 500
}AI Parser POST
Extract structured data from any webpage with AI: send a target URL and a natural language prompt describing the fields you need to the Playground API.
Listing Page POST
Extract paginated item lists, catalog grids, and search results in one run with the Listing Page endpoint, handling numbered pages, scrolling, and Load More.