Skip to content

feat(extract): steer prepare callers to send several example URLs of one page type - #72

Draft
zenrows-dev-pool[bot] wants to merge 2 commits into
mainfrom
feat/extract-example-urls-guidance
Draft

zenrows-dev-pool[bot] wants to merge 2 commits into
mainfrom
feat/extract-example-urls-guidance

Conversation

@zenrows-dev-pool

@zenrows-dev-pool zenrows-dev-pool Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Why

Preparing a domain for Extract maps a page type more completely when it gets several example pages of that type: Extract compares pages of one type to check the fields it found and fill in fields one page is missing. The CLI told users to pass "one per page kind", which steers them to a single page of each type.

What changes

  • zenrows extract prepare --help: "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)", with a three-product-page example. The --url flag help says "One works; we recommend 3 or more of the same page type (e.g. 3 product pages)".
  • With fewer than 3 --url, the command prints a short tip on stderr. It is never an error: 1 and 2 URLs are still sent as given, the --json output on stdout and the exit code are unchanged.
  • The INVALID_USAGE next step, the EXTRACT_DOMAIN_NOT_PREPARED next step, the discovery_failed next step, the API client doc comments, README, docs/capabilities.md, registry/capabilities.json notes, the CLI skills and the agent-plugin skills (extract, zenrows, README) carry the same message: one works; we recommend 3 or more of the same page type.

No API contract change: example_urls still accepts 1 to 5 URLs.

Tests

  • npm run typecheck: pass
  • npm test: 484 pass, 0 fail (tests for the stderr tip with 1 and 2 URLs, no tip with 3, the help text, the discovery_failed next step, and the capability notes)

…one page type

Preparing a domain maps a page type more completely when it gets several
example pages of that type: Extract compares them to check the fields it
found and fill in fields one page is missing. The help, skills and docs said
"one per page kind", which steered users to send a single page of each type.

The prepare help, the skills, the README and the capability notes now say
one URL works and at least 3 of the same page type work better, up to 5,
with an example of three product pages. With fewer than 3 --url the command
prints a tip on stderr. 1 to 5 URLs are still accepted; the JSON output and
the exit code do not change.
…in one consistent wording

The prepare guidance used several phrasings ("at least 3 of each page type", "work best") that read as a requirement or disagreed with each other. One works; 3 or more of the same page type is a recommendation, now stated the same way in help, errors, docs and skills, including the discovery_failed next step.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants