REST · one endpoint · three modes
API Reference
Every call is POST https://api.trendsapi.ai/api with a Bearer token.
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 json, 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"},
)
payload = res.json()
data = json.loads(payload["body"]) if isinstance(payload.get("body"), str) else payload
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" })
});
const payload = await res.json();
const data = typeof payload.body === "string" ? JSON.parse(payload.body) : payload;
If the payload includes statusCode and a string body, parse body once more. Only HTTP 200 counts against quota.
Modes
Pick the operation with mode. Same URL and header every time.
| mode | Returns | Required |
|---|---|---|
get_time_series |
~5 years of weekly points for one keyword | source, keyword |
get_growth |
% change over one or more periods | source, keyword |
get_top_trends |
Live ranked feed for a platform | type (optional on REST; omit to return every feed) |
get_trends is accepted as an alias of get_time_series. Prefer get_time_series.
https://api.trendsapi.ai/api
Time series
Weekly history for one source + keyword. Scores are normalized 0-100. About 261 points.
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. percent_growth 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 |
percent_growth | array | Optional | Preset strings or {name, recent, baseline} objects. Default ["12M"] |
Presets
7D14D30D1M2M3M
6M9M12M1Y18M24M
2Y36M3Y48M60M5Y
MTDQTDYTD
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",
"percent_growth": ["12M"]
}
{
"mode": "get_growth",
"source": "amazon",
"keyword": "nike",
"percent_growth": [
{ "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 must match a feed label exactly. Omit type on REST to return every feed. Default limit is 25, max 200.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
mode | string | Required | "get_top_trends" |
type | string | Optional | Feed name. Omit on REST for all feeds. Required on MCP. |
category | string | Optional | Filter for Amazon Best Sellers by Category and Top Websites |
limit | integer | Optional | Items per feed. Default 25, max 200 |
offset | integer | Optional | Pagination offset. Default 0 |
{
"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
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 (AppBrain) | Android bundle ID e.g. com.openai.chatgpt |
app rankings | Android app store ranking charts (AppBrain) | 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) |
Live feeds
| type | 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 |
TikTok Shop Hot Products | Top hot products on TikTok Shop |
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 |
GitHub Trending Repos | 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
One successful POST is one quota unit, any mode. Failed calls (4xx/5xx) are free. Quotas reset on the first of the month and do not roll over. Hitting the cap returns 429 until you upgrade or the month resets.
Free plan: 100 requests/month. Pricing
Errors
Errors are JSON with error and message. Use message as the operator-facing detail.
| Status | Code | Cause | Fix |
|---|---|---|---|
| 400 | missing_parameter |
A required field is missing | Add the field named in message |
| 400 | invalid_source |
Unknown source |
Copy a value from Sources |
| 401 | Missing or invalid API key | Send Authorization: Bearer <key> |
|
| 404 | not_found |
No series matched this keyword/source | Check spelling, or try another source |
| varies | data_unavailable |
Upstream gap or empty result | Retry later, or change the query |
| 429 | rate_limited |
Monthly quota used | Upgrade or wait for reset |
| 500 | internal_error |
Unexpected server error | Retry. If it persists, email [email protected] |
{
"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.