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.

Open the playground
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.

modeReturnsRequired
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.

POST https://api.trendsapi.ai/api
mode "get_time_series"

Time series

Weekly history for one source + keyword. Scores are normalized 0-100. About 261 points.

Request body

FieldTypeRequiredDescription
modestringRequired"get_time_series"
sourcestringRequiredOne source. See Sources.
keywordstringRequiredKeyword, brand, product, or topic.

Response

FieldTypeDescription
datestringISO date, e.g. "2026-03-21"
valuenumberNormalized score, 0-100
volumenumber | nullAbsolute volume when the source has it
keywordstringKeyword queried
sourcestringSource used
{
  "mode":    "get_time_series",
  "source":  "google search",
  "keyword": "bitcoin"
}
[
  {
    "date":    "2026-03-21",
    "value":   47,
    "volume":  25853617,
    "keyword": "bitcoin",
    "source":  "google search"
  }
]
POST https://api.trendsapi.ai/api
mode "get_growth"

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

FieldTypeRequiredDescription
modestringRequired"get_growth"
sourcestringRequiredOne source, or a comma-separated list
keywordstringRequiredKeyword, brand, or topic
percent_growtharrayOptionalPreset strings or {name, recent, baseline} objects. Default ["12M"]

Presets

7D14D30D1M2M3M 6M9M12M1Y18M24M 2Y36M3Y48M60M5Y MTDQTDYTD

Custom range

FieldTypeDescription
namestringOptional label returned in results
recentstringMore recent date, YYYY-MM-DD
baselinestringComparison 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
    }
  ]
}

Authentication

Get a free key (100 requests/month, no card). Send it on every request:

Header
Authorization: Bearer YOUR_API_KEY
Keep the key on a server. Do not ship it in frontend code or a public repo.

Sources

Keyword sources take source + keyword. Live feeds take type and no keyword. Per-source notes live on /trends.

Keyword sources

sourceDescriptionKeyword format
google searchGoogle search volumeAny keyword or phrase
google imagesGoogle image search volumeAny keyword or phrase
google newsGoogle News search volumeAny keyword or phrase
google shoppingGoogle Shopping search volumeAny keyword or phrase
youtubeYouTube search volumeAny keyword or phrase
tiktokTikTok hashtag volumeHashtag or topic
redditSubreddit subscribersSubreddit name only, no r/ prefix
amazonAmazon product search volumeProduct name or category
wikipediaWikipedia page viewsArticle title or topic
news volumeNews article mention volumeAny keyword or phrase
news sentimentNews sentiment score (positive / negative)Any keyword or phrase
app downloadsAndroid app downloads (AppBrain)Android bundle ID e.g. com.openai.chatgpt
app rankingsAndroid app store ranking charts (AppBrain)Android bundle ID e.g. com.himshers.hims
npmnpm package weekly downloadsExact package name, case-sensitive e.g. react, @babel/core
steamSteam concurrent players (monthly)Game display name e.g. Elden Ring (first Steam search result)

Live feeds

typeFeed
Google TrendsTop trending search terms on Google right now
Google News Top NewsTop news stories from Google News
TikTok Trending HashtagsTop trending hashtags on TikTok
TikTok Trending SearchesTop trending search terms on TikTok
TikTok Shop Hot ProductsTop hot products on TikTok Shop
YouTube TrendingTop trending videos on YouTube
X (Twitter) TrendingTop trending topics on X
Reddit Hot PostsHottest posts on Reddit's front page
Reddit World NewsTop posts in r/worldnews
Wikipedia TrendingMost-viewed Wikipedia articles today
Amazon Best Sellers Top RatedAmazon top-rated best sellers across all categories
Amazon Best Sellers by CategoryAmazon best sellers filtered by product category
App Store Top FreeTop free apps on the iOS App Store
App Store Top PaidTop paid apps on the iOS App Store
Google PlayTop apps on Google Play
Top WebsitesMost-visited websites globally by traffic rank
Spotify Top PodcastsTop podcasts on Spotify
Steam Most PlayedTop games by concurrent live players
GitHub Trending ReposDaily trending repositories across all languages
IMDb MOVIEmeterTop 100 most-popular movies by user activity
Open Library Trending BooksDaily 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.

StatusCodeCauseFix
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]
400 example
{
  "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.

Machine-readable docs. /llms.txt and /docs.md are the API in plain text.
Connect once. One-click setup is on the homepage playground. Say "using Trends API" so the assistant routes to the connector.
mcp.json
{
  "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.

Get your free API key

One email. We'll create your account, email your key, and send a sign-in code.

No credit card Key emailed instantly 100 free requests/mo