https://api.zenrows.com/v1/extract/. They answer two questions that extract=auto cannot: which domains work today, and how to get one that doesn’t yet.
None of them fetches a page, so none of them costs credits.
Authenticate the same way as any Zenrows request, with either the apikey query parameter or the X-API-Key header. Both work on every endpoint below; the examples alternate to show each.
Which domains Extract serves
GET /v1/extract/domains
Every domain Extract can handle right now. This is the list behind Domain coverage, read live instead of from a page, so an integration can check coverage before sending a request rather than handling an error after one.
Response
A domain in this list is a domain you can send
extract=auto to. A domain missing from it returns REQS007. Usually its title says Extract is not prepared for the requested domain, and its detail points at the endpoint below. If the title says Extract is not enabled for the requested domain instead, preparing does not help; see the REQS007 cases.
Getting a domain prepared
Extract works on any prepared domain: one whose page shapes Zenrows has learned and whose extraction it has verified. You can prepare a domain yourself, within a monthly allowance. Preparation is per host: a leadingwww. is dropped, and every other subdomain is prepared separately.
Preparing a domain is not instant. A submission is accepted immediately and then works through discovery, preparation and verification, typically minutes rather than seconds. Poll the status endpoint rather than blocking on the submit call.
POST /v1/extract/prepared-domains
Ask for a domain to be prepared. The body takes the domain and, optionally, example URLs.
Send example URLs when you can. They are authoritative: Zenrows prepares exactly the page types you point at, and skips the discovery step that guesses them. Other page types on a prepared domain are learned on their first request; example URLs make sure the ones you care about are prepared and verified up front.
Send 1 to 5 example URLs. One works; we recommend 3 or more of the same page type (e.g. 3 product pages), because Extract compares pages of one type to check the fields it found and fill in fields one page is missing. Several page types can share the 5 (e.g. 3 product pages + 2 search-result pages).
Send an
Idempotency-Key header to make a retry safe: the same key returns the original submission instead of spending a second allowance slot.
202 Accepted and its starting state, in the same shape the status endpoint returns:
Response
202 with its current record, status: "ready", rather than starting again, and uses no allowance slot. If extract=auto then answers REQS007 with a title saying Extract did not recognise this page, preparing again does not change it; see that error for what to do.
GET /v1/extract/prepared-domains/{domain}
How far a submission has got.
404:
Response
Reading the response
Two fields describe progress, at two levels of detail. Branch onstatus; show state if you are drawing a progress bar.
status is the answer to “can I use this domain yet”:
state is the current step, and will gain steps over time:
roles breaks the same progress down per page, each with its page type in role, its own status, the url it is working from, and a detail sentence if it stopped. It is only present for the account that submitted the domain, because example URLs disclose what you scrape and are not shown to other accounts polling it.
When a preparation fails
Afailed submission carries a failure block with a code, a detail sentence, and slot_consumed:
Response
slot_consumed tells you whether the attempt cost you a slot, but it does not tell you what to do next on its own. Two failures hand the slot back and still need different responses: one is ours to fix and a plain retry works, the other will fail again with the same URLs.
Read the code, and use slot_consumed for the billing half of the sentence:
GET /v1/extract/prepared-domains
Every domain your account has submitted, with your allowance alongside it.
Response
GET /v1/extract/prepared-domains/allowance
How many domains you can still ask for this month, on its own.
Response
month is the UTC calendar month the count applies to; the allowance resets when it rolls over. A failure that returns your slot (slot_consumed: false) is not counted in used.
Errors
Alongside the standard Zenrows error codes, these endpoints return:
An invalid submission is rejected before it costs anything:
Response