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.