Google APItrends.google.com ↗
Access Google Trends data via API. Get trending searches by country, search volume, growth rates, related queries, and keyword interest over time.
What is the Google API?
The Google Trends API exposes 2 endpoints that return real-time and historical search interest data from trends.google.com. The get_trending endpoint returns ranked trending topics with raw and formatted search volume, growth percentages, and related queries for any supported country. The get_interest_over_time endpoint delivers a normalized 0–100 interest score time series for up to 5 keywords side by side, with per-keyword averages for quick comparison.
curl -X GET 'https://api.parse.bot/scraper/dd96362a-dd1b-43d9-a5e8-ed8db3cd66ae/get_trending?geo=US&hours=4&limit=50&category=0&language=en' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace trends-google-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: Google Trends SDK — bounded, re-runnable; every call capped."""
from parse_apis.Google_Trends_Trending_Searches_API import GoogleTrends, Geo, Timeframe, TrendCategory, ParseError
client = GoogleTrends()
# List currently trending topics in the US, capped at 3
for trend in client.trends.list(geo=Geo.US, category=TrendCategory.SCI_TECH, limit=3):
print(trend.title, trend.search_volume_formatted, trend.growth_percentage)
# Compare keyword interest over time
timeline = client.interest_timelines.compare(
keywords="python,javascript",
timeframe=Timeframe.TODAY_3M,
)
print(timeline.keywords, timeline.geo, timeline.timeframe)
for point in timeline.data[:3]:
print(point.date, point.values)
print("averages:", timeline.averages)
# Typed error handling
try:
bad = client.interest_timelines.compare(keywords="nonexistent_xyz_term_12345")
print(bad.averages)
except ParseError as e:
print(f"error: {e.code}")
print("exercised: trends.list, interest_timelines.compare")
Get currently trending searches from Google Trends for a specific country. Returns ranked trending topics with search volume, growth metrics, related queries, and topic categories. Each trend includes a rank, search volume (raw and formatted), growth percentage, related search queries, and category classifications. The server returns up to 500 trends in a single response; use the limit param to cap client-side.
| Param | Type | Description |
|---|---|---|
| geo | string | ISO 2-letter country code (e.g., US, GB, DE, JP, BR) |
| hours | integer | Time window in hours to look back for trends (e.g., 4, 24, 48, 168) |
| limit | integer | Maximum number of trending topics to return (1-500) |
| category | integer | Category filter. 0=All, 1=Business, 2=Entertainment, 3=Health, 4=Sci/Tech, 5=Top Stories, 7=Sports, 11=World, 18=Gaming, 20=Weather |
| language | string | Language code for results (e.g., en, es, fr, de, ja) |
{
"type": "object",
"fields": {
"geo": "string - country code used for the request",
"hours": "integer - time window in hours",
"trends": "array of trend objects with title, geo, started_at, search_volume, search_volume_formatted, growth_percentage, related_queries, categories, article_count, and rank",
"category": "integer - category filter used",
"language": "string - language code used for the request",
"returned": "integer - number of trends returned (limited by limit param)",
"total_available": "integer - total trends available from Google"
},
"sample": {
"data": {
"geo": "US",
"hours": 24,
"trends": [
{
"geo": "US",
"rank": 1,
"title": "portugal vs nigeria",
"categories": [
"Sports"
],
"started_at": 1781103000,
"article_count": 19,
"search_volume": 200000,
"related_queries": [
"portugal vs nigeria",
"portugal - nigeria",
"portugal"
],
"growth_percentage": 1000,
"search_volume_formatted": "200K+"
}
],
"category": 0,
"language": "en",
"returned": 3,
"total_available": 346
},
"status": "success"
}
}About the Google API
Trending Searches by Country
The get_trending endpoint accepts an ISO 2-letter geo code, a hours lookback window (e.g. 4, 24, 168), a category integer filter (0 = All, 1 = Business, 2 = Entertainment, and so on), and a limit of up to 500 results. Each trend object in the trends array includes title, search_volume, search_volume_formatted, growth_percentage, related_queries, category, and the timestamp when the trend started via started_at. The response also surfaces total_available so you can tell how many trends exist before applying your limit.
Keyword Interest Over Time
The get_interest_over_time endpoint takes a comma-separated keywords string of 1–5 terms and a timeframe parameter that accepts Google Trends standard range strings such as now 1-H, now 7-d, today 1-m, or today 12-m. Each element in the data array contains a date string and a values object keyed by keyword, with relative interest scores from 0 to 100. The averages object rolls up per-keyword mean scores across the full period, making multi-keyword comparisons straightforward without extra aggregation.
Filtering and Scope
Both endpoints accept a geo parameter for country-level scoping; passing an empty string on get_interest_over_time returns worldwide results. The language parameter controls the locale of returned labels. Category filtering is consistent across both endpoints using the same integer codes. Time resolution in get_interest_over_time adapts automatically based on the chosen timeframe — hourly granularity for short windows, daily or weekly for longer ones.
The Google API is a managed, monitored endpoint for trends.google.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when trends.google.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official trends.google.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Monitor which search topics are spiking in a target country using
search_volumeandgrowth_percentagefromget_trending - Compare relative consumer interest across competing product names over the past 12 months with
get_interest_over_time - Filter trending topics to a specific vertical (e.g. Sports or Health) using the
categoryparameter - Track seasonal demand curves for keywords by querying
get_interest_over_timewith monthly or yearly timeframes - Identify emerging topics in a market by combining
related_queriesfrom trending results with interest time series - Build a content calendar by pulling top trending titles in a given country and category on a scheduled basis
- Benchmark a brand keyword against competitors by comparing
averagesscores across up to 5 terms
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 200 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
| Team | $300/mo | 20,000 | 300 req/min |
| Company | $1,000/mo | 100,000 | 500 req/min |
Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Google Trends have an official developer API?+
What does `growth_percentage` in `get_trending` actually represent?+
hours lookback window relative to its prior baseline. A topic with very low prior volume can show very large growth percentages, so it is most useful when read alongside search_volume or search_volume_formatted.How granular is the time resolution in `get_interest_over_time`?+
timeframe you pass. Short windows like now 1-H or now 4-H return minute- or hour-level data points, while longer windows such as today 12-m return weekly or monthly aggregates. You cannot override the resolution independently of the timeframe.Does the API return interest data broken down by city or region within a country?+
geo parameter. Sub-national breakdowns (state, metro, city) are not exposed in the current response shape. You can fork this API on Parse and revise it to add a regional-breakdown endpoint.Can I retrieve historical trending searches from months or years ago?+
get_trending endpoint is oriented toward current trends, with a hours lookback that covers recent windows. Deep historical trending-topic archives are not currently returned. The get_interest_over_time endpoint does support longer historical timeframes for keyword interest scores. You can fork this API on Parse and revise it to add a dedicated historical trending endpoint if the use case requires it.