{"slug":"api-mrscraper-com-v1-cdp-scrape-json-1b0454","title":"Extracts structured JSON from a page with AI, guided by a natural-language promp","host":"api.mrscraper.com","method":"GET","resource":"https://api.mrscraper.com/v1/cdp/scrape-json","category":"code","description":"Extracts structured JSON from a page with AI, guided by a natural-language prompt that describes the fields wanted. A JSON schema after a Json Schema: label in the prompt shapes the output. Errors are never charged: 400 invalid input, 502 extraction failed, 504 timed out.","price_listed":0.001,"price_asked":null,"state":"no_terms","state_label":"Answers HTTP 400 without x402 payment terms","checks_7d":7,"answered_7d":0,"latency_ms_median":null,"reported_calls_30d":9,"reported_payers_30d":3,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"method":"GET","queryParams":{"blockResources":true,"browserRendering":true,"geoCode":"us","html":false,"maxAge":0,"maxRetries":2,"prompt":"All data on the page, as complete as possible","screenshot":false,"timeout":300,"url":"https://mrscraper.com/pricing","waitForSelector":"#main","warmStart":false},"type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"method":{"enum":["GET"],"type":"string"},"queryParams":{"additionalProperties":true,"description":"Extract structured data from one public page. Unknown properties are ignored.","properties":{"blockResources":{"description":"Blocks images, fonts, and stylesheets from loading. Speeds up scraping and reduces bandwidth usage.","type":"boolean"},"browserRendering":{"description":"Controls whether the page is loaded in a browser. Leave it out to load the page without a browser first and switch to a browser automatically if the request is blocked. Set true to always load the page in a browser, which JavaScript-heavy sites, SPAs, and pages that load content dynamically need. Set false to never use a browser.","type":"boolean"},"geoCode":{"description":"Two-letter country code to load the page from, such as us or gb. Defaults to the United States.","pattern":"^[a-zA-Z]{2}$","type":"string"},"html":{"default":true,"description":"Returns the raw HTML of the scraped page in the response. On by default; set false to leave it out.","type":"boolean"},"maxAge":{"default":0,"description":"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). 0, the default, always scrapes fresh. A cached result costs the same tokens as the original scrape.","maximum":604800000,"minimum":0,"type":"integer"},"maxRetries":{"description":"Maximum number of retries for the request. Omit for no limit.","minimum":0,"type":"integer"},"prompt":{"description":"Natural-language description of the data shape wanted, such as fields like title, price, and rating. It only parses the scraped content. A JSON schema after a Json Schema: label in the prompt shapes the output. Without a prompt, MrScraper extracts all the data on the page.","minLength":1,"type":"string"},"screenshot":{"default":false,"description":"Captures a screenshot of the rendered page as a base64-encoded image. Useful for verifying what the scraper actually saw. Off by default.","type":"boolean"},"timeout":{"description":"Maximum seconds to wait for the scrape before the request times out, from 1 to 330. Increase for slow or complex pages. Defaults to 300.","maximum":330,"minimum":1,"type":"integer"},"url":{"description":"URL of the page to scrape. Must include the protocol (https://). Local and private hosts, IPv6 literals and embedded credentials are rejected.","type":"string"},"waitForSelector":{"description":"Waits until a specific CSS selector or text appears on the page before returning it, such as #results. Up to 500 characters. Useful for content that loads asynchronously after the initial page load.","maxLength":500,"minLength":1,"type":"string"},"warmStart":{"description":"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.","type":"boolean"}},"required":["url"],"type":"object"},"type":{"const":"http","type":"string"}},"required":["type","method"],"type":"object"},"output":{"properties":{"example":{"additionalProperties":true,"properties":{"data":{"description":"The extracted data, shaped by the prompt: usually an object, possibly a list."},"html":{"description":"The page HTML. Present only when html=true, the default, and the page produced it.","type":"string"},"screenshot":{"contentEncoding":"base64","description":"The image, base64-encoded, without a data: prefix. Present only when screenshot=true and the page produced one.","type":"string"}},"required":["data"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-11-27","reachable":true,"status":400,"valid_402":false,"asked_usdc":null,"price_match":null,"latency_ms":836,"error":null},{"day":"2026-11-26","reachable":true,"status":400,"valid_402":false,"asked_usdc":null,"price_match":null,"latency_ms":1051,"error":null},{"day":"2026-11-25","reachable":true,"status":400,"valid_402":false,"asked_usdc":null,"price_match":null,"latency_ms":1003,"error":null},{"day":"2026-11-24","reachable":true,"status":400,"valid_402":false,"asked_usdc":null,"price_match":null,"latency_ms":1339,"error":null},{"day":"2026-11-23","reachable":true,"status":400,"valid_402":false,"asked_usdc":null,"price_match":null,"latency_ms":997,"error":null},{"day":"2026-11-22","reachable":true,"status":400,"valid_402":false,"asked_usdc":null,"price_match":null,"latency_ms":1033,"error":null},{"day":"2026-11-21","reachable":true,"status":400,"valid_402":false,"asked_usdc":null,"price_match":null,"latency_ms":1052,"error":null},{"day":"2026-11-20","reachable":true,"status":400,"valid_402":false,"asked_usdc":null,"price_match":null,"latency_ms":1373,"error":null},{"day":"2026-11-19","reachable":true,"status":400,"valid_402":false,"asked_usdc":null,"price_match":null,"latency_ms":839,"error":null},{"day":"2026-11-18","reachable":true,"status":400,"valid_402":false,"asked_usdc":null,"price_match":null,"latency_ms":1346,"error":null},{"day":"2026-11-17","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":1005,"error":null}],"description_full":"Extracts structured JSON from a page with AI, guided by a natural-language prompt that describes the fields wanted. A JSON schema after a Json Schema: label in the prompt shapes the output. Errors are never charged: 400 invalid input, 502 extraction failed, 504 timed out.","last_updated":"2026-11-24T04:59:11.322Z","schemes":["exact"]}