Metadata-Version: 2.5
Name: google-trends-client
Version: 1.0.1
Summary: Python client for Google Trends data via the Trends API. Normalized 0-100 scores, history + growth, free tier. Not a scraper.
Project-URL: Homepage, https://trendsapi.ai
Project-URL: Documentation, https://trendsapi.ai/#quickstart
Project-URL: Repository, https://github.com/trendsapi-ai/google-trends-api
Project-URL: Bug Tracker, https://github.com/trendsapi-ai/google-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: google-trends,google-trends-api,google-trends-client,pytrends,seo,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

# Google Trends API

Python client for Google Trends data via the Trends API. Normalized 0-100 scores, history + growth, free tier. Not a scraper.

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

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

JS: [`google-trends-js`](https://www.npmjs.com/package/google-trends-js), [`google-trends-node`](https://www.npmjs.com/package/google-trends-node), [`google-trends-client`](https://www.npmjs.com/package/google-trends-client).

## Install

```bash
pip install google-trends-client
```

```python
from google_trends_client import TrendsAPI

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

Keyword helpers default to `source: "google search"`. 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: google search` with `get_time_series` or `get_growth` |
| Keyword | Any phrase, e.g. heat pump |
| Live `type` | Google Trends |

```bash
curl -sS -X POST https://api.trendsapi.ai/api \
  -H "Authorization: Bearer $TRENDSAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mode":"get_time_series","source":"google search","keyword":"heat pump"}'
```

Related sources (same endpoint, different `source`): `google images`, `google news`, `google shopping`.

`value` is 0-100 for this term on Google web search, not Ads impressions.

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

## License

MIT. See [LICENSE](LICENSE).
