React to what changes
When your app needs to do something as the feed lands a change — clear a cache, re-render a page, notify a team — webhooks tell you the moment it happens.
Subscribe to sync events
A webhook is a URL of yours that Search Stack calls. A feed sync is an import run, so it sends one event per run, not one per record:
import.completed— a sync landed, with its row counts.import.failedandfeed.sync-failed— a sync or a poll failed, with the error.
POST https://api.searchstack.dev/webhook
X-API-Key: {your key}
Content-Type: application/json
{
"account_name": "Demo",
"url": "https://yourapp.com/hooks/searchstack",
"events": ["import.completed", "import.failed", "feed.sync-failed"]
}
What you receive
Each run arrives as a small POST. The event type is in the X-Searchability-Event header:
X-Searchability-Event: import.completed
{
"account_name": "Demo",
"list_name": "catalog",
"run_id": "...",
"state": "succeeded",
"source_kind": "feed",
"feed_name": "catalog-api",
"rows_read": 1200,
"rows_imported": 1198,
"rows_skipped": 2,
"rows_rejected": 0
}
- On
import.completed, re-fetch what you cache, or read the run withrun_id. - Per-record events (
searchresult.created,.updated,.deleted) are sent only for writes through the API, MCP or console, never for feed syncs. - Verify the signature on each call so you know it really came from Search Stack.
Go deeper: Webhooks — events, delivery and signing in the reference.