YouTube Trends API logo

YouTube Trends API

Queries YouTube interest history, growth windows, and live trending feeds with a Trends API key.

Install YouTube Trends 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": {
    "youtube-trends-api-2": {
      "command": "uvx",
      "args": [
        "trendsapi-youtube"
      ],
      "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-youtube

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

YouTube Trends API MCP server exposes YouTube search-interest history, growth comparisons, and live trending data through the Trends API. Its documented Python and JavaScript clients use TRENDSAPI_KEY and return time-series points, growth results, or ranked trend rows. Reach for it when an agent needs trend analysis rather than video metadata; the API does not provide video details or regionCode filtering.

Use cases

  • Track search interest for a YouTube keyword over time
  • Compare keyword growth across preset or custom periods
  • Read ranked live YouTube trending topics
  • Convert historical trend points into pandas data

Key features

  • YouTube keyword time series
  • Multi-window growth analysis
  • Live trending feed access
  • Python async client
  • JavaScript and TypeScript support
  • 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 94d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 9d ago via OSV.dev · trendsapi-youtube (PyPI)

Adoption & maintenance

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

GitHub stars1Stargazers on the source repository.
Last commit1mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How YouTube Trends API works

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.

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 YouTube Trends API

YouTube Trends API is an MCP server that connects to the Trends API for YouTube search-interest data. Its main tools retrieve keyword time series, calculate growth across preset or custom periods, and return live or top-trending feeds. Results include indexed interest values, growth details, or ranked trend rows rather than video metadata.

Install the documented client with `pip install trendsapi-youtube` for Python or `npm install trendsapi-youtube` for JavaScript and TypeScript.

Set `TRENDSAPI_KEY` to a key from trendsapi.ai. Python reads this variable by default, and the JavaScript client receives the same key through its constructor configuration. The key is also used as the bearer credential for direct HTTP requests.

No. The documented value is a 0–100 YouTube search-interest index, and the live endpoint returns ranked labels and trend-feed fields. The source notes explicitly distinguish this data from video metadata.

It documents Python, JavaScript, TypeScript, direct HTTP, Node 18+, Deno, Bun, and Workers, so Cursor compatibility cannot be confirmed from these materials.

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 PreviewYouTube Trends API AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/youtube-trends-api-2?style=directory)](https://allmcps.com/mcp/youtube-trends-api-2)
HTML Embed
<a href="https://allmcps.com/mcp/youtube-trends-api-2"><img src="https://allmcps.com/api/badge/youtube-trends-api-2?style=directory" alt="YouTube Trends API on AllMCPs" /></a>