Webhooks
Receive real-time HTTP POST notifications when events occur during a crawl, including page discovery, metadata extraction, credit usage alerts, and crawl status changes. Eliminates the need for polling.
Available Events
Each event corresponds to a boolean flag on the webhook object. Set the relevant flags to true to subscribe.
| Event | Key | Description |
|---|---|---|
| Page Found | on_find | Fires when a page is discovered. Includes full page content. |
| Metadata Found | on_find_metadata | Fires when metadata is extracted. Returns only the URL, status code, and headers. |
| Crawl Status | on_website_status | Fires on crawl status changes (started, completed, errored). |
| Credits Depleted | on_credits_depleted | Fires when your credit balance hits zero. |
| Credits Half Depleted | on_credits_half_depleted | Fires when your credits drop below 50%. |
Inline Webhook (Per-Request)
Pass a webhook object in any crawl, scrape, search, or screenshot request. Spider sends an HTTP POST to your URL whenever the enabled events fire.
Crawl with webhook
Webhook Payload
When an event fires, Spider sends an HTTP POST to your URL with a JSON body. The shape depends on the event. Below is an example on_find payload.
on_find payload
on_website_status payload
Verifying Signatures
Every webhook includes an X-Spider-Signature header for payload verification. The header format is t=timestamp,v1=signature where the signature is an HMAC-SHA256 hex digest computed using your API key. To verify, reconstruct the signed payload as timestamp.body and compare the HMAC using your Spider API key as the secret.
Verify webhook signature
Discord Webhooks
Spider automatically detects Discord webhook URLs (matching discord.com/api/webhooks/) and formats the payload as a rich embed with file attachments for the HTML content and screenshot. Provide your Discord webhook URL in the url field.
Discord webhook example
false. You must enable at least one or the webhook will not fire. Webhooks are batched and delivered asynchronously, so your endpoint should return a 200 response quickly to avoid timeouts. Webhooks work on all endpoints: crawl, scrape, search, screenshot, transform, and unblocker. Combine them with data connectors to push results to cloud storage at the same time.