extract
Extract structured data from a webpage via Zenrows.
Returns JSON fields (products, articles, listings) in "data" rather than a full page body. Set include_html to also get the page HTML. Modes:
auto (default): extract=auto, site-tailored Extract (currently free, billing may apply later). Works on any prepared domain, with any API key. Error REQS007 says why in "reason":
domain_not_prepared: call prepare_domain with the domain and 1 to 5 example URLs (one works; we recommend 3 or more of the same page type; a few minutes, no credits), poll prepared_domain_status about every 30 seconds until it says ready, then call extract again.
page_not_recognised: the domain is prepared, but this page is not one Extract extracts (a page with nothing to extract, such as a home page). Try a product, article or listing page instead; if this page should work, retry it once in a few minutes; otherwise use mode=css. Do not prepare the domain again.
domain_not_enabled: preparing does not help; use mode=css.
autoparse: deprecated general-purpose structured JSON on any domain; use only when asked for
css: css_extractor with an explicit selector map
Requests use automatic mode (mode=auto) by default: Zenrows enables JS rendering and premium proxies only when the site needs them, and charges only for the configuration that succeeds. Pass just the URL. Set js_render or premium_proxy only to force a fixed configuration; that turns automatic mode off and bills every request at that configuration's cost.
Check "empty" in the result: true means no field came back with a value. "noDataExtracted": true means Extract processed the page and found nothing to extract (not charged); retrying the same request returns the same answer. Full-page markdown, HTML and screenshots come from scrape.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The webpage URL to extract from | |
| mode | No | Extraction mode: auto (extract=auto, default), css (requires css_extractor), or the deprecated autoparse | auto |
| wait | No | Milliseconds to wait after load. Requires js_render=true; without it, including in automatic mode, it may be ignored. | |
| wait_for | No | CSS selector to wait for before extracting. Requires js_render=true; without it, including in automatic mode, it may be ignored. | |
| js_render | No | Force JS rendering on every request. Overrides automatic mode (mode=auto), which already renders when needed. | |
| mode_auto | No | Automatic mode (mode=auto) is on by default; leave unset. False sends a plain request without it. | |
| include_html | No | mode=auto only: also return the full page HTML. Default false; the HTML is most of the response size. | |
| css_extractor | No | Required when mode=css. JSON map of field→selector, e.g. '{"title":"h1","price":".price"}' | |
| premium_proxy | No | Force premium residential proxies on every request (10x cost). Overrides automatic mode (mode=auto), which already uses premium proxies when a page needs them. | |
| proxy_country | No | ISO 3166-1 alpha-2 country code. Works in automatic mode (mode=auto); with js_render or mode_auto=false it requires premium_proxy. | |
| fallback_autoparse | No | Deprecated, has no effect: Extract no longer falls back to autoparse. Prepare the domain with prepare_domain instead. |