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.

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

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

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; the free plan returns the last 12 months.

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. window 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
windowarrayOptionalWindow 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

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",
  "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
    }
  ]
}

Authentication

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

Header
Authorization: Bearer YOUR_API_KEY

The Bearer prefix is optional; the bare key works too.

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 downloadsAndroid bundle ID e.g. com.openai.chatgpt
app rankingsAndroid app store ranking chartsAndroid 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)
pythonPyPI project downloadsExact PyPI project name e.g. pandas, requests

Live feeds

typeFeed
Google TrendsTop trending search terms on Google right now
Google Trends by CategoryGoogle trending searches split by topic board
Google News Top NewsTop news stories from Google News
TikTok Trending HashtagsTop trending hashtags on TikTok
TikTok Trending Hashtags by CategoryTikTok trending hashtags split by industry board
TikTok Trending SearchesTop trending search terms on TikTok
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
SubstackTop Substack newsletters overall
Substack by CategoryTop Substack newsletters by category
GitHubDaily 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

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.

CodeCauseFix
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
Error payload
{
  "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.

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