Recipes / Notice when coverage stops
Notice when coverage stops
/stories in hybrid mode. This page is the
operational half — what comes back, how it breaks, and what running it for real takes.
The request
GET /stories
?q=<subject>
&mode=hybrid
&from=<now - 24h>
# alert when the count drops below the trailing baseline As a call you can paste:
curl -s -G "https://api.unzoi.com/stories" \
-H "x-api-key: $UNZOI_KEY" \
--data-urlencode "q=<subject>" \
--data-urlencode "mode=hybrid" \
--data-urlencode "from=<now - 24h>"
For an agent rather than a script, the same query is the list_stories
MCP tool with these as its arguments.
Parameters used here
What comes back
A count you compare against a trailing baseline rather than a result set you read. Store the daily count and alert on a sustained drop rather than a single quiet day.
Field by field: the /stories response reference.
How this goes wrong
Alerting on a one-day gap. Weekends, holidays and publication rhythms produce constant single-day quiet periods; only a multi-day deviation from the baseline for that day-of-week means anything.
Adapting it
The inverse threshold — alerting on coverage resuming after a quiet period — is often more actionable and much less noisy, since resumption has fewer innocent explanations than cessation. For a watch list, compute the baseline per subject rather than globally: subjects differ by an order of magnitude in their normal volume and a shared threshold fires constantly for the loud ones and never for the quiet ones.
Running it for real
Build the trailing baseline from at least four weeks so it carries the weekly cycle, and hold a separate holiday calendar per market or the year-end lull will fire every alert you have. Poll on a fixed schedule rather than an approximate one, because the measurement is a count per interval and a variable interval makes the series meaningless. Keep the alert advisory: this is the recipe with the highest false-positive rate here, and it is the one most likely to be wired to something that pages a person.
Related recipes
Why this approach
The case for these parameters over the obvious alternatives — and when this recipe is the wrong tool entirely — is on the recipe's page on unzoi.com. It is kept there rather than repeated here, so the argument and the operations cannot drift apart.