Google Trends API — Compare Keywords Over Time & by Region avatar

Google Trends API — Compare Keywords Over Time & by Region

Pricing

from $3.20 / 1,000 keyword results

Go to Apify Store
Google Trends API — Compare Keywords Over Time & by Region

Google Trends API — Compare Keywords Over Time & by Region

Google Trends API for keyword research: interest over time, interest by region, and top and rising related queries for up to 25 keywords or 5-term comparisons. USD 4 per 1,000 results.

Pricing

from $3.20 / 1,000 keyword results

Rating

0.0

(0)

Developer

Muhammad Afzal

Muhammad Afzal

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

15 days ago

Last modified

Categories

Features

Limited permissions

Share

Google Trends API returns Google Trends data for your keywords: interest over time, interest by country, state, metro or city, and the top and rising related queries, for any location, time range, category and search type. It costs USD 4.00 per 1,000 keyword results plus USD 0.005 per run, and terms without Google Trends data are not charged.

Use it for keyword research, SEO and content planning, product and market research, seasonality checks, brand monitoring and comparing up to 5 terms on one scale. One run handles 1 to 25 keywords or comparisons, and needs no Google account or API key.

One record per search term. A single keyword gives one record; a comparison of up to 5 terms gives one record per term, all on the same 0-100 scale. Each record holds:

FieldWhat it containsExample
keywordThe search term of this recordcoffee
searchTerms, isComparisonEvery term of the search; more than one means a comparison["coffee", "tea"], true
geo, geoNameLocation code used (null = worldwide) and country nameUS, United States
timeRange, dateFrom, dateToTime range option and the exact dates it coveredpast12Months, 2025-11-08, 2026-11-08
category, propertyCategory number (0 = all) and search type0, web
granularity, pointCountStep between points and how many there areweek, 54
averageValue, peakValue, peakDate, latestValue, latestDateSummary of the completed points78.5, 100, 2026-04-12, 65, 2026-11-01
interestOverTimeTimeline: date (UTC), dateLabel, value 0-100, isPartial{"date": "2026-11-01", "value": 65}
regionLevelWhat the regions are: country, subregion, metro or citysubregion
interestByRegionregionCode, regionName, value 0-100, and in a comparison shareOfComparison (%){"regionName": "Wyoming", "value": 100}
relatedQueriesqueryType (top or rising), rank, query, value, formattedValue, isBreakout, queryUrl{"query": "coffee near me", "value": 100}
trendsUrlThe same search on Google Trendshttps://trends.google.com/trends/explore?…
position, input, scrapedAtEntry position in your list, the entry as typed, read time1, coffee, tea

The Output tab has four views: a keyword overview, and interest over time, interest by region and related queries each unwound into one row per point, region or query, ready for CSV or Excel export.

Type the keyword into Keywords, pick a country and time range, and start the run. The defaults are web search, all categories and the past 12 months.

InputDescriptionDefault
keywords1 to 25 entries. An entry is one term (coffee) or up to 5 comma-separated terms to compare (coffee, tea, matcha).required
geoCountry (US, GB, DE), subdivision (US-NY, JP-13) or US metro (US-NY-501); empty for worldwideworldwide
timeRangepast4Hours, pastDay, past7Days, past30Days, past90Days, past12Months, past5Years, since2004 or custompast12Months
startDate, endDateYYYY-MM-DD dates for custom, from 2004-01-01 to todaynone
categoryGoogle Trends category number, for example 71 Food & Drink or 7 Finance; 0 for all0
propertyweb, images, news, shopping (Google Shopping) or youtubeweb
includeRegionsReturn interest by regiontrue
includeRelatedQueriesReturn top and rising related queriestrue

Example input:

{
"keywords": ["coffee", "coffee, tea, matcha"],
"geo": "US",
"timeRange": "past12Months",
"category": 0,
"property": "web",
"includeRegions": true,
"includeRelatedQueries": true
}

Time ranges are counted back from the moment the run starts, so a saved input or schedule always reads the latest data. Google Trends chooses the step from the range: one minute for 4 hours, 8 minutes for a day, hourly for 7 days, daily up to 90 days, weekly for 12 months and 5 years, monthly since 2004. Intraday times are in UTC.

Put up to 5 terms in one entry, separated by commas: coffee, tea, matcha. The terms share one 0-100 scale, where 100 is the highest point of any of them, exactly as on the Google Trends compare chart. Each term still gets its own record, and its interestByRegion adds shareOfComparison: that term's share of the compared terms' searches in each region. Separate entries are separate searches with their own scales.

What does the output look like?

