Repository navigation
feat(crawl): get notified by webhook when a crawl starts, completes, stops or fails - #75
Merged
Merged
Conversation
…stops or fails Crawls are long-running, and polling them until they end is the only way the CLI lets a caller learn how one finished. The Crawl API now posts signed events to a URL given at create, so the CLI can hand that URL, the events to send and the metadata to echo back to the API, and shows the webhook a crawl carries.
StefanoGuerrini
self-requested a review
October 30, 2026 10:54
StefanoGuerrini
marked this pull request as ready for review
October 30, 2026 10:54
Contributor
Author
|
The |
StefanoGuerrini
approved these changes
Oct 30, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Crawls can now notify an endpoint when they start, complete, stop or fail, so callers no longer have to poll. This adds the
webhookoption on crawl creation and thewebhookfield on every returned crawl.What the task asked for
Bring this surface in line with the Crawl API, which now accepts a
webhookonPOST /v1/crawlsand sends signedzenrows.webhook/v1events.zenrows crawl creategains--webhook <url>,--webhook-event <event>(repeatable) and--webhook-metadata key=value(repeatable). The printed crawl shows its webhook, and the crawl skill documents the flags and the signed events.How the check confirmed it
npm run typecheckclean;npm test498 passed, including the new flag and body tests.zenrows crawl create ... --webhook https://example.com/zenrows-hook --webhook-event crawl.completed --webhook-metadata k=v --jsonand read the same webhook back.How to try it
The output includes a
webhook:line. The account needs a webhook signing key, created in the dashboard under Settings, API Keys.Provenance
Repeatable flags follow
--include-patterns;key=valuefollowsbatch --metadata, so the CLI sends metadata values as strings.Review
One pass, the author's own checks above. No independent review ran.
Human must verify:
webhook.Deviations
tests/, outside the three source paths, where the suite runs them.Record owed
None.