Skip to main content
GET
cURL

Authorizations

apikey
string
query
required

Fetch, Extract, Crawl and the account endpoint accept the key as the apikey query parameter. Keys are per account and self-serve: create one in the Zenrows dashboard (app.zenrows.com), or, for an agent with no human present, POST https://app.zenrows.com/api/agent/signup.

Query Parameters

url
string<uri>
required

The URL of the page to retrieve.

Example:

"https://www.scrapingcourse.com/ecommerce/"

mode
enum<string>

Adaptive Stealth Mode. auto starts from the cheapest viable configuration and escalates to JavaScript rendering or premium proxies only when the target requires it. You are billed for the configuration that succeeds.

Available options:
auto
js_render
boolean
default:false

Render the page in a headless browser before returning it. Required for content that only exists after JavaScript runs.

js_instructions
string

JSON array of browser instructions (click, fill, scroll, wait) executed on the page before the content is returned. Requires js_render.

custom_headers
boolean
default:false

Forward your own request headers (cookies, referer) to the target.

premium_proxy
boolean
default:false

Route the request through residential IPs. Required by most protected sites.

proxy_country
string

Two-letter country code for the exit IP. Requires premium_proxy.

Pattern: ^[a-z]{2}$
Example:

"us"

session_id
integer

Reuse the same IP across requests for up to 10 minutes. Any integer you choose identifies the session.

original_status
boolean
default:false

Return the target's own HTTP status code instead of the Zenrows one.

allowed_status_codes
string

Comma-separated status codes whose body should be returned instead of raising an error, for example 404,500.

wait_for
string

CSS selector to wait for before returning. Requires js_render.

wait
integer
default:0

Milliseconds to wait after load before returning. Requires js_render.

Required range: x >= 0
block_resources
string

Comma-separated resource types to block (for example image,media,font). Blocking is on by default.

json_response
string

Return a JSON envelope that also carries the network requests (XHR/fetch) the page made.

css_extractor
string

JSON object mapping output keys to CSS selectors, applied to the retrieved page.

Example:

"{\"title\":\"h1\",\"price\":\".price\"}"

extract
enum<string>

Return structured JSON extracted from the page with no selectors to write (Extract). Omit it and Extract is off. auto and native return the website's own field names; standard returns a canonical schema shared by every website in a vertical (real estate only for now). Extract works on any prepared domain, with any active API key (prepare a new one with POST /extract/prepared-domains), and is currently free on top of the Fetch cost. A domain, or a kind of page on it, that is not prepared yet answers 403 REQS007: see requestExtractDomain.

Available options:
auto,
native,
standard
extract_fields
string

Comma-separated list of the fields extract should return, dot-notated for fields inside a group (for example products.name,products.price). Omit it to receive every field.

Example:

"products.name,products.price"

autoparse
boolean
default:false

Deprecated in favour of Extract (extract=auto). Returns general-purpose JSON parsed from the page, not tailored to the website.

response_type
enum<string>

Convert the page before returning it: Markdown, plaintext or PDF.

Available options:
markdown,
plaintext,
pdf
screenshot
boolean
default:false

Return an above-the-fold screenshot of the page. Requires js_render.

screenshot_fullpage
boolean
default:false

Return a full-page screenshot. Requires js_render.

screenshot_selector
string

Screenshot only the element matching this CSS selector. Requires js_render.

screenshot_format
enum<string>
default:png

Screenshot image format.

Available options:
png,
jpeg
screenshot_quality
integer

JPEG quality, 1 to 100. Only with screenshot_format=jpeg.

Required range: 1 <= x <= 100
outputs
string

Comma-separated data types to pull out of the retrieved HTML (for example emails,phone_numbers).

Response

The target's content, in the shape the request asked for: HTML by default, Markdown or plaintext with response_type, a PDF or PNG/JPEG binary for response_type=pdf and the screenshot parameters, and JSON for extract, css_extractor, autoparse or json_response.

The page as returned by the target.