Skip to main content

Request Parameters

All parameters go in the JSON body of POST /v1/scrape. Only url is required; everything else has a sensible default.

Core

FieldTypeDefaultDescription
urlstringRequired. Target URL, including scheme (https://).
methodstringGETHTTP method to use on the target: GET or POST.
bodyobject/stringRequest body sent to the target when method is POST. See POST requests.
modestringautoRouting strategy: auto, fast, or js_rendering. See Modes.
output_formatstringhtmlhtml, markdown, plain_text, autoparse, or screenshot. See Output formats.
timeoutinteger30Max seconds to wait for the target (10–90).
enable_solverbooleantrueSolve anti-bot challenges automatically when detected.

Extraction

FieldTypeDefaultDescription
css_selectorsobjectMap of output keys → CSS selectors. Results appear in data.css_extracted. See CSS extraction.
templatesarray[]Built-in extractors: images, links, headings, emails, phone_numbers, metadata, tables. See Templates.
note

Providing css_selectors or templates automatically runs the request through the advanced pipeline — you don't need a special output_format. Keep output_format as html (or any format) and read the extra fields from the response.

JavaScript rendering

A real browser is used automatically in js_rendering, and auto escalates to it when a page needs JavaScript or is blocked. Any of the fields below also force browser rendering.

FieldTypeDefaultDescription
js_wait_selectorstringWait until this CSS selector appears before returning.
js_wait_timeoutinteger5000Max milliseconds to wait for js_wait_selector (1000–60000).
capture_xhrbooleanfalseCapture background XHR/fetch responses the page makes. Returned in data.xhr_requests.

Screenshots

FieldTypeDefaultDescription
screenshotbooleanfalseReturn a base64 PNG in data.screenshot. Or set output_format: "screenshot".
screenshot_typestringviewportviewport, fullpage, or element.
screenshot_selectorstringCSS selector to capture when screenshot_type is element.

See Screenshots.

Network & identity

FieldTypeDefaultDescription
proxystringresidential:<country> (e.g. residential:us). Works on the free trial via Web Unlocker. See Proxies.
session_idstringReuse the same IP and cookies across requests. See Sessions.
custom_headersobject{}Extra HTTP headers to send to the target.
custom_cookiesobject{}Cookies to send with the request.

Example using several together

{
"url": "https://example.com/de/products",
"mode": "js_rendering",
"output_format": "markdown",
"proxy": "residential:de",
"js_wait_selector": ".product-grid",
"js_wait_timeout": 8000,
"session_id": "de-crawl",
"custom_headers": { "Accept-Language": "de-DE" },
"timeout": 60
}
tip

Unknown fields are ignored, so adding a new parameter won't break older integrations. Invalid values (for example an unsupported mode) return a 400.