From e863640b62644aae613e408b1830b263e4bec988 Mon Sep 17 00:00:00 2001 From: "zenrows-dev-pool[bot]" Date: Wed, 21 Oct 2026 18:42:02 +0000 Subject: [PATCH 1/2] docs(extract): recommend several example URLs of one page type in prepareDomain One example URL still works, and the client still accepts 1 to 5. Several pages of the same page type give better results: Extract compares them, so it can check the fields it found and fill in fields one page is missing. Replace the old "one per kind of page" wording and show 3 product pages in the README example. --- README.md | 10 +++++++--- src/index.ts | 11 ++++++++--- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e8b64df..e09e40b 100644 --- a/README.md +++ b/README.md @@ -231,9 +231,11 @@ The legacy `402` with `code: "AUTH010"` means the domain isn't enabled. `extract #### Preparing a domain -`client.prepareDomain(domain, exampleUrls)` submits a domain for Extract (`POST /v1/extract/prepared-domains`), and `client.preparedDomainStatus(domain)` reads where it is (`GET /v1/extract/prepared-domains/{domain}`). Both resolve to the parsed status object. Pass the domain without a scheme and 1 to 5 example URLs, one per kind of page you want to extract. These calls cost no credits. +`client.prepareDomain(domain, exampleUrls)` submits a domain for Extract (`POST /v1/extract/prepared-domains`), and `client.preparedDomainStatus(domain)` reads where it is (`GET /v1/extract/prepared-domains/{domain}`). Both resolve to the parsed status object. Pass the domain without a scheme and 1 to 5 example URLs on that domain. These calls cost no credits. -Preparation takes minutes, and the client does not wait for it. Poll the status until it is no longer `"preparing"`: +One example URL works, but several related URLs work better: send several pages of each page type you want to extract, at least 3 when you can. Several page types can share the 5, for example 3 product pages and 2 search-result pages. Extract compares the pages of one type against each other, so it can check the fields it found and fill in fields that one page is missing. More pages of a type give more complete, more reliable results for that type. + +Preparation takes minutes, and the client does not wait for it. Poll the status until it is no longer `"preparing"`. This example prepares one page type, product pages, with 3 of them: ```javascript import { ZenRows, ZenRowsPreparedDomainError } from "zenrows"; @@ -242,7 +244,9 @@ const client = new ZenRows("YOUR-API-KEY"); try { let status = await client.prepareDomain("www.scrapingcourse.com", [ - "https://www.scrapingcourse.com/ecommerce/", + "https://www.scrapingcourse.com/ecommerce/product/abominable-hoodie/", + "https://www.scrapingcourse.com/ecommerce/product/adrienne-trek-jacket/", + "https://www.scrapingcourse.com/ecommerce/product/aeon-capri/", ]); while (status.status === "preparing") { await new Promise((resolve) => setTimeout(resolve, 30_000)); diff --git a/src/index.ts b/src/index.ts index 516ce8f..574d705 100644 --- a/src/index.ts +++ b/src/index.ts @@ -230,9 +230,14 @@ export class ZenRows { * the parsed status object the API answers with `202`: `domain`, `status` (`"preparing"`, * `"ready"` or `"failed"`), `state`, `submitted_at`, `updated_at`. * - * `domain` is the domain without a scheme. `exampleUrls` are 1 to 5 URLs on that domain, - * one per kind of page you want to extract. Submitting a domain that is already prepared - * returns its current status instead of starting a new run. + * `domain` is the domain without a scheme. `exampleUrls` are 1 to 5 URLs on that domain. + * One URL works, but several related URLs work better: send several pages of each page type + * you want to extract, at least 3 when you can (for one page type, 3 pages of that type). + * Several page types can share the 5, for example 3 product pages and 2 search-result + * pages. Extract compares the pages of one type against each other, so it can check the + * fields it found and fill in fields that one page is missing; more pages of a type give + * more complete, more reliable results for that type. Submitting a domain that is already + * prepared returns its current status instead of starting a new run. * * Preparation takes minutes. This method does not wait for it: call * `preparedDomainStatus(domain)` until `status` is no longer `"preparing"`. These endpoints From be94dbe48a88deec7bcecb20452040c55b1b26a8 Mon Sep 17 00:00:00 2001 From: "zenrows-dev-pool[bot]" Date: Mon, 26 Oct 2026 07:23:21 +0000 Subject: [PATCH 2/2] docs(extract): use the canonical example URL wording in prepareDomain State the recommendation the same way as the other Extract surfaces: 1 to 5 example URLs, one works, and we recommend 3 or more of the same page type. Drop the "at least 3" phrasing and simplify the README example intro. --- README.md | 4 ++-- src/index.ts | 14 ++++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index e09e40b..00bedfa 100644 --- a/README.md +++ b/README.md @@ -233,9 +233,9 @@ The legacy `402` with `code: "AUTH010"` means the domain isn't enabled. `extract `client.prepareDomain(domain, exampleUrls)` submits a domain for Extract (`POST /v1/extract/prepared-domains`), and `client.preparedDomainStatus(domain)` reads where it is (`GET /v1/extract/prepared-domains/{domain}`). Both resolve to the parsed status object. Pass the domain without a scheme and 1 to 5 example URLs on that domain. These calls cost no credits. -One example URL works, but several related URLs work better: send several pages of each page type you want to extract, at least 3 when you can. Several page types can share the 5, for example 3 product pages and 2 search-result pages. Extract compares the pages of one type against each other, so it can check the fields it found and fill in fields that one page is missing. More pages of a type give more complete, more reliable results for that type. +One example URL 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). -Preparation takes minutes, and the client does not wait for it. Poll the status until it is no longer `"preparing"`. This example prepares one page type, product pages, with 3 of them: +Preparation takes minutes, and the client does not wait for it. Poll the status until it is no longer `"preparing"`. This example prepares three product pages: ```javascript import { ZenRows, ZenRowsPreparedDomainError } from "zenrows"; diff --git a/src/index.ts b/src/index.ts index 574d705..64c8498 100644 --- a/src/index.ts +++ b/src/index.ts @@ -230,14 +230,12 @@ export class ZenRows { * the parsed status object the API answers with `202`: `domain`, `status` (`"preparing"`, * `"ready"` or `"failed"`), `state`, `submitted_at`, `updated_at`. * - * `domain` is the domain without a scheme. `exampleUrls` are 1 to 5 URLs on that domain. - * One URL works, but several related URLs work better: send several pages of each page type - * you want to extract, at least 3 when you can (for one page type, 3 pages of that type). - * Several page types can share the 5, for example 3 product pages and 2 search-result - * pages. Extract compares the pages of one type against each other, so it can check the - * fields it found and fill in fields that one page is missing; more pages of a type give - * more complete, more reliable results for that type. Submitting a domain that is already - * prepared returns its current status instead of starting a new run. + * `domain` is the domain without a scheme. `exampleUrls` are 1 to 5 example URLs on that + * domain. 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). Submitting a domain that is already prepared returns its current + * status instead of starting a new run. * * Preparation takes minutes. This method does not wait for it: call * `preparedDomainStatus(domain)` until `status` is no longer `"preparing"`. These endpoints