Recipes / Find coverage with a particular tone
Find coverage with a particular tone
/search in hybrid mode. The parameters matter less
than the reasoning behind them, so that is most of what is below.
The request
GET /search
?q=<subject>
&mode=hybrid
&from=<now - 7d>
# each result carries a tone score; filter client-side
results.filter(a => a.tone > 2) Why these parameters
Every article carries a tone score derived from its language. Filter on it after retrieval rather than trying to express tone in the query, because a query for "good news about X" retrieves articles that discuss whether the news is good, which is a different set.
What comes back
Articles with a numeric tone value. Strongly positive and strongly negative both sit far from zero; most coverage clusters near it, so a threshold of roughly ±2 separates the genuinely charged pieces from the neutral bulk.
How this goes wrong
Averaging tone across an outlet set you did not choose. Editorial stance moves tone more than events do, so the average describes which publishers your query reached.
When this is the wrong tool
Tone is computed from wording, not from meaning. An article reporting a disaster in measured language scores less negative than an opinion piece complaining about a minor inconvenience. It is a useful filter and a poor metric — do not build a dashboard whose headline number is average tone.