Docs

MCP & API Reference

Query behavioral trend data across search, social, and commerce platforms. Use MCP to query via an AI assistant like Claude or ChatGPT, or the REST API to integrate directly into your code.

Get my free API key

No credit cardInstant delivery100 free requests/mo
LIVE16,203,341API calls served
Loved by developers

Add to your AI in 30 seconds

MCPIn your AI assistant

Ask Claude, ChatGPT or Cursor about trends in plain language. They fetch the data from Trends Agents for you. No code.

Connect with your Trends Agents account. No API key to copy.

  1. Add the connector below. The name and URL are prefilled.
  2. Sign in to Trends Agents and approve access.
  3. Start a chat with Trends Agents enabled and ask a trend question.
Add to Claude ↗

Using Claude Code? Run this in your terminal, then type /mcp in Claude Code to sign in.

claude mcp add --transport http --scope user trends-agents https://trendsagents.com/mcp
Set up manually

In Claude, open Settings → Connectors and add a custom connector named Trends Agents. Enter this URL, then connect and sign in.

https://trendsagents.com/mcp
Full setup guide →
Test your connection

Once connected, paste this into your AI and check that it uses Trends Agents to fetch results.

Using Trends Agents, what is trending on Google right now?

API key setup / other AI clients

Two addresses, same data. Clients that sign in (Claude, ChatGPT, Claude Code) use https://trendsagents.com/mcp. Clients that send an API key (Cursor, VS Code, others) use https://api.trendsmcp.ai/mcp with the config below.

{"mcpServers": {"trends-agents": {"url": "https://api.trendsmcp.ai/mcp","headers": {"Authorization": "Bearer YOUR_API_KEY"}}}}

APIIn your own code

Send requests from Python, JavaScript or any HTTP tool with your API key, and get JSON back.

import requestsresponse = requests.post("https://api.trendsmcp.ai/api",headers={"Authorization": "Bearer YOUR_API_KEY"},json={"mode": "","source": ,"keyword": "artificial intelligence","window": []})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).

Never expose your API key in client-side code or public repositories.
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.

Time seriesmode: "get_time_series"

Historical weekly data for one source + keyword. One HTTP request = one quota unit.

Growthmode: "get_growth"

Point-to-point % change for one source + keyword. All percent_growth periods in the same call count as one request.

Top trendsmode: "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).

Top postsmode: "get_top_posts"

Live top posts for one hashtag on tiktok or instagram. One call = one request. Business plan; other plans get a plan_required error, which does not count.

Usageget_usage (MCP only)

Free, never counts. Shows your plan, requests used this month, requests left, and when it resets. Ask your assistant "how many requests do I have left?"

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_time_series & 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. For get_time_series, pass one source per request. Matching is case-insensitive.

sourceReturnsKeyword formatOptions
Google SearchSearch interest as a 0–100 index, about 5 yearsAny name or phrasecountry, resolution
Google ImagesImage search interest as a 0–100 index, about 5 yearsAny name or phrasecountry, resolution
Google NewsNews search interest as a 0–100 index, about 5 yearsAny name or phrasecountry, resolution
Google ShoppingShopping search interest as a 0–100 index, about 5 yearsAny name or phrasecountry, resolution
YouTubeYouTube search interest as a 0–100 index, about 5 yearsAny name or phrasecountry, resolution
WikipediaArticle page views as a 0–100 index, plus raw viewsAny name or phraselanguage
TikTokHashtag views as a 0–100 index, plus raw viewsAny name or phrasecountry
AmazonProduct search volume as a 0–100 index, plus raw volumeAny name or phrase-
npmPackage downloads as a 0–100 index, plus raw downloadsExact npmjs.com package name, case-sensitive. Right: 'react', '@babel/core'. Wrong: 'React', 'React.js'.-
PythonPackage downloads as a 0–100 index, plus raw downloadsExact PyPI project name. Right: 'pandas', 'requests'. Wrong: 'Pandas'.-
SteamConcurrent players as a 0–100 index, plus raw playersGame display name in plain English, not a Steam App ID. Right: 'Elden Ring', 'CS2'. First Steam store search result wins, so use an unambiguous name.-
App DownloadsAndroid app downloads as a 0–100 index, plus raw downloadsAndroid bundle ID only (the id= value on Google Play). Right: 'com.openai.chatgpt', 'com.whatsapp'. Wrong: 'ChatGPT', 'WhatsApp', an iOS App Store ID, or a bundle ID that is not Android. Find it at play.google.com/store/apps/details?id=THIS_PART.-
App RankingsAndroid chart rank as a 0–100 index, plus raw rankAndroid bundle ID only (the id= value on Google Play). Right: 'com.openai.chatgpt', 'com.whatsapp'. Wrong: 'ChatGPT', 'WhatsApp', an iOS App Store ID, or a bundle ID that is not Android. Find it at play.google.com/store/apps/details?id=THIS_PART.-

Live boards (get_top_trends)

Pass the type value below with mode: "get_top_trends". No keyword needed. Returns the current ranked leaders on that platform, or the biggest climbers with sort: "rank_change".

typeReturnsOptions
Amazon Best Sellers Top RatedTop-rated best sellers across all categories-
Amazon Best Sellers by CategoryBest sellers per product categorycategory (26)
App Store Top FreeTop free iOS apps-
App Store Top PaidTop paid iOS apps-
GitHubDaily trending repositories-
Google News Top NewsTop news stories-
Google PlayTop Android apps-
Google TrendsTrending searches right nowcountry
Google Trends by CategoryTrending searches per topic boardcategory (19), country
IMDb MOVIEmeterMost popular movies by user activity-
Open Library Trending BooksDaily trending books-
Reddit Hot PostsHottest posts on the front page-
Reddit World NewsTop posts in r/worldnews-
Top WebsitesMost-visited websites by traffic rankcategory (24)
Spotify Top PodcastsTop podcasts-
Steam Most PlayedGames by concurrent live players-
SubstackTop newsletters overall-
Substack by CategoryTop newsletters per categorycategory (31)
TikTok Trending HashtagsTrending hashtagscountry
TikTok Trending Hashtags by CategoryTrending hashtags per industry boardcategory (79), country
TikTok Trending SearchesTrending search terms-
Wikipedia TrendingMost-viewed articles today-
X (Twitter) TrendingTrending topicscountry
YouTube TrendingTrending videoscountry

Top posts (get_top_posts)

Pass a hashtag as keyword and one source below.

sourceReturns
TikTokTop videos on a hashtag
InstagramTop posts on a hashtag

Every parameter, category list and a call to copy for each data set: Data catalog.

About this data

Cross-platform trend indices on a unified, normalized scale, produced by Trends Agents'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.

modeWhat it returnsRequired fields
get_time_series~5 years of weekly points for a keywordsource, keyword
get_growth% change over one or more periodssource, keyword (percent_growth optional, default ["12M"])
get_top_trendsLive ranked leaderboard for a platform feed; sort: "rank_change" for biggest climberstype (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

All three modes
// 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 }
POSThttps://api.trendsmcp.ai/api
mode"get_time_series"

Time 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. Every plan gets the full history. Full rules

Request body

FieldTypeRequiredDescription
modestringRequired"get_time_series" (aliases: "get_trends", "trends", "time_series", "lookup")
sourcestringRequiredOne source per request. See Data Sources.
keywordstringRequiredKeyword, brand, product, or topic.

Response fields

FieldTypeDescription
datestringISO 8601 date e.g. "2026-03-21"
valuenumberNormalized trend score, 0–100.
volumenumber | nullAbsolute volume where available. null otherwise.
keywordstringThe keyword queried.
sourcestringThe 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
]
POSThttps://api.trendsmcp.ai/api
mode"get_growth"

Growth

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). Every plan gets the full history. Full rules

Request body

FieldTypeRequiredDescription
modestringRequired"get_growth"
sourcestringRequiredOne source or comma-separated list. See Data Sources.
keywordstringRequiredKeyword, brand, or topic. Format depends on source — see Data Sources.
percent_growtharrayOptionalWindow 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:

7D14D30D1M2M3M6M9M12M1Y18M24M2Y36M3Y48M60M5YMTDQTDYTD

Custom date range object (REST only)

FieldTypeDescription
namestringOptional label returned in results.
recentstringMore recent date, YYYY-MM-DD.
baselinestringBaseline/comparison date, YYYY-MM-DD.

Custom date objects are REST-only; MCP accepts the string windows above.

Response fields

FieldTypeDescription
search_termstringThe keyword queried.
data_sourcestringThe source used.
resultsarrayOne object per period requested.
  periodstringPeriod identifier, e.g. "12M" or custom name.
  growthnumberPercentage change, positive or negative.
  directionstring"increase" or "decrease".
  recent_datestringISO 8601 date of the recent data point.
  baseline_datestringISO 8601 date of the baseline point.
  recent_valuenumberNormalized score at the recent date.
  baseline_valuenumberNormalized score at the baseline date.
  volume_availablebooleanWhether absolute volume exists for this source.
  recent_volumenumber | nullAbsolute volume at the recent date.
  baseline_volumenumber | nullAbsolute volume at the baseline date.
  volume_growthnumber | nullVolume growth %, if available.
