general

Webhook

An HTTP callback that delivers data to a specified URL when an async scrape job completes.

A webhook in web scraping is a mechanism for receiving scrape results asynchronously. Instead of blocking the request until the scrape completes, the caller submits a job with a `webhook_url` parameter. The scraping service processes the request in the background — rendering JavaScript, resolving challenges, extracting data — and POSTs the result to the provided webhook URL when complete.

Webhooks are essential for long-running scrapes that exceed HTTP timeout limits. A full browser rendering job with CAPTCHA resolution may take 30-120 seconds — far beyond the 10-30 second timeout of most HTTP clients and API gateways. Webhooks allow the caller to release the connection immediately and process the result when it arrives.

Webhook payloads typically include the extracted data, status code, error messages, timing metadata, and the original request parameters for correlation. AlterLab supports webhook delivery with retry logic (3 attempts with exponential backoff) and HMAC signature verification to authenticate that the payload came from AlterLab and was not tampered with.

Examples

# Async scrape with webhook notification
{
  "url": "https://example.com",
  "render_js": true,
  "webhook_url": "https://yoursite.com/webhooks/scrape",
  "webhook_secret": "your-secret-for-hmac-verification"
}

Related Terms

    Webhook — Web Scraping Glossary | AlterLab