Recipes / Detect layoff announcements as they are reported
Detect layoff announcements as they are reported
/stories in semantic 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=company cuts jobs restructuring workforce reduction
&mode=semantic
&from=2026-07-22
&to=2026-07-29 As a call you can paste:
curl -s -G "https://api.unzoi.com/stories" \
-H "x-api-key: $UNZOI_KEY" \
--data-urlencode "q=company cuts jobs restructuring workforce reduction" \
--data-urlencode "mode=semantic" \
--data-urlencode "from=2026-07-22" \
--data-urlencode "to=2026-07-29"
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
Story clusters covering announcements in the window. Company statements and press coverage of the same announcement collapse together, so you get the event once rather than the release plus everyone who rewrote it.
Field by field: the /stories response reference.
How this goes wrong
Building this on a keyword alert for the word "layoffs". It works in testing because your test case used that word, and then misses announcements phrased as restructuring — which is most of the ones a company would prefer you did not notice.
Adapting it
The same pattern covers plant closures, office relocations and hiring freezes — all are events with a formal announcement and an informal vocabulary. Narrow to a sector by adding industry terms to the query rather than by filtering outlets, since layoff coverage crosses from trade press to general news the moment the numbers are large enough. To watch one company specifically, add its name and widen the window, because these are announced infrequently and a short window usually returns nothing.
Running it for real
Poll every few hours rather than continuously; announcements cluster around market open and company reporting calendars, and a tighter loop mostly spends requests on empty windows. Treat the first hour after an announcement as unreliable for outlet counts — syndication has not propagated yet, so a story that looks minor at minute five can be everywhere by minute ninety. If you are feeding this to an alerting channel, wait for the second poll before escalating.
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.