Google API: Get interest over time
Compares Google Trends search interest for one to five terms over a time range, with average scores and a dated timeline. Scores are relative within the comparison.
Unofficial. Not affiliated with or endorsed by Google.
Inputs
Values from the run on Oct 23, 2026, shown under Output.
- Terms, required
terms One to five search terms separated by commas, for example ChatGPT, Gemini, Claude.
coffee, tea
- Region optional
region Country name or US state, for example United States or California. Default: worldwide.
United Kingdom
Default
worldwide.- Category optional
category Google Trends category name, for example Arts & Entertainment or Health. Default: all.
all
Default
all.- Time Range optional
time_range Period to compare, for example past_12_months.
past_4_hours
One of
past_hour,past_4_hours,past_day,past_7_days,past_30_days,past_90_days,past_12_months,past_5_years,since_2004. Defaultpast_12_months.
Input as JSON
{ "terms": "coffee, tea", "region": "United Kingdom", "category": "all", "time_range": "past_4_hours"}Output
{ "timeline": [ { "date": "2026-10-23T04:14:00+00:00", "term": "coffee", "interest": 0 }, { "date": "2026-10-23T04:14:00+00:00", "term": "tea", "interest": 0 }, { "date": "2026-10-23T04:15:00+00:00", "term": "coffee", "interest": 0 } ], "google_trends_link": "https://trends.google.com/trends/explore?q=coffee%2Ctea&date=now+4-H&geo=GB" , "average_interest_by_term": [ { "term": "coffee", "page_link": "https://trends.google.com/trends/explore?q=coffee%2Ctea&date=now+4-H&geo=GB" , "average_interest": 50 }, { "term": "tea", "page_link": "https://trends.google.com/trends/explore?q=coffee%2Ctea&date=now+4-H&geo=GB" , "average_interest": 18 } ]}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"trends.google.com/get_interest_over_time","input":{"terms":"coffee, tea","region":"United Kingdom","category":"all","time_range":"past_4_hours"}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "trends.google.com/get_interest_over_time" , "input": { "terms": "coffee, tea", "region": "United Kingdom", "category": "all", "time_range": "past_4_hours" }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "trends.google.com/get_interest_over_time" , "input": { "terms": "coffee, tea", "region": "United Kingdom", "category": "all", "time_range": "past_4_hours" } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run trends.google.com/get_interest_over_time# with {"terms":"coffee, tea","region":"United Kingdom","category":"all","time_range":"past_4_hours"}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "terms" ], "properties": { "terms": { "type": "string", "description": "One to five search terms separated by commas, for example ChatGPT, Gemini, Claude." }, "region": { "type": "string", "default": "worldwide", "description": "Country name or US state, for example United States or California. Default: worldwide." }, "category": { "type": "string", "default": "all", "description": "Google Trends category name, for example Arts & Entertainment or Health. Default: all." }, "time_range": { "enum": [ "past_hour", "past_4_hours", "past_day", "past_7_days", "past_30_days", "past_90_days", "past_12_months", "past_5_years", "since_2004" ], "type": "string", "default": "past_12_months", "description": "Period to compare, for example past_12_months." } }}Output schema
{ "type": "object", "required": [ "google_trends_link", "average_interest_by_term", "timeline" ], "properties": { "timeline": { "type": "array", "items": { "type": "object", "required": [ "date", "term", "interest" ], "properties": { "date": { "type": "string", "description": "YYYY-MM-DD, or ISO 8601 date-time for periods shorter than a week." }, "term": { "type": "string" }, "interest": { "type": "integer", "maximum": 100, "minimum": 0 } } } }, "google_trends_link": { "type": "string", "description": "Link to this comparison on Google Trends." }, "average_interest_by_term": { "type": "array", "items": { "type": "object", "required": [ "term", "average_interest", "page_link" ], "properties": { "term": { "type": "string" }, "page_link": { "type": "string" }, "average_interest": { "type": "number" } } } } }}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
trends.google.com/get_interest_over_time- Returns
- average interest per term, dated interest timeline, Google Trends link
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method trends.google.com/get_interest_over_time with the inputs above.
Ask your agent
- How has search interest for ChatGPT, Gemini, and Claude changed over the past 12 months?
- Compare Google Trends interest for electric vehicles versus hybrid cars in California over the last 5 years
- Show me a dated timeline of how often people searched for yoga in the United States during the past 90 days
- What's the average relative search popularity of Bitcoin and Ethereum worldwide since 2004?
- Google Trends data for ski resorts, Health category, past 30 days, average interest per term
See more
All Google methodsShows where a search term has the highest relative Google Trends interest, by country worldwide or by region within a country. Scores run from 0 to 100.
trends.google.com/get_interest_by_regionReturns top and rising related searches and topics for a term on Google Trends, for a country or US state and time range.
trends.google.com/get_related_searchesLists Google Trends 'Trending now' searches for a country, time window and category, in Google's order. Each search comes with its volume, activity, related searches and news headlines.
trends.google.com/list_trending_searchesLists major stock market indexes on Google Finance with their current levels, changes and quote times. Quotes may be delayed, and indexes Google does not show are left out.
google.com/list_market_indexesGets Google Search autocomplete suggestions for words typed so far, in Google's order, for a chosen country and language.
google.com/get_search_suggestionsLists ranked Android apps or games from the Google Play top free, top paid or top grossing chart for a country and category.
play.google.com/list_top_chartsFinds Android apps on Google Play by keywords, in Play search order, with each listing's developer, star rating, price and currency for the chosen country, download range and link. Results are limited to apps shown on the public search page.
play.google.com/search_appsSummarizes a company's public patents on Google Patents within filing dates (optionally narrowed by topic words): total found, filings per year, top technology areas and inventors across the 50 most recent records, and the most recent patents.
patents.google.com/list_company_patents