A webhook inverts the direction of an API call: instead of you asking whether something changed, the provider posts to a URL of yours when it does.
Where one is available it is strictly better than polling — you learn about the change immediately and you pay for events rather than for questions.
What it needs from your side
Three things, and all three are where webhook integrations actually break:
- A public endpoint. It has to be reachable from the internet, which is a deployment concern rather than a coding one.
- Signature verification. Anyone who learns your URL can post to it. A webhook you do not verify is an unauthenticated write into your system.
- Idempotency. Deliveries retry. The same event will arrive twice, and your handler has to produce the same result the second time.
Delivery is not guaranteed
A webhook that fails to deliver is usually retried for a while and then dropped. That means a webhook alone cannot be your source of truth — you need a way to reconcile, which in practice means a periodic poll anyway, just a much cheaper one.
| Pattern | Cost | Completeness |
|---|---|---|
| Webhook only | Lowest | Gaps on failed delivery |
| Polling only | Highest | Complete |
| Webhook + periodic reconcile | Low | Complete |
The third row is the production answer almost everywhere.
Why public social data rarely has one
A webhook requires the provider to know what you care about and to be watching it for you. For a platform's own developers — your account, your posts — that is straightforward, and official APIs offer it. For public data about accounts you do not own, there is nobody with an obligation to watch on your behalf.
So for reading public profiles and posts, polling is not a design choice. It is the only mechanism available, and the question becomes how often and at what cost rather than whether.
The substitute worth knowing about
A stored time series gives you the thing a webhook would have given you — knowing something changed without having asked repeatedly — after the fact rather than in real time. For "is this growing", after the fact is usually sufficient; for "reply within a minute", it is not.