{
"position": 1,
"input": "coffee",
"keyword": "coffee",
"searchTerms": ["coffee"],
"isComparison": false,
"geo": "US",
"geoName": "United States",
"timeRange": "past12Months",
"dateFrom": "2025-11-08",
"dateTo": "2026-11-08",
"category": 0,
"property": "web",
"granularity": "week",
"pointCount": 54,
"averageValue": 78.5,
"peakValue": 100,
"peakDate": "2026-04-12",
"latestValue": 65,
"latestDate": "2026-11-01",
"interestOverTime": [
{ "date": "2025-11-02", "dateLabel": "Nov 2 – 8, 2025", "value": 69, "isPartial": false }
],
"regionLevel": "subregion",
"interestByRegion": [
{ "regionCode": "US-WY", "regionName": "Wyoming", "value": 100, "shareOfComparison": null }
],
"relatedQueries": [
{ "queryType": "top", "rank": 1, "query": "coffee near me", "value": 100, "formattedValue": "100", "isBreakout": false, "queryUrl": "https://trends.google.com/trends/explore?q=coffee+near+me&date=today+12-m&geo=US" },
{ "queryType": "rising", "rank": 8, "query": "coffee shops nearby", "value": 3850, "formattedValue": "+3,850%", "isBreakout": false, "queryUrl": "https://trends.google.com/trends/explore?q=coffee+shops+nearby&date=today+12-m&geo=US" }
],
"trendsUrl": "https://trends.google.com/trends/explore?date=2025-11-08%202026-11-08&geo=US&q=coffee",
"scrapedAt": "2026-11-08T09:30:00.000Z"
}

Arrays are shortened here. Every run also writes an OUTPUT record to the key-value store: the run status (SUCCEEDED, PARTIAL, EMPTY, FAILED), the dates and settings used, counts, and one line per entry with its outcome and reason.

You pay per keyword result delivered, plus a small start fee per run. Terms without data are free.

EventFree planBronzeSilverGold
Keyword result (one dataset record)USD 0.004USD 0.0039USD 0.0038USD 0.0032
Actor start (per run)USD 0.005USD 0.005USD 0.005USD 0.005

The start fee is charged once per started GB of allocated memory, so one event at the default 256 MB. Worked examples on the Free plan price: 1 keyword costs USD 0.009; a comparison of 5 terms costs USD 0.025; 25 keywords cost USD 0.105. Platform usage is included in these prices.

You are not charged for it. Google Trends shows nothing for terms with too little search volume, and the Actor never invents zero rows for them. The OUTPUT record lists each such entry:

  • no-data: Google Trends has too little data for the term with these settings. Try a wider region, a longer time range or all categories.
  • termsWithoutData: in a comparison, the terms that had no data while the others did.
  • invalid-input: the entry is empty, has more than 5 terms, or repeats a term.
  • duplicate: the same search appears earlier in the list.

Regions with too little data are left out of interestByRegion, as on Google Trends. A run where no term has data ends as EMPTY with that explanation instead of failing.

How do I use it from the API or an AI assistant?

Call it like any Apify Actor. JavaScript:

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('muhammadafzal/google-trends-api').call({
keywords: ['coffee, tea'],
geo: 'US',
timeRange: 'past12Months',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const item of items) console.log(item.keyword, item.averageValue, item.latestValue);

Python (apify-client 3.x):

from apify_client import ApifyClient
client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("muhammadafzal/google-trends-api").call(
run_input={"keywords": ["coffee, tea"], "geo": "US", "timeRange": "past5Years"}
)
for item in client.dataset(run.default_dataset_id).iterate_items():
print(item["keyword"], item["peakDate"], item["averageValue"])

For long tables, request the dataset items with unwind=interestOverTime (or interestByRegion, relatedQueries) to get one row per point, region or query.

Use it from an AI assistant. The Actor works from Claude, ChatGPT, Cursor or any MCP client through Apify's MCP server. Add https://mcp.apify.com/?tools=muhammadafzal/google-trends-api as an MCP server, then ask, for example: "Compare Google Trends interest for matcha, chai and cold brew in the US over the past 5 years and tell me which one is growing fastest."

When should I use a different tool?

  • Search volume in absolute numbers: Google Trends gives relative interest (0-100), not monthly search counts. Use a keyword search volume tool for that.
  • Daily trending searches (Trending Now): this Actor reads the Explore data for keywords you choose; it does not list what is trending today.
  • Related topics: not included. Google returned no related topics for any keyword in our testing, so the Actor returns related queries only.
  • Google search results or YouTube video data: use a Google search results or YouTube data Actor.

FAQ

Is this a Google Trends API? Yes. Every run can be started from the Apify API, the JavaScript or Python client, or an MCP client, and returns JSON records. You need no Google account or Google API key.

Is Google Trends value the same as search volume? No. Google Trends scales interest from 0 to 100, where 100 is the highest point of the search in the chosen place and time. In a comparison, all terms share that scale.

Can I get Google Trends data by state or city? Yes. A country code returns its states or provinces, a subdivision such as US-NY returns its metro areas, and a US metro such as US-NY-501 returns cities.

How far back does Google Trends data go? To January 2004. Choose since2004 for monthly data from 2004 to today, or custom with your own dates.

What do Breakout and +4,600% mean in related queries? Rising queries show the growth of a query compared with the previous period; Breakout means more than 5,000% growth. Top queries show a 0-100 popularity score instead.

Can I get YouTube, News, Image or Shopping trends? Yes. Set property to youtube, news, images or shopping to read Google Trends for that search type.

Can I export Google Trends data to CSV or Excel? Yes. Export the dataset from the run, or choose one of the unwound views (interest over time, by region, related queries) to get one row per data point.

Limits and data use

Up to 25 entries per run, up to 5 terms per entry, 100 characters per term. Google Trends data is public, sampled and rounded by Google, so two runs a few minutes apart can differ by a few points; the last point of a range is often partial and is marked isPartial. The Actor reads public Google Trends data only and stores no personal data.

Questions or a keyword that should work but does not? Open an issue on the Actor's Issues tab with the input and the run ID.

Last verified: 2026-11-08