Metadata-Version: 2.5
Name: news-trends-api
Version: 1.0.0
Summary: News mention volume via the Trends API. Media monitoring without scraping news sites.
Project-URL: Homepage, https://trendsapi.ai
Project-URL: Documentation, https://trendsapi.ai/#quickstart
Project-URL: Repository, https://github.com/trendsapi-ai/news-trends-api
Project-URL: Bug Tracker, https://github.com/trendsapi-ai/news-trends-api/issues
Project-URL: Get API key, https://trendsapi.ai/#get-key
Author-email: Trends API <hello@trendsapi.ai>
License-Expression: MIT
License-File: LICENSE
Keywords: media-monitoring,news,news-api,news-trends,trendsapi
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: trendsapi>=1.0.0
Description-Content-Type: text/markdown

# News mention-volume API

News mention volume via the Trends API. Media monitoring without scraping news sites.

[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
[![PyPI](https://img.shields.io/pypi/v/news-trends-api.svg)](https://pypi.org/project/news-trends-api/)

Key: [trendsapi.ai/#get-key](https://trendsapi.ai/#get-key). Full contract: [trendsapi-ai/trendsapi](https://github.com/trendsapi-ai/trendsapi).

JS: [`news-trends-api`](https://www.npmjs.com/package/news-trends-api).

## Install

```bash
pip install news-trends-api
```

```python
from news_trends_api import TrendsAPI

client = TrendsAPI()  # TRENDSAPI_KEY
series = client.get_time_series("federal reserve")
growth = client.get_growth("federal reserve", percent_growth=["12M"])
hot = client.get_live(limit=10)
```

Keyword helpers default to `source: "news volume"`. Override `source=` for any other platform. Official full client: [`trendsapi`](https://pypi.org/project/trendsapi/).

## Call

| Field | Value |
|---|---|
| Endpoint | `POST https://api.trendsapi.ai/api` |
| Auth | `Authorization: Bearer $TRENDSAPI_KEY` |
| History | `source: news volume` with `get_time_series` or `get_growth` |
| Keyword | Any phrase, e.g. federal reserve |
| Live `type` | Google News Top News |

```bash
curl -sS -X POST https://api.trendsapi.ai/api \
  -H "Authorization: Bearer $TRENDSAPI_KEY" \
  -H "Content-Type: application/json" \
  --max-time 60 \
  -d '{"mode":"get_time_series","source":"news volume","keyword":"federal reserve"}'
```

This source can be slow. HTTP 504 HTML is not billed. Retry.

`source: news sentiment` is tone, not mention count.

Site: [https://trendsapi.ai/trends/news-trends](https://trendsapi.ai/trends/news-trends). GitHub: [trendsapi-ai/news-trends-api](https://github.com/trendsapi-ai/news-trends-api).

## License

MIT. See [LICENSE](LICENSE).
