APITube Help Center

How to Filter News by Sentiment

Choose article tone, set score bounds or compare headline and body

Tasha Tatum

Written by Tasha Tatum

August 22, 2026

Updated October 16, 2026

Open this example in the API Playground ↗

How to filter news by sentiment

Add sentiment.overall.polarity to select positive, neutral or negative articles. Use title or body sentiment for a specific part of the text, or score bounds for a numeric threshold:

curl "https://api.apitube.io/v1/news/everything?sentiment.overall.polarity=positive&api_key=YOUR_API_KEY"

Send the key through api_key or X-API-Key. Without sentiment conditions, the search does not restrict article tone.

What sentiment values can I filter by?

Use positive, neutral or negative, ignoring case. Choose the part of the article:

  • sentiment.overall.polarity: the whole article.
  • sentiment.title.polarity: the headline.
  • sentiment.body.polarity: the article body.

An unknown label returns 400: ER0298 for overall, ER0296 for title or ER0297 for body. Polarity describes tone, rather than whether the reporting is correct or an event is beneficial.

How to filter by a numeric sentiment score

Set an exact .score, a .score.min or a .score.max from -1 to 1. For example:

curl "https://api.apitube.io/v1/news/everything?sentiment.overall.score.min=0.5&api_key=YOUR_API_KEY"

Combine bounds to select a band:

curl "https://api.apitube.io/v1/news/everything?sentiment.overall.score.min=-0.5&sentiment.overall.score.max=-0.1&api_key=YOUR_API_KEY"

Each overall, title or body layer supports score filters. Non-numeric or out-of-range values return 400; an invalid overall minimum can return ER0095.

How to find articles where the headline and body disagree

Enable sentiment.mixed=1 for different title and body polarity, or sentiment.consistent=1 for matching polarity:

curl "https://api.apitube.io/v1/news/everything?sentiment.mixed=1&api_key=YOUR_API_KEY"

Both accept 0 or 1; 0 leaves that helper disabled. Invalid values return ER0243 or ER0244. A tone mismatch alone does not prove clickbait. See clickbait filters.

How to combine sentiment with other filters

Add language, company, dates or sorting:

curl "https://api.apitube.io/v1/news/everything?sentiment.overall.polarity=positive&language.code=en&organization.name=Netflix&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"

Supported news endpoints share these filters, including Everything, Top Headlines, Story and category, topic, industry or entity news. See category filtering for subject conditions.

What does the sentiment data look like in the response?

Articles include scores and labels for each layer:

{
    "sentiment": {
        "overall": { "score": 0.62, "polarity": "positive" },
        "title": { "score": 0.10, "polarity": "neutral" },
        "body": { "score": 0.71, "polarity": "positive" }
    }
}

Filters use these fields. For example, sentiment.body.score.min sets a minimum for the returned body score.

Common Questions

Can I filter the headline and body separately?

Yes. Use sentiment.title.* or sentiment.body.*. Overall sentiment is a separate combined view.

What sentiment score range does the API use?

-1 to 1, from negative to positive. Keep exact values and bounds within that range.

Which endpoints support sentiment filtering?

Everything, Top Headlines, Story and category, topic, industry or entity news support these filters alongside other conditions and sorting.


Related Articles