Recipes / Query an exact window, down to the minute
Query an exact window, down to the minute
/search in keyword mode. This page is the
operational half — what comes back, how it breaks, and what running it for real takes.
The request
GET /search
?q=<subject>
&from=20260729T140000
&to=20260729T160000 As a call you can paste:
curl -s -G "https://api.unzoi.com/search" \
-H "x-api-key: $UNZOI_KEY" \
--data-urlencode "q=<subject>" \
--data-urlencode "from=20260729T140000" \
--data-urlencode "to=20260729T160000"
For an agent rather than a script, the same query is the search_news
MCP tool with these as its arguments.
Parameters used here
What comes back
Only articles published inside the window. Ordering by timestamp gives you the propagation sequence: who published first, and how long the rest took.
Field by field: the /search response reference.
How this goes wrong
Forgetting that publication timestamps reflect when the publisher stamped the article, which is not always when it appeared, and is occasionally back-dated. For sub-hour analysis, treat the ordering as indicative rather than forensic.
Adapting it
Widening the window in fixed steps and re-running turns this into a propagation curve: how many outlets had the story at fifteen minutes, an hour, six hours. That series is more informative than any single window and costs one call per step. For comparing two events, hold the window width constant and align on the announcement rather than on the clock, or you are comparing different amounts of elapsed time.
Running it for real
Timestamps are UTC and your announcement probably is not, so convert before constructing the window rather than after reading the results — an hour of offset error is larger than most windows this recipe is used for. Run the query at least once well after the window closes as well as during it: late-indexed articles change the counts, and a study run in real time and never re-run will systematically under-count the slower publishers.
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.