Recipes / Compare how two markets covered the same event
Compare how two markets covered the same event
/search 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 /search?q=<event>&mode=semantic&language=<a>&from=…&to=…
GET /search?q=<event>&mode=semantic&language=<b>&from=…&to=… As a call you can paste:
curl -s -G "https://api.unzoi.com/search" \
-H "x-api-key: $UNZOI_KEY" \
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
Two article sets over the same period. Compare volume, the tone distribution, and which outlets participated. Volume differences usually say more about the size of the local press than about attention, so normalise before concluding anything.
Field by field: the /search response reference.
How this goes wrong
Comparing sentiment across markets without fixing the outlet sets. Editorial stance varies more between publishers than between countries, so an unfixed comparison measures which publishers each query happened to reach.
Adapting it
To compare framing rather than volume, sample a fixed number of articles per market rather than taking everything, or the larger press will dominate any qualitative reading. To compare over time, hold both the outlet sets and the window length constant between runs; changing either makes the series meaningless and the change is easy to make accidentally.
Running it for real
This is analysis rather than monitoring, so run it deliberately rather than on a schedule. Record the exact queries, windows and outlet sets alongside the results — comparative findings are the ones most likely to be challenged, and being unable to reproduce your own numbers six weeks later is a bad position to defend from.
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.