Google Trends API - Interest Over Time, By Region, Related Queries
Measure search interest for a keyword over time and geography, and pull the real-time trending searches for a country — all as structured JSON. Two endpoints, each 1 credit.
When to trigger
Use this skill when the user asks to:
- Measure interest in a keyword over time or compare terms
- See where a term is most searched (by region)
- Find related or rising queries for a topic
- Get what's trending right now in a country
Setup
Get a free API key at scavio.dev (50 free credits to get started, no card required):
bashexport SCAVIO_API_KEY=sk_live_your_key
If you do not have a key yet
An agent running this skill without SCAVIO_API_KEY set will get 401 on every
call below. The whole path from nothing to a working key is self-serve:
- Sign up at dashboard.scavio.dev - email or Google, no card required.
- A key is created for the account automatically at signup. It is on the dashboard under API Keys, ready to copy.
- A new account starts with 50 credits. Endpoints in this skill cost 1 credit each unless the table below says otherwise.
When the balance runs out the API answers 402 with a JSON body carrying
billing_url. Topping up needs no code change - the same key keeps working.
The smallest purchase is 2,500 credits for $25, and monthly plans work out
cheaper per credit if the usage is steady rather than one-off.
Endpoints
| Endpoint | Credits | Description |
|---|---|---|
POST https://api.scavio.dev/api/v2/google/trends | 1 | Interest-over-time, by-region, and related data for a keyword |
POST https://api.scavio.dev/api/v2/google/trending | 1 | Real-time trending searches for a country |
Authorization: Bearer $SCAVIO_API_KEY
Workflow
- Keyword interest: call
/trendswithquery. Scope withgeoanddate(e.g.today 12-m). Pick adata_typeto get the widget you need (defaults toTIMESERIES+GEO_MAP). - Read
interest_over_time.timeline_data[]for the time series andinterest_by_region[]for geography. Usedata_type: RELATED_QUERIES/RELATED_TOPICSfor rising terms. - Trending now: call
/trendingwith a requiredgeocountry code. Filter withhours,cat,sort, andstatus. Readtrends[].
Trends Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
query | string | required | Search keyword (1-500 chars) |
geo | string | -- | Location code (US, GB, US-CA). Worldwide when empty |
date | string | -- | Time range (e.g. today 12-m, now 7-d) |
data_type | string | TIMESERIES+GEO_MAP | TIMESERIES, GEO_MAP, GEO_MAP_0, RELATED_QUERIES, RELATED_TOPICS |
cat | string | -- | Category id (e.g. 71) |
gprop | string | -- | Google property: images, news, youtube, froogle (empty = web) |
region | string | -- | Geo granularity: COUNTRY, REGION, DMA, CITY |
hl | string | -- | UI language |
tz | string | -- | Timezone offset in minutes |
Trending Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
geo | string | required | Country code (e.g. US) |
hours | number | -- | Window: 4, 24, 48, or 168 |
cat | number | -- | Category id (0 = all, up to 20) |
sort | string | -- | relevance, search_volume, recency, title |
status | string | -- | all or active |
hl | string | -- | UI language |
Example
pythonimport requests BASE = "https://api.scavio.dev" # Your key from https://scavio.dev. Load it from your environment or secret # store in real code - keep it out of source control. API_KEY = "sk_your_key_here" HEADERS = {"Authorization": f"Bearer {API_KEY}"} # 1. Interest over the last 12 months in the US trends = requests.post(f"{BASE}/api/v2/google/trends", headers=HEADERS, json={"query": "bitcoin", "geo": "US", "date": "today 12-m"}).json() for point in trends["interest_over_time"]["timeline_data"]: print(point["date"], point["values"][0]["value"]) # 2. What's trending in the US right now trending = requests.post(f"{BASE}/api/v2/google/trending", headers=HEADERS, json={"geo": "US", "hours": 24, "sort": "search_volume"}).json() for t in trending["trends"]: print(t.get("query"), t.get("search_volume"))
Responses
/trends returns interest_over_time.timeline_data[] and/or interest_by_region[] (and related queries/topics per data_type). /trending returns trends[]. Each also includes response_time, credits_used, credits_remaining, and cached.
json{ "interest_over_time": { "timeline_data": [ { "date": "May 2026", "values": [{ "query": "bitcoin", "value": "72" }] } ] }, "interest_by_region": [ { "location": "El Salvador", "value": "100" } ], "response_time": 1220, "credits_used": 1, "credits_remaining": 992, "cached": false }
Guardrails
- Each call costs 1 credit.
- Never fabricate interest values, regions, or trending terms. Only return API data.
- Trends
valueis a relative 0-100 index, not an absolute search count — describe it as relative interest. /trendingrequires ageocountry code.
Failure handling
400means an invalid parameter (e.g./trendingwithoutgeo) — fix and retry.401means the API key is invalid or missing. CheckSCAVIO_API_KEY.429means rate or usage limit exceeded. Wait before retrying. See rate limits.502/503mean upstream is temporarily unavailable. Wait a few seconds before retrying.- If a widget is empty, try a different
data_type, a broaderdate, or dropgeofor worldwide. - If
SCAVIO_API_KEYis not set, prompt the user to export it before continuing.


