REST API Reference
One POST endpoint. Set mode in the JSON body to choose time series, growth, or top trends.
Get my free API key
By continuing you agree to our Terms & Privacy Policy.
Connect
Add to your AI in 30 seconds
Connect with your TrendsMCP account. No API key to copy.
- Add the connector below. The name and URL are prefilled.
- Sign in to TrendsMCP and approve access.
- Start a chat with TrendsMCP enabled and ask a trend question.
Set up manually
In Claude, open Settings → Connectors and add a custom connector named TrendsMCP. Enter this URL, then connect and sign in.
https://www.trendsmcp.ai/mcpGet your free API key, then add TrendsMCP from your account.
- Sign up or log in to your TrendsMCP account.
- Choose Cursor there and add the server with your key included.
Set up manually
In Cursor's MCP settings, add a remote server. Use this URL and the API-key configuration under “API key setup / other AI clients” below.
https://api.trendsmcp.ai/mcpConnect with your TrendsMCP account. No API key to copy.
- In ChatGPT, enable Developer mode under Settings → Security and login.
- Open Plugins below and select +. Name it TrendsMCP and enter the server URL.
- Choose OAuth, connect, and sign in to TrendsMCP. Add the connection to your chat.
https://www.trendsmcp.ai/mcpDeveloper mode availability depends on your account and workspace settings.
Set up manually
Create a plugin named TrendsMCP, use this URL for the connection, and select OAuth authentication.
https://www.trendsmcp.ai/mcpGet your free API key, then add TrendsMCP from your account.
- Sign up or log in to your TrendsMCP account.
- Choose VS Code there and add the server with your key included.
Set up manually
In the Command Palette, choose MCP: Add Server, then HTTP. For API-key authentication, use the configuration in the setup guide.
https://api.trendsmcp.ai/mcpTest your connection
Once connected, paste this into your AI and check that it uses TrendsMCP to fetch results.
API key setup / other AI clients
{"mcpServers": {"trends-mcp": {"url": "https://api.trendsmcp.ai/mcp","headers": {"Authorization": "YOUR_API_KEY"}}}}
import requestsresponse = requests.post("https://api.trendsmcp.ai/api",headers={"Authorization": "YOUR_API_KEY"},json={"mode": "","source": ,"keyword": "artificial intelligence","window": []"custom": {"recent": , "baseline": }"type": ,"category": ,"sort": ,"window": ,"limit": 25})print(response.json())
Authentication
An account is required to connect — both for MCP and the REST API. Sign up for free with your email and we'll send your API key instantly (100 requests/month, no credit card). Every request must then include that API key in the Authorization header. The Bearer prefix is optional; the bare key works too. How calls are counted is defined below (same rules for REST and MCP).
curl -X POST https://api.trendsmcp.ai/api \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"mode":"get_time_series","source":"google search","keyword":"bitcoin"}'import requests
res = requests.post(
"https://api.trendsmcp.ai/api",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"mode": "get_time_series", "source": "google search", "keyword": "bitcoin"}
)
res.raise_for_status()
data = res.json()const res = await fetch("https://api.trendsmcp.ai/api", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({ mode: "get_time_series", source: "google search", keyword: "bitcoin" })
});
const data = await res.json();What counts as a request
Each successful hit against the data API uses one unit of your monthly quota. Failed requests are free: only successful (2xx) calls count.
mode: "get_time_series"Historical weekly data for one source + keyword. One HTTP request = one quota unit.
mode: "get_growth"Point-to-point % change for one source + keyword. All percent_growth periods in the same call count as one request.
mode: "get_top_trends"MCP: 1 credit per 10 requested rows (max 10 credits per call). REST: one POST is one request. Each call is one feed (type).
Data Sources
Two types of sources are available, accessed via different operations. Keyword sources return a historical time series or growth metric for a specific keyword. Live feeds return the top-ranked items on a platform right now. No keyword needed.
Keyword sources (Get Trends & Get Growth)
Pass the source value below in your request body alongside keyword. On REST, set mode to "get_time_series" (time series) or "get_growth" (period-over-period %). For Get Growth, pass one source or a comma-separated list (e.g. amazon, tiktok, youtube). For Get Trends, pass one source per request. Scores are normalized to a 0–100 scale where the pipeline supports it.
| source | Description | Keyword format |
|---|---|---|
google search | Google search volume | Any keyword or phrase |
google images | Google image search volume | Any keyword or phrase |
google news | Google News search volume | Any keyword or phrase |
google shopping | Google Shopping search volume | Any keyword or phrase |
youtube | YouTube search volume | Any keyword or phrase |
tiktok | TikTok hashtag volume | Hashtag or topic |
reddit | Subreddit subscribers | Subreddit name only, no r/ prefix |
amazon | Amazon product search volume | Product name or category |
wikipedia | Wikipedia page views | Article title or topic |
news volume | News article mention volume | Any keyword or phrase |
news sentiment | News sentiment score (positive / negative) | Any keyword or phrase |
app downloads | Android app downloads | Android bundle ID e.g. com.openai.chatgpt |
app rankings | Android app store ranking charts | Android bundle ID e.g. com.himshers.hims |
npm | npm package weekly downloads | Exact package name, case-sensitive e.g. react, @babel/core |
steam | Steam concurrent players (monthly) | Game display name e.g. Elden Ring (first Steam search result) |
python | PyPI project downloads | Exact PyPI project name e.g. pandas, requests |
Live feeds (Get Top Trends)
Pass the type value below with mode: "get_top_trends". No keyword needed. Returns the current ranked leaders on that platform (e.g. the top 25 trending hashtags on TikTok right now).
| type | Platform / feed |
|---|---|
Google Trends | Top trending search terms on Google right now |
Google News Top News | Top news stories from Google News |
TikTok Trending Hashtags | Top trending hashtags on TikTok |
TikTok Trending Searches | Top trending search terms on TikTok |
YouTube Trending | Top trending videos on YouTube |
X (Twitter) Trending | Top trending topics on X |
Reddit Hot Posts | Hottest posts on Reddit's front page |
Reddit World News | Top posts in r/worldnews |
Wikipedia Trending | Most-viewed Wikipedia articles today |
Amazon Best Sellers Top Rated | Amazon top-rated best sellers across all categories |
App Store Top Free | Top free apps on the iOS App Store |
App Store Top Paid | Top paid apps on the iOS App Store |
Google Play | Top apps on Google Play |
Top Websites | Most-visited websites globally by traffic rank |
Spotify Top Podcasts | Top podcasts on Spotify |
Steam Most Played | Top games by concurrent live players |
Substack | Top Substack newsletters overall |
GitHub | Daily trending repositories across all languages |
IMDb MOVIEmeter | Top 100 most-popular movies by user activity |
Open Library Trending Books | Daily trending books from Open Library |
About this data
Cross-platform trend indices on a unified, normalized scale, produced by Trends MCP's analytics pipeline.
API modes
Every call is POST https://api.trendsmcp.ai/api with Authorization: Bearer <key> (the Bearer prefix is optional; the bare key works too). Pick the operation with the mode field in the JSON body.
| mode | What it returns | Required fields |
|---|---|---|
get_time_series | ~5 years of weekly points for a keyword | source, keyword |
get_growth | % change over one or more periods | source, keyword (percent_growth optional, default ["12M"]) |
get_top_trends | Live ranked leaderboard for a platform feed; sort: "rank_change" for biggest climbers | type (limit, category, sort, window optional) |
Canonical mode names match the MCP tools. Aliases: get_trends, trends, time_series, and lookup all mean get_time_series; growth means get_growth; top_trends means get_top_trends. Prefer the canonical names in user-facing REST examples.
Copy-paste examples
// Time series
{ "mode": "get_time_series", "source": "google search", "keyword": "bitcoin" }
// Growth
{ "mode": "get_growth", "source": "google search", "keyword": "bitcoin", "percent_growth": ["12M"] }
// Top trends
{ "mode": "get_top_trends", "type": "Google Trends", "limit": 10 }
// Top trends, biggest climbers this week (sort: "rank" is the default)
{ "mode": "get_top_trends", "type": "Amazon Best Sellers by Category", "category": "Toys Games", "sort": "rank_change", "window": "7d", "limit": 10 }https://api.trendsmcp.ai/apiTime series
Full historical weekly data for one source + keyword (~261 points, normalized 0–100). Aliases: "get_trends", "trends", "time_series", "lookup".
Quota: 1 request per source + keyword. History depth by plan: Free 90 days, Starter 1 year, Pro 2+ years, Business full history. Full rules
Request body
| Field | Type | Required | Description |
|---|---|---|---|
mode | string | Required | "get_time_series" (aliases: "get_trends", "trends", "time_series", "lookup") |
source | string | Required | One source per request. See Data Sources. |
keyword | string | Required | Keyword, brand, product, or topic. |
Response fields
| Field | Type | Description |
|---|---|---|
date | string | ISO 8601 date e.g. "2026-03-21" |
value | number | Normalized trend score, 0–100. |
volume | number | null | Absolute volume where available. null otherwise. |
keyword | string | The keyword queried. |
source | string | The data source used. |
{
"mode": "get_time_series",
"source": "google search",
"keyword": "bitcoin"
}[
{
"date": "2026-03-21",
"value": 47,
"volume": 25853617,
"keyword": "bitcoin",
"source": "google search"
},
// ... up to 261 weekly data points
]https://api.trendsmcp.ai/apiGrowth
Point-to-point % change over one or more periods (percent_growth window strings or, on REST only, custom date pairs). One source per request; comma-separated sources supported for comparison.
Quota: 1 request per source + keyword (all percent_growth periods in that call). History depth by plan: Free 90 days, Starter 1 year, Pro 2+ years, Business full history. Full rules
Request body
| Field | Type | Required | Description |
|---|---|---|---|
mode | string | Required | "get_growth" |
source | string | Required | One source or comma-separated list. See Data Sources. |
keyword | string | Required | Keyword, brand, or topic. Format depends on source — see Data Sources. |
percent_growth | array | Optional | Window strings or, on REST only, custom date objects. Defaults to ["12M"] if omitted. window is accepted as a REST alias. |
Growth windows
Any whole number plus a D, W, M, or Y suffix works, up to 5 years (e.g. 7D, 17D, 45D, 3M, 18M, 2Y), plus MTD, QTD, and YTD. Common examples:
7D14D30D1M2M3M6M9M12M1Y18M24M2Y36M3Y48M60M5YMTDQTDYTDCustom date range object (REST only)
| Field | Type | Description |
|---|---|---|
name | string | Optional label returned in results. |
recent | string | More recent date, YYYY-MM-DD. |
baseline | string | Baseline/comparison date, YYYY-MM-DD. |
Custom date objects are REST-only; MCP accepts the string windows above.
Response fields
| Field | Type | Description |
|---|---|---|
search_term | string | The keyword queried. |
data_source | string | The source used. |
results | array | One object per period requested. |
period | string | Period identifier, e.g. "12M" or custom name. |
growth | number | Percentage change, positive or negative. |
direction | string | "increase" or "decrease". |
recent_date | string | ISO 8601 date of the recent data point. |
baseline_date | string | ISO 8601 date of the baseline point. |
recent_value | number | Normalized score at the recent date. |
baseline_value | number | Normalized score at the baseline date. |
volume_available | boolean | Whether absolute volume exists for this source. |
recent_volume | number | null | Absolute volume at the recent date. |
baseline_volume | number | null | Absolute volume at the baseline date. |
volume_growth | number | null | Volume growth %, if available. |
metadata | object | total_data_points, calculations_completed, all_successful. |
{
"mode": "get_growth",
"source": "google search",
"keyword": "bitcoin",
"percent_growth": ["12M"]
}{
"mode": "get_growth",
"source": "amazon",
"keyword": "nike",
"percent_growth": [
{
"name": "Last Year",
"recent": "2025-12-31",
"baseline": "2024-12-31"
}
]
}Custom date objects are REST-only; MCP accepts the string windows.
{
"search_term": "nike",
"data_source": "google search",
"results": [
{
"period": "12M",
"growth": -12.31,
"direction": "decrease",
"recent_date": "2026-03-21",
"baseline_date": "2025-03-22",
"recent_value": 57,
"baseline_value": 65,
"volume_available": true,
"recent_volume": 24158298,
"baseline_volume": 27548936,
"volume_growth": -12.31
}
],
"metadata": {
"total_data_points": 261,
"calculations_completed": 1,
"all_successful": true
}
}https://api.trendsmcp.ai/apiTop trends
Live ranked leaderboard for one platform feed (type). No keyword needed. type is required on both REST and MCP; omitting it returns a 400 missing_parameter error.
Quota: MCP is 1 credit per 10 requested rows (max 10 per call). REST is 1 per POST. Full rules
Request body
| Field | Type | Required | Description |
|---|---|---|---|
mode | string | Required | "get_top_trends" |
type | string | Required | Feed name (see below). Required on both REST and MCP; omitting it returns a 400 missing_parameter error. |
category | string | Required | Required for Amazon Best Sellers by Category, Google Trends by Category, Top Websites, Substack by Category, and TikTok Trending Hashtags by Category; not used by other feeds. Case-insensitive; unknown values return an error listing the valid categories. Full lists under Data Sources. |
sort | string | Optional | "rank" (default): the current board, ordered by chart position. "rank_change": movers mode, ordered by biggest climb versus a baseline snapshot. Rows become objects with rank, keyword, prev_rank, rank_change. |
window | string | Optional | Baseline for sort="rank_change": "1d", "3d", "7d", "14d", or "30d" (default "30d"). If the feed updates too slowly for the window, the response returns count: 0 with a note naming the window to retry. |
limit | integer | Optional | Max items per feed (default 25, up to 200). Free plan boards return the top 10 only. |
offset | integer | Optional | Pagination offset per feed (default 0). Pinned to 0 on the Free plan; pagination is a paid feature. |
Available feeds
Amazon Best Sellers by CategoryAmazon Best Sellers Top RatedApp Store Top FreeApp Store Top PaidGitHubGoogle News Top NewsGoogle PlayGoogle TrendsGoogle Trends by CategoryIMDb MOVIEmeterOpen Library Trending BooksReddit Hot PostsReddit World NewsSteam Most PlayedSubstackSubstack by CategoryTop WebsitesSpotify Top PodcastsTikTok Trending HashtagsTikTok Trending Hashtags by CategoryTikTok Trending SearchesWikipedia TrendingX (Twitter) TrendingYouTube Trending{
"mode": "get_top_trends",
"type": "Google Trends",
"limit": 10
}{
"mode": "get_top_trends",
"type": "Google Trends by Category",
"category": "Games",
"limit": 10
}Always pass category for Amazon Best Sellers by Category, Google Trends by Category, Top Websites, Substack by Category, and TikTok Trending Hashtags by Category. Case-insensitive. Official names are listed under Data Sources.
{
"mode": "get_top_trends",
"type": "Amazon Best Sellers by Category",
"category": "Toys Games",
"sort": "rank_change",
"window": "7d",
"limit": 10
}sort: "rank_change" answers "what is newly trending" instead of "what is on top": items are ordered by biggest climb versus the baseline snapshot (window "1d", "3d", "7d", "14d", or "30d", the default). Rows are objects, e.g. {"rank": 4, "keyword": "…", "prev_rank": 31, "rank_change": 27}, and the response adds sort, window, and baseline_ts. Works on every feed. If a feed updates too slowly for the window (e.g. monthly Top Websites with "7d"), or the board turned over completely versus the baseline, you get count: 0 plus a note explaining why and what to do next.
{
"as_of_ts": "2026-03-26T22:22:25Z",
"type": "Google Trends",
"limit": 10,
"count": 10,
"data": [
[1, "chuck norris"],
[2, "project hail mary"],
[3, "bachelorette cancelled"]
// ... [rank, name] pairs
]
}MCP / AI
AI Prompts
When using Trends MCP through an AI assistant (Claude, ChatGPT, Cursor, etc.), include "using TrendsMCP" or "via TrendsMCP" in your prompt so the AI routes to the MCP instead of a web search.
nvidia over the past 5 years."com.openai.chatgpt."Stanley cup."Bitcoin weekly."air fryer over 5 years."langchain weekly."Elden Ring."Tesla over the last year."wallstreetbets on Reddit."GLP-1 grown over the past 12 months?"Anthropic on Google Search."Duolingo?"weight loss drugs across Google, TikTok, and Amazon."Meta changed over the past 6 months?"AI agents from Jan 2025 to Jan 2026."wallstreetbets on Reddit over the last 30 days?"running shoes."Electronics."Toys Games this week?"finance category."Live leaderboards: one feed (type) per call, on both MCP and REST. Add sort: "rank_change" (with window "1d", "3d", "7d", "14d", or "30d") to get the biggest climbers instead of the current board.
Errors
The REST transport always returns HTTP 200. The real outcome is in the payload envelope: {"statusCode": <int>, "body": "<json string>"}. Check statusCode, then parse body. Error bodies carry an error string (one of the codes below) and a message. On MCP, tool failures set isError=true on the tool result.
| Error code | Meaning |
|---|---|
missing_parameter | Required field missing from the request body (e.g. type on get_top_trends) |
invalid_source | Unrecognized source value (message may list allowed values) |
invalid_mode | Unrecognized mode value |
invalid_request | Malformed body or invalid parameter combination |
no_data | No data matched this keyword/source |
source_unavailable | The upstream source could not be reached; retry later |
growth_calculation_failed | Growth could not be computed for the requested window |
internal_error | Unexpected server error. The body includes a request_id; quote it when contacting support. |
{
"statusCode": 400,
"body": "{\"error\":\"missing_parameter\",\"message\":\"The 'type' parameter is required\"}"
}