Webhooks
Webhooks
Instead of polling, register an endpoint and we'll POST to it when a company's data is ready.
Register
curl -X POST https://company-search.creative-pandas.ch/api/scraping/webhooks/ \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://your-app.example.com/hooks/altsignals", "events": ["task.completed"]}'
Verify the signature
Every delivery includes an X-Signature header: the HMAC-SHA256 of the raw request body, keyed with your webhook secret. Always verify before trusting a payload.
import hashlib, hmac
def verify(raw_body: bytes, signature: str, secret: str) -> bool:
expected = hmac.new(secret.encode(), raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, signature)
Payload
{
"event": "task.completed",
"task_id": "11111111-…",
"url": "https://www.linkedin.com/company/anthropic/",
"status": "complete"
}
Fetch the data with GET /tasks/{task_id}/extracted_data/. Return 2xx within 10 seconds or the delivery is retried.