Recipes / Produce a machine-readable daily brief
Produce a machine-readable daily brief
/stories in recent mode. This page is the
operational half — what comes back, how it breaks, and what running it for real takes.
The request
GET /stories
?mode=recent
&language=<iso>
&from=<24h ago>
&limit=25
# hand the collapsed set to the model in one call As a call you can paste:
curl -s -G "https://api.unzoi.com/stories" \
-H "x-api-key: $UNZOI_KEY" \
--data-urlencode "mode=recent" \
--data-urlencode "language=<iso>" \
--data-urlencode "from=<24h ago>" \
--data-urlencode "limit=25"
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
Twenty-five distinct events with outlet counts, small enough to fit alongside a system prompt and whatever else the model needs.
Field by field: the /stories response reference.
How this goes wrong
Letting the model pick what matters from an unranked list. Sort by outlet count before handing it over; the model will otherwise weight by position and order becomes an accidental editorial decision.
Adapting it
Running one call per beat rather than a single general one produces a brief that is complete for each beat, at the cost of several requests — the right trade whenever the brief has a defined scope. Adding a language filter per edition gives per-market briefs from the same shape. For a longer horizon, widen to a week and lower the limit rather than raising it.
Running it for real
One call a day at a fixed hour is the whole cost, which makes this the cheapest recipe here and worth over-provisioning: request more events than you intend to use and let the model discard, rather than tuning the limit down. Pass the outlet and article counts through to the model explicitly and tell it what they mean, or it will weight events by their position in the list. Pin the window to a fixed clock time rather than to now-minus-24h, or the brief will drift by however long the previous run took.
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.