News sentiment API

World News API returns a sentiment score between -1 (negative) and 1 (positive) with every English and German article, and lets you filter search-news with min-sentiment and max-sentiment. The score costs nothing extra: a search that returns 100 scored articles costs 2 points, the same as any search. Articles in other languages are not scored.

  • Field: sentiment, one number per article from -1 to 1, for example -0.545 in the docs example.
  • Filters: min-sentiment and max-sentiment, each between -1 and 1.
  • Languages: English (en) and German (de) only.
  • Where: in search-news and retrieve-news results; extract-news with analyze=true also detects sentiment for an article URL you supply (2 extra points).
  • Cost: included in the search price of 1 point plus 0.01 points per result.

The sentiment field

Each article in a search-news or retrieve-news response has a sentiment value next to its title, text, language and source country. Values below 0 lean negative, values above 0 lean positive. Example response (shortened), the documented response to text=earth+quake&language=en&earliest-publish-date=2024-04-01:

{
  "offset": 0,
  "number": 10,
  "available": 83,
  "news": [
    {
      "id": 206030983,
      "title": "Nearly 30 aftershocks recorded around NJ quake epicenter since Friday",
      "summary": "Twenty nine areas around Whitehouse Station, NJ, which was the epicenter of the quake, have since reported rumbles.",
      "url": "https://nypost.com/2024/04/06/us-news/nearly-30-aftershocks-recorded-around-nj-quake-epicenter/",
      "publish_date": "2024-04-06 22:44:18",
      "category": "environment",
      "language": "en",
      "source_country": "us",
      "sentiment": -0.545
    }
  ]
}

A story about aftershocks after an earthquake scores -0.545: clearly negative, not the extreme end of the scale. The docs do not describe the model behind the score, and there is no confidence value, so check a sample of scores against your own reading before you report on them.

Filter news by sentiment

Use max-sentiment to keep only negative articles, min-sentiment for positive ones, or both for a band. Always set language=en or language=de, because articles in other languages have no score to filter on. Strongly negative English coverage of a company since November 1:

curl -G "https://api.worldnewsapi.com/search-news" \
  -H "x-api-key: YOUR_API_KEY" \
  --data-urlencode "entities=ORG:Boeing" \
  -d "language=en" -d "max-sentiment=-0.5" \
  -d "earliest-publish-date=2026-11-01" -d "number=50"  # use a date from the last 30 days on the free plan

More patterns:

  • Positive German articles on a topic: text=Energiewende&language=de&min-sentiment=0.3
  • Roughly neutral reporting: min-sentiment=-0.2&max-sentiment=0.2
  • Negative coverage from chosen outlets: news-sources=https://www.bbc.co.uk,https://www.theguardian.com&max-sentiment=-0.3

The filters combine with every other search-news parameter, including entities, source-country, categories and the date range, so you can search the archive since January 1, 2022 the same way.

Aggregate sentiment per day

For a trend line, request one day at a time and average the scores. This script prints the article count, the mean score and the share of clearly negative articles for a company over 7 days:

from datetime import date, timedelta
from statistics import mean

import requests

URL = "https://api.worldnewsapi.com/search-news"
HEADERS = {"x-api-key": "YOUR_API_KEY"}


def day_sentiment(entity, day, language="en"):
    params = {"entities": entity, "language": language, "number": 100,
              "earliest-publish-date": f"{day} 00:00:00",
              "latest-publish-date": f"{day} 23:59:59"}
    r = requests.get(URL, params=params, headers=HEADERS, timeout=30)
    r.raise_for_status()
    data = r.json()
    scores = [n["sentiment"] for n in data["news"] if n.get("sentiment") is not None]
    return data["available"], scores


last_day = date.today() - timedelta(days=1)  # the free plan searches the last month only
for i in range(7):
    day = last_day - timedelta(days=6 - i)
    available, scores = day_sentiment("ORG:Tesla", day)
    if scores:
        negative = sum(s < -0.25 for s in scores) / len(scores)
        print(day, available, "articles", f"mean {mean(scores):+.2f}", f"negative {negative:.0%}")

The 7 requests cost at most 14 points, well inside the free plan's 50 points a day. Each request scores the first 100 matching articles of the day. If available is higher and you need all of them, page with offset at 2 points per 100 articles; otherwise treat the 100 as a sample and say so in your chart. The news sentiment analysis guide has a longer walkthrough.

Compare outlets and countries

Run the same query once per group and compare the means. For English coverage, split by source-country=us, gb, in or au; for German, de or at. To compare publishers, pass one outlet at a time in news-sources. Each group costs one request, so a comparison of 4 countries over 7 days is 28 requests and at most 56 points. The source_country field in each result also lets you group a single mixed result set.

What the sentiment API does not do

  • Only English and German. For other languages, run your own model on the text field.
  • One score per article. There is no sentiment per entity or per aspect, so an article about two companies gets one score.
  • No documented method or confidence. Validate on a sample before you base decisions on it.
  • No stored history. The standard terms of use do not allow copying or storing API data, derived data included; with prior written permission you may cache user-requested data for up to 1 hour. For a stored sentiment index you need a separate agreement: ask at [email protected].
  • Other options. NewsData.io includes sentiment on every plan, the free one too (source); NewsAPI.ai scores English articles only (source). Checked November 22, 2026.

Related: financial news, media monitoring, historical news, news API comparison.

Frequently asked questions

Which languages does the news sentiment API support?

English and German. Articles in other languages do not get a sentiment score.

What does the sentiment score mean?

It is a number from -1 to 1 for the whole article. Values below 0 lean negative and values above 0 lean positive; the docs example about earthquake aftershocks scores -0.545.

How do I filter news by sentiment?

Add min-sentiment, max-sentiment or both to a search-news request, with values between -1 and 1, and set language to en or de. For example max-sentiment=-0.5 returns only strongly negative articles.

Does sentiment cost extra?

No. The score comes with every English and German article at the normal search price of 1 point plus 0.01 points per result. Only extract-news charges 2 extra points when analyze is true.

Can I get the sentiment toward one company inside an article?

No. There is one score per article, not per entity. Filter by entity to find the articles, then judge mixed articles yourself.

Last updated November 22, 2026 by the World News API team. Spotted an error? Tell us at [email protected] or on Discord.

More from World News API

  • Compare news APIs
    World News API next to NewsAPI.org, NewsData.io, GNews, Mediastack and others.
  • Guides
    Step-by-step tutorials with working code.
  • Use cases
    AI agents, finance, media monitoring and research.
  • Documentation
    Every endpoint with parameters, examples and quotas.

Get a free API key