Metadata-Version: 2.5
Name: trendsapi-youtube
Version: 1.0.0
Summary: YouTube search interest trends via the Trends API. History, growth, and live YouTube trending.
Project-URL: Homepage, https://trendsapi.ai
Project-URL: Documentation, https://trendsapi.ai/#quickstart
Project-URL: Repository, https://github.com/trendsapi-ai/youtube-trends-api
Project-URL: Bug Tracker, https://github.com/trendsapi-ai/youtube-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: search-interest,trendsapi,youtube,youtube-api,youtube-trends
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

# YouTube search-interest API

YouTube search interest trends via the Trends API. History, growth, and live YouTube trending.

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

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

JS: [`trendsapi-youtube`](https://www.npmjs.com/package/trendsapi-youtube).

## Install

```bash
pip install trendsapi-youtube
```

```python
from trendsapi_youtube import TrendsAPI

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

Keyword helpers default to `source: "youtube"`. 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: youtube` with `get_time_series` or `get_growth` |
| Keyword | Search phrase, e.g. sourdough starter |
| Live `type` | YouTube Trending |

```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":"youtube","keyword":"sourdough starter"}'
```

`value` is 0-100 for this term on YouTube only, not video metadata.

`type` is `YouTube Trending`, not `youtube`.

No `regionCode` on this endpoint.

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

## License

MIT. See [LICENSE](LICENSE).