metadataobjecttotal_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
  }
}
POSThttps://api.trendsmcp.ai/api
mode"get_top_trends"

Top 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

Feed labels must match the strings below exactly (including spacing and capitalization).

Request body

FieldTypeRequiredDescription
modestringRequired"get_top_trends"
typestringRequiredFeed name (see below). Required on both REST and MCP; omitting it returns a 400 missing_parameter error.
categorystringRequiredRequired 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 boards. Case-insensitive; unknown values return an error listing the valid categories. Full lists in the Data catalog.
sortstringOptional"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.
windowstringOptionalBaseline 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.
limitintegerOptionalMax items per feed (default 25, up to 200). Free plan boards return the top 10 only.
offsetintegerOptionalPagination offset per feed (default 0). Pinned to 0 on the Free plan; pagination is a paid feature.

Available boards

Amazon Best Sellers Top RatedAmazon Best Sellers by CategoryApp Store Top FreeApp Store Top PaidGitHubGoogle News Top NewsGoogle PlayGoogle TrendsGoogle Trends by CategoryIMDb MOVIEmeterOpen Library Trending BooksReddit Hot PostsReddit World NewsTop WebsitesSpotify Top PodcastsSteam Most PlayedSubstackSubstack by CategoryTikTok 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 in the Data catalog.

{
  "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 Agents through an AI assistant (Claude, ChatGPT, Cursor, etc.), include "using Trends Agents" or "via Trends Agents" in your prompt so the AI routes to the MCP instead of a web search.

Get GrowthPoint-to-point growth & momentum
Year-over-year momentum"Using Trends Agents, how has Google Search interest in GLP-1 grown over the past 12 months?"
Multi-period snapshot"Via Trends Agents, show me 3M, 6M, and 1Y growth for Anthropic on Google Search."
YTD brand tracking"Using Trends Agents, what's the YTD Google Search growth for Duolingo?"
Cross-source momentum"Via Trends Agents, compare 6-month growth for weight loss drugs across Google, TikTok, and Amazon."
Wikipedia attention shift"Using Trends Agents, how have Wikipedia page views for Meta Platforms changed over the past 6 months?"
Custom date range"Via Trends Agents, show Google Search growth for AI agents from Jan 2025 to Jan 2026."
Daily search spikes"Using Trends Agents, show daily Google search interest for wallstreetbets over the last 90 days."
Shopping demand signal"Via Trends Agents, show me 12M Google Shopping growth for running shoes."
Get Top TrendsLive leaderboards across platforms
Google trending now"Using Trends Agents, what's trending on Google right now?"
TikTok hashtags"Via Trends Agents, show me the top TikTok trending hashtags today."
Reddit front page"Using Trends Agents, what are the hottest Reddit posts right now?"
Wikipedia trending"Via Trends Agents, what are the top trending Wikipedia articles today?"
X / Twitter topics"Using Trends Agents, show me what's trending on X right now."
App Store charts"Via Trends Agents, what apps are topping the App Store Free charts today?"
Amazon best sellers (top rated)"Using Trends Agents, what are the top-rated Amazon best sellers right now?"
Amazon by category"Via Trends Agents, show Amazon best sellers for category Electronics."
Fastest climbers this week"Using Trends Agents, what are the fastest-climbing Amazon best sellers in Toys Games this week?"
Top websites by category"Using Trends Agents, show the top websites in the finance category."
YouTube trending"Via Trends Agents, what's trending on YouTube right now?"

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 codeMeaning
missing_parameterRequired field missing from the request body (e.g. type on get_top_trends)
invalid_sourceUnrecognized source value (message may list allowed values)
invalid_modeUnrecognized mode value
invalid_requestMalformed body or invalid parameter combination
no_dataNo data matched this keyword/source
source_unavailableThe upstream source could not be reached; retry later
growth_calculation_failedGrowth could not be computed for the requested window
internal_errorUnexpected server error. The body includes a request_id; quote it when contacting support.
Error payload
{
  "statusCode": 400,
  "body": "{\"error\":\"missing_parameter\",\"message\":\"The 'type' parameter is required\"}"
}