News Sentiment API logo

News Sentiment API

Queries Trends API sentiment history and growth for keywords over time using a single API key.

Install News Sentiment API

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "news-sentiment-api-2": {
      "command": "uvx",
      "args": [
        "trendsapi-news-sentiment"
      ],
      "env": {
        "TRENDSAPI_KEY": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

uvx trendsapi-news-sentiment

Process exited before answering initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

The News Sentiment API MCP server connects agents to Trends API data for sentiment trends over time. It supports keyword time series, growth comparisons across standard or custom periods, and top-trend queries through the Trends API contract. Results can include indexed values, dates, keyword echoes, and available volume fields. Reach for it when an agent needs historical news tone without scraping individual outlets or articles.

Use cases

  • Track sentiment for a company over time
  • Compare news tone across standard periods
  • Analyze custom launch-date sentiment changes
  • Build pandas reports from sentiment history

Key features

  • Keyword sentiment time series
  • Preset and custom growth windows
  • Top-trend queries
  • Synchronous and asynchronous Python clients
  • REST API access
  • Pandas data preparation

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

20/20 checks healthy over the last 95d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 7d ago via OSV.dev · trendsapi-news-sentiment (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

Last commit3mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.

How News Sentiment API works

What the News Sentiment API MCP server does

The News Sentiment API MCP server provides access to Trends API measurements for the news sentiment source. It lets an agent request a sentiment time series for a keyword, compare sentiment growth across time windows, and retrieve top-trend results. Example keywords can be phrases such as nvidia, but the API accepts any phrase supported by the upstream service.

Time-series responses contain dated values on a 0–100 index for the requested series. Each point includes the queried keyword and date, while absolute volume and pipeline labels may be available depending on the result. Growth responses identify the search term and source, then return one result for each requested period with growth, direction, dates, and values.

The News Sentiment API MCP server is intended for trend analysis rather than article-level classification. It does not provide per-article sentiment labels or an outlet breakdown. A negative growth result means that the measured tone declined compared with the earlier period; it does not mean the company or topic is inherently negative.

How it works

Requests are sent to the Trends API endpoint at https://api.trendsapi.ai/api as JSON POST requests. Authentication uses a bearer token supplied through TRENDSAPI_KEY. The news sentiment history operations use the news sentiment source and either the get_time_series or get_growth mode.

Growth comparisons can use presets such as 7D, 30D, 3M, 12M, YTD, and 5Y. A custom comparison can instead provide a name, recent date, and baseline date. Multiple comparison windows count as one request. Each successful asynchronous call counts as one billed request.

The documented Python package exposes synchronous and asynchronous clients. Python responses use typed objects and dataclasses, so time-series values are accessed with properties such as .date and .value, while growth results use properties such as .results[0].growth and .results[0].direction.

Setup and configuration

Install the documented Python package with pip install trendsapi-news-sentiment, then set TRENDSAPI_KEY to a key obtained from trendsapi.ai. Python 3.9 or newer is required. The same key is used by the HTTP API and the Python client; alternatively, the client can receive the key directly as an argument.

The News Sentiment API MCP server uses lowercase news sentiment for the source. Requests using an incorrect source or an incompatible type can return HTTP 400. A missing or invalid key produces HTTP 401, while HTTP 404 indicates that no series exists for the keyword and should not be retried.

Tools and capabilities

  • Retrieve a keyword sentiment history with get_time_series.
  • Compare sentiment across preset or custom periods with get_growth.
  • Request top-trend data with get_top_trends.
  • Run equivalent requests through the asynchronous Python client.
  • Convert returned time-series dataclasses into pandas data for date parsing and resampling.
  • Call the underlying REST endpoint directly with a bearer token and JSON payload.

Limitations and notes

The News Sentiment API MCP server depends on the Trends API key, quota, and upstream response availability. HTTP 429 indicates that the quota was exceeded. Server-side 5xx errors are retried by the documented client before it raises an error; raw HTTP callers must handle failures themselves.

The raw HTTP response places the body field in a JSON string, so direct curl users must decode that field separately. The SDKs perform that decoding. The material documents the Trends API, its Python package, and HTTP contract, but does not specify an MCP transport, client-specific setup, or a separate MCP installation command.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about News Sentiment API

News Sentiment API is an MCP server that connects AI agents to the Trends API for news sentiment data. Its main tools retrieve keyword time series, calculate growth across preset or custom periods, and query top trends. Results include dated index values and growth details, without per-article labels or outlet breakdowns.

Install the documented Python package with `pip install trendsapi-news-sentiment` and set `TRENDSAPI_KEY` to your Trends API key. The material specifies Python 3.9 or newer, but does not document a separate MCP transport or installation command.

Call `get_time_series` with the keyword, using the `news sentiment` source. The underlying request uses the `get_time_series` mode and returns dated values on a 0–100 index, along with the keyword and any available volume or source fields.

Yes, use `get_growth` with a custom comparison containing a name, recent date, and baseline date. The same method also supports presets such as `7D`, `3M`, `12M`, `YTD`, and `5Y`, with one result returned for each requested window.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewNews Sentiment API AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/news-sentiment-api-2?style=directory)](https://allmcps.com/mcp/news-sentiment-api-2)
HTML Embed
<a href="https://allmcps.com/mcp/news-sentiment-api-2"><img src="https://allmcps.com/api/badge/news-sentiment-api-2?style=directory" alt="News Sentiment API on AllMCPs" /></a>