# YouTube Trends API [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/trendsapi-ai/youtube-trends-api  
**GitHub Stars:** 1  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/youtube-trends-api-2

## Description
YouTube search volume and trending videos over time. Free key at trendsapi.ai

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "youtube-trends-api": {
    "command": "uvx",
    "args": ["trendsapi-youtube"],
    "env": {
      "TRENDSAPI_KEY": ""
    }
  }
}
```

**Requires environment variables:** `TRENDSAPI_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What YouTube Trends API MCP server does

The YouTube Trends API MCP server provides access to YouTube search-interest data through the Trends API. It covers three main tasks: retrieving historical interest for a keyword, measuring growth across one or more time windows, and reading a live YouTube trending feed.

Historical results contain dated values on a 0–100 index for the requested term. When available, the response also includes absolute volume, along with the keyword and source information. Growth responses identify the search term and source, then return one result for each requested period with growth, direction, dates, and values.

Live results contain a snapshot timestamp, feed type, pagination fields, and rows in the form of rank and label. These rows describe what is currently trending, rather than returning video metadata.

## How it works

The underlying HTTP API accepts POST requests at `https://api.trendsapi.ai/api`. Requests authenticate with a bearer token from `TRENDSAPI_KEY`. Historical lookups use `source: "youtube"` with either the `get_time_series` or `get_growth` mode. Live YouTube data uses the exact feed type `YouTube Trending`; this value is different from the lowercase `youtube` source used for keyword history.

The supplied Python package supports synchronous and asynchronous clients. The JavaScript and TypeScript package supports Node 18+, Deno, Bun, and Workers. Python responses use dataclasses, while JavaScript returns typed objects with the same field structure. Several growth windows can be included in one request, and each successful asynchronous call counts as one billed request.

## Setup and configuration

Install the Python package with `pip install trendsapi-youtube`, or install the JavaScript package with `npm install trendsapi-youtube`. Set `TRENDSAPI_KEY` to a key obtained from trendsapi.ai. The same key is used by the HTTP API and both SDKs.

Python 3.9 or later is required. A Python client can read the environment variable automatically, or receive the key explicitly. JavaScript and TypeScript clients accept the key in the constructor configuration. The documentation does not specify an MCP client configuration, transport command, or server launch command, so those details should not be assumed from the SDK documentation alone.

## Tools and capabilities

The YouTube Trends API MCP server documents these operations:

- `get_time_series` / `getTimeSeries`: Fetches historical points for a keyword. The optional `data_mode` and `source` parameters control the request.
- `get_growth` / `getGrowth`: Compares a keyword across preset periods such as `7D`, `3M`, `12M`, `YTD`, or custom date ranges. The default window is `12M`.
- `get_live` / `getLive`: Returns a paginated live trend feed with optional `limit` and `offset` values.
- `get_top_trends` / `getTopTrends`: Retrieves a top-trends feed using a specified type.

Returned time-series data can be converted into a pandas DataFrame in Python. The API client also supports sources beyond YouTube when a different `source` is supplied, although the keyword helpers default to YouTube.

## Limitations and notes

The `value` field is a relative 0–100 YouTube search-interest index, not a video view count or metadata record. The endpoint does not support `regionCode`. Use lowercase `youtube` for the history source and exact casing `YouTube Trending` for the live feed type; mixing these values produces a 400 error.

A 404 indicates that no series exists for the keyword and should not be retried. A 401 usually means the API key is missing or invalid, while 429 indicates quota exhaustion. The clients retry 5xx responses before raising an error. Raw HTTP responses place the payload in a JSON-encoded `body` field, which must be decoded separately when using curl.

_Full upstream README: https://allmcps.com/mcp/youtube-trends-api-2/readme_

