REST · one endpoint · three modes
API Reference
Every call is POST https://api.trendsapi.ai/api with your API key in the Authorization header (the Bearer prefix is optional).
Set mode in the JSON body. Replace YOUR_API_KEY and you should see a 200 in about a minute.
curl -X POST https://api.trendsapi.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.trendsapi.ai/api",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"mode": "get_time_series", "source": "google search", "keyword": "bitcoin"},
)
print(res.json())
const res = await fetch("https://api.trendsapi.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" })
});
console.log(await res.json());
Only successful requests count against quota. Failed requests are free.
Modes
Pick the operation with mode. Same URL and header every time.
| mode | Returns | Required |
|---|---|---|
get_time_series |
Up to ~5 years of weekly points for one keyword (free plan: last 12 months) | source, keyword |
get_growth |
% change over one or more periods | source, keyword |
get_top_trends |
Live ranked feed for a platform | type |
Canonical 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.
https://api.trendsapi.ai/api
Time series
Weekly history for one source + keyword. Scores are normalized 0-100. About 261 points; the free plan returns the last 12 months.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
mode | string | Required | "get_time_series" |
source | string | Required | One source. See Sources. |
keyword | string | Required | Keyword, brand, product, or topic. |
Response
| Field | Type | Description |
|---|---|---|
date | string | ISO date, e.g. "2026-03-21" |
value | number | Normalized score, 0-100 |
volume | number | null | Absolute volume when the source has it |
keyword | string | Keyword queried |
source | string | Source used |
{
"mode": "get_time_series",
"source": "google search",
"keyword": "bitcoin"
}
[
{
"date": "2026-03-21",
"value": 47,
"volume": 25853617,
"keyword": "bitcoin",
"source": "google search"
}
]
https://api.trendsapi.ai/api
Growth
Point-to-point % change for one keyword. Pass presets or custom date pairs. window defaults to ["12M"]. Comma-separated sources are allowed for comparison.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
mode | string | Required | "get_growth" |
source | string | Required | One source, or a comma-separated list |
keyword | string | Required | Keyword, brand, or topic |
window | array | Optional | Window strings or {name, recent, baseline} objects. Default ["12M"]. percent_growth is the canonical field name; window is the REST alias. |
Windows
Any number plus a D, W, M or Y suffix, up to 5 years (so 17D or 45D work too), plus MTD, QTD and YTD, plus custom date objects on REST (below). Common examples:
7D14D30D1M2M3M
6M9M12M1Y18M24M
2Y36M3Y48M60M5Y
MTDQTDYTD
Free plan: growth is clamped to the last 12 months of history.
Custom range
| Field | Type | Description |
|---|---|---|
name | string | Optional label returned in results |
recent | string | More recent date, YYYY-MM-DD |
baseline | string | Comparison date, YYYY-MM-DD |
{
"mode": "get_growth",
"source": "google search",
"keyword": "bitcoin",
"window": ["12M"]
}
{
"mode": "get_growth",
"source": "amazon",
"keyword": "nike",
"window": [
{ "name": "Last Year", "recent": "2025-12-31", "baseline": "2024-12-31" }
]
}
{
"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
}
]
}
https://api.trendsapi.ai/api
Top trends
Live ranked leaderboard for one feed. No keyword. type is required and must match a feed label exactly. Default limit is 25, max 200.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
mode | string | Required | "get_top_trends" |
type | string | Required | Feed name, on REST and MCP. Omitting it returns 400. |
category | string | Optional | Required for Amazon Best Sellers by Category, Google Trends by Category, Top Websites, Substack by Category and TikTok Trending Hashtags by Category |
limit | integer | Optional | Items per feed. Default 25, max 200. Free plan returns the top 10 only |
offset | integer | Optional | Pagination offset. Default 0. Pinned to 0 on the free plan |
sort | string | Optional | rank (default) or rank_change for biggest climbers |
window | string | Optional | 1d, 3d, 7d, 14d or 30d. Default 30d. Only with rank_change |
{
"mode": "get_top_trends",
"type": "Google Trends",
"limit": 10
}
{
"as_of_ts": "2026-03-26T22:22:25Z",
"type": "Google Trends",
"limit": 10,
"count": 10,
"data": [
[1, "chuck norris"],
[2, "project hail mary"]
]
}
Authentication
Get a free key (100 requests/month, no card). Send it on every request:
Authorization: Bearer YOUR_API_KEY
The Bearer prefix is optional; the bare key works too.
Sources
Keyword sources take source + keyword. Live feeds take type and no keyword. Per-source notes live on /trends.
Keyword sources
| 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
| type | Feed |
|---|---|
Google Trends | Top trending search terms on Google right now |
Google Trends by Category | Google trending searches split by topic board |
Google News Top News | Top news stories from Google News |
TikTok Trending Hashtags | Top trending hashtags on TikTok |
TikTok Trending Hashtags by Category | TikTok trending hashtags split by industry board |
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 |
Amazon Best Sellers by Category | Amazon best sellers filtered by product category |
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 |
Substack by Category | Top Substack newsletters by category |
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 |
What counts as a request
REST: one successful POST is one credit. Boards on MCP: every 10 rows is one request, capped at 10 credits per call. Only successful requests count; failed requests are free. Quotas reset on the first of the month and do not roll over.
Free plan: 100 requests/month. Pricing
Errors
The transport always returns HTTP 200. The real outcome is in the payload: {"statusCode": <int>, "body": <json string>}. Read statusCode, then parse body. Error bodies carry error and message; use message as the operator-facing detail.
| Code | Cause | Fix |
|---|---|---|
missing_parameter |
A required field is missing | Add the field named in message |
invalid_source |
Unknown source |
Copy a value from Sources |
invalid_mode |
Unknown mode |
Use get_time_series, get_growth or get_top_trends |
invalid_request |
Malformed body or bad parameter value | Fix the field named in message |
no_data |
No series matched this keyword/source | Check spelling, or try another source |
source_unavailable |
Upstream gap or empty result | Retry later, or change the query |
growth_calculation_failed |
Growth could not be computed for this window | Pick another window or source |
internal_error |
Unexpected server error, includes a request_id |
Retry. If it persists, email [email protected] with the request_id |
{
"statusCode": 400,
"body": "{\"error\":\"missing_parameter\",\"message\":\"The 'keyword' parameter is required.\"}"
}
MCP
Same key, same data, from Claude, ChatGPT, Cursor, or VS Code. Endpoint: https://api.trendsapi.ai/mcp.
{
"mcpServers": {
"trends-api": {
"url": "https://api.trendsapi.ai/mcp",
"headers": { "Authorization": "Bearer YOUR_API_KEY" }
}
}
}
Your first trend score is free.
100 requests a month. No credit card. One key covers every source.