AI Parser
Extract structured data from a webpage with AI using the MrScraper Playground API.
Use AI to parse a webpage and return structured data. Send the target url together with a natural language prompt describing the fields you need, and pick the agent that matches the page type.
Query Parameters
API token.
trueRoute requests through real devices to bypass anti-bot protection.
Render page using Chromium.
Defines when the browser considers navigation complete. 'Network Idle 0' waits until all network activity stops — most thorough but slowest
"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
Block images, fonts, and stylesheets from loading. Speeds up scraping and reduces bandwidth usage
Pause until a specific CSS selector appears in the DOM. Useful for content that loads asynchronously after the initial page load
Include the browser session cookies from the scraped page in the API response
The geographic code for the location of the proxy server
The country of the proxy server
Captures a full-page screenshot of the rendered page as a base64-encoded image
Converts the page content into clean Markdown format, stripping HTML tags
Header Parameters
API token.
Request Body
application/json
uri"general" | "detail" | "map"Maximum number of pages to crawl or paginate.
1 <= valueMaximum crawl depth from the starting URL.
1 <= valueMaximum number of URLs to collect.
1 <= valueOnly URLs matching these patterns will be crawled.
URLs matching these patterns will be skipped.
Response Body
application/json
application/json
application/json
curl -X POST "https://api.mrscraper.com/?token=string&html=true" \ -H "x-api-token: string" \ -H "Content-Type: application/json" \ -d '{ "url": "https://example.com", "prompt": "Extract all data as complete as possible.", "agent": "general" }'{
"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": "",
"screenshot": ""
}{
"error": "Unauthorized",
"message": "Invalid or missing API token",
"statusCode": 401
}{
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"statusCode": 500
}