Google Trends API & Scraper - Pytrends Alternative avatar

Google Trends API & Scraper - Pytrends Alternative

Pricing

from $1.28 / 1,000 keyword with data

Go to Apify Store
Google Trends API & Scraper - Pytrends Alternative

Google Trends API & Scraper - Pytrends Alternative

Google Trends API and Google Trends scraper: interest over time, interest by region, related and rising queries, trending searches (trending now) for any keyword, country and time range. Compare keywords on one scale. Bulk, pytrends alternative, also via MCP. $1.50 per 1,000 keywords.

Pricing

from $1.28 / 1,000 keyword with data

Rating

0.0

(0)

Developer

Saulius AutomatesIT

Saulius AutomatesIT

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

18 days ago

Last modified

Share

A Google Trends API and Google Trends scraper in one: get Google Trends data for hundreds or thousands of keywords in one run, as clean JSON, CSV or Excel. No Google account, no pytrends, no 429 errors to babysit.

For each keyword you get:

  • Interest over time: the 0-100 curve Google Trends shows, with dates, for any period from the past hour to 2004.
  • Interest by region: countries, states, cities or US metro areas, ranked.
  • Related queries: top and rising searches, including "Breakout" terms.

Two more modes:

  • Compare keywords on one scale: Google only compares 5 terms at a time and rescales every chart to its own peak, so numbers from separate charts can't be compared. This mode chains any number of keywords through a shared anchor term and returns every keyword on one 0-100 scale.
  • Trending now: today's trending searches per country, with approximate search counts and the news stories behind them.

Why use it

  • Bulk by default. Paste up to 5,000 keywords. In our test, 1,000 keywords finished in 38 minutes with none failed. Runs keep going through rate limits by rotating warmed-up proxy sessions, with a residential fallback included in the price.
  • Every filter Google Trends has. Country or region, preset or custom time range, category, and web, image, news, Google Shopping or YouTube search.
  • Pay only for complete data. Keywords Google has no data for are delivered with hasData: false and are never charged. If one of the data types you asked for can't be fetched, the report is delivered with an errors field and is not charged. Failed keywords are not delivered and not charged.
  • Works as an API. Call it from Python, JavaScript, Make, Zapier, n8n or any HTTP client, or let an AI agent call it through the Apify MCP server.

What it's used for

  • SEO and content planning: find rising queries before they get competitive.
  • Product research and e-commerce: compare demand for hundreds of products across states or seasons.
  • Market and investment research: track brand or category interest over 5 years.
  • Newsrooms and social teams: pull trending searches every hour per country.
  • Replacing pytrends in existing scripts: same data, no blocks.

Only as a closed alpha. Google announced a Google Trends API on 24 July 2025; its developer page still says "We're now accepting applications for alpha testers", with a rolling window of the last 5 years (Google Search Central). There is no public release date. pytrends, the unofficial Python library most scripts use, was archived by its owner on 17 April 2025 and is read-only (GitHub), so its 429 errors and broken endpoints will not be fixed.

OptionWho can use itDataPrice
Google Trends API (official)Approved alpha testers onlyLast 5 yearsNot public
pytrendsAnyone, but archivedWhatever still works; frequent 429 Too Many RequestsFree, plus your own proxies
SerpApi Google TrendsAnyoneOne data type and, for regions and related queries, one keyword per search$75 a month for 5,000 searches on the Developer plan, so about $45 per 1,000 keywords for time, regions and related queries
This ActorAnyoneOver time since 2004, regions, related queries, trending now, bulk compare$1.50 per 1,000 keywords with all three data types; no-data keywords free

Replace pytrends

pytrends calls map one to one:

pytrendsThis Actor
build_payload(kw_list, timeframe, geo, cat, gprop)keywords, timeRange, geo, category, property (gprop="" is web, "youtube" is youtube, "froogle" is shopping)
interest_over_time()interestOverTime on each keyword, or compare mode for several keywords on one scale
interest_by_region(resolution="COUNTRY")interestByRegion with resolution
related_queries()relatedQueries.top and relatedQueries.rising
trending_searches(pn="united_states")mode: "trendingNow", trendingGeos: ["US"]
up to 5 keywords per payloadup to 5,000 keywords per run

A drop-in for interest_over_time() that returns the same kind of DataFrame, one column per keyword, all on one 0-100 scale:

$pip install apify-client pandas
import pandas as pd
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
def interest_over_time(kw_list, timeframe="today 12-m", geo=""):
run = client.actor("sauliusautomatesit/google-trends-api").call(run_input={
"mode": "compare",
"keywords": kw_list,
"timeRange": timeframe,
"geo": geo,
})
columns = {}
for item in client.dataset(run.default_dataset_id).iterate_items():
points = item["interestOverTime"]
columns[item["keyword"]] = pd.Series(
[p["value"] for p in points], index=pd.to_datetime([p["date"] for p in points]))
return pd.DataFrame(columns)
df = interest_over_time(["chatgpt", "claude", "gemini"], timeframe="today 3-m", geo="US")
print(df.tail())

Unlike pytrends, kw_list can hold more than five keywords: compare mode chains them through an anchor term so every column stays on the same scale.

Input

FieldWhat it doesDefault
modekeywordReport, compare or trendingNowkeywordReport
keywordsKeywords or phrases, one per line, up to 5,000
geoUS, GB, US-CA... or empty for worldwideUS
timeRangenow 1-H, now 4-H, now 1-d, now 7-d, today 1-m, today 3-m, today 12-m, today 5-y, alltoday 12-m
customTimeRange"YYYY-MM-DD YYYY-MM-DD", overrides timeRange
propertyweb, images, news, shopping, youtubeweb
categoryGoogle Trends category number (0 = all)0
dataTypesAny of interestOverTime, interestByRegion, relatedQueriesall three
resolutionauto, COUNTRY, REGION, CITY, DMAauto
maxRelatedRelated queries kept per list (top and rising)25
anchorKeywordCompare mode: the term repeated in every batchfirst keyword
trendingGeosTrending now mode: country codesgeo

Example:

{
"keywords": ["electric bike", "air fryer", "pickleball"],
"geo": "US",
"timeRange": "today 5-y"
}

Output

One item per keyword:

{
"type": "keywordReport",
"keyword": "electric bike",
"geo": "US",
"timeRange": "today 12-m",
"category": 0,
"property": "web",
"averageInterest": 61.4,
"interestOverTime": [
{ "date": "2025-10-05T00:00:00.000Z", "timestamp": 1759622400, "value": 54, "isPartial": false }
],
"interestByRegion": [
{ "geoCode": "US-CA", "geoName": "California", "value": 100 }
],
"relatedQueries": {
"top": [{ "query": "best electric bike", "value": 100, "formattedValue": "100" }],
"rising": [{ "query": "electric bike tax credit", "value": 3250, "formattedValue": "+3,250%" }]
},
"hasData": true,
"checkedAt": "2026-10-02T13:00:00.000Z"
}

Compare mode returns type: "comparison" items with interestOverTime on the shared scale and the anchorKeyword used. Trending now returns type: "trendingSearch" items with title, approxTraffic, publishedAt, picture and news.

The run summary (keywords delivered, without data, failed) is saved as OUTPUT in the run's key-value store.

Pricing

Pay per result, no subscription:

EventPrice
Keyword report or comparison with data$0.0015 per keyword ($1.50 per 1,000)
Trending search item$0.0005 per item
Actor start$0.00005 per run

All data types for a keyword are one charge. Keywords without data and incomplete reports are free. Set Maximum cost per run in the run options and the run stops cleanly when it is reached.

Tutorial: Python, AI agents and SEO workflows

Each recipe needs an Apify API token (Apify Console > Settings > API & Integrations). Apify's free plan includes $5 of monthly credit, about 3,000 keyword reports.

$pip install apify-client
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("sauliusautomatesit/google-trends-api").call(run_input={
"keywords": ["electric bike", "air fryer", "pickleball"],
"geo": "US",
"timeRange": "today 12-m",
})
for item in client.dataset(run.default_dataset_id).iterate_items():
if not item["hasData"]:
print(item["keyword"], "no data (free)")
continue
latest = item["interestOverTime"][-1]
print(item["keyword"], "average", item["averageInterest"], "latest", latest["value"])

run.default_dataset_id is for apify-client 3.x; on 2.x write run["defaultDatasetId"]. Up to 5,000 keywords per run; pass max_total_charge_usd=1 to .call() to cap a run at $1.

2. AI agents: one MCP URL, one tool

This URL gives any MCP client exactly one tool, this Actor, instead of a search over the whole Apify Store:

https://mcp.apify.com/?tools=sauliusautomatesit/google-trends-api

Claude Code:

$claude mcp add --transport http google-trends "https://mcp.apify.com/?tools=sauliusautomatesit/google-trends-api"

Cursor (~/.cursor/mcp.json), Claude Desktop, VS Code and other clients that take JSON:

{
"mcpServers": {
"google-trends": {
"url": "https://mcp.apify.com/?tools=sauliusautomatesit/google-trends-api",
"headers": { "Authorization": "Bearer YOUR_APIFY_TOKEN" }
}
}
}

Clients that support OAuth (Claude.ai custom connectors, ChatGPT) need only the URL. Then ask:

  • "Compare interest in Notion, Obsidian and Evernote in the US over 5 years and tell me which is growing."
  • "What are the rising searches around 'protein powder' this quarter? Suggest five blog posts."
  • "What is trending in Germany right now?"

3. SEO workflow: seasonality and rising queries for a product

When does demand for a product peak, and what are people starting to search for around it? Five years of weekly data answers the first question; related queries answer the second.

from collections import defaultdict
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("sauliusautomatesit/google-trends-api").call(run_input={
"keywords": ["air fryer", "standing desk", "electric blanket"],
"geo": "US",
"timeRange": "today 5-y",
"dataTypes": ["interestOverTime", "relatedQueries"],
})
for item in client.dataset(run.default_dataset_id).iterate_items():
if not item["hasData"]:
continue
by_month = defaultdict(list)
for point in item["interestOverTime"]:
by_month[point["date"][5:7]].append(point["value"])
season = {m: sum(v) / len(v) for m, v in sorted(by_month.items())}
peak = max(season, key=season.get)
rising = [q["query"] for q in item["relatedQueries"]["rising"][:5]]
print(f"{item['keyword']}: peaks in month {peak}; rising: {', '.join(rising)}")

Plan stock and content a month or two before the peak month, and write for the rising queries before they get competitive. To track this every week, save the input as a Task and give it a schedule.

4. Compare any number of keywords on one scale

Google compares 5 terms at a time and rescales every chart, so separate charts don't line up. compare mode chains your list through a shared anchor term:

{
"mode": "compare",
"keywords": ["chatgpt", "claude", "gemini", "perplexity", "copilot", "deepseek", "grok"],
"geo": "",
"timeRange": "today 12-m"
}

Every keyword comes back on one 0-100 scale, ready for a single chart or a ranking.

5. JavaScript and HTTP

$npm install apify-client
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('sauliusautomatesit/google-trends-api').call({
keywords: ['electric bike', 'air fryer'],
geo: 'US',
timeRange: 'today 12-m',
dataTypes: ['interestOverTime', 'interestByRegion'],
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const item of items) {
if (!item.hasData) continue;
const top = item.interestByRegion[0];
console.log(item.keyword, 'average', item.averageInterest, 'top region', top.geoName, top.value);
}

Any HTTP client works with one call that returns the results:

curl -X POST "https://api.apify.com/v2/acts/sauliusautomatesit~google-trends-api/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "keywords": ["electric bike"], "geo": "US", "timeRange": "today 5-y" }'

FAQ

Does Google Trends have an API? An official one is in closed alpha (applications only, since July 2025). This Actor gives the same Google Trends data to anyone today, over an API.

What replaced pytrends? pytrends was archived on 17 April 2025. Use the drop-in function above, or call this Actor from any language.

Why does pytrends return 429 Too Many Requests? Google rate limits by IP and session. This Actor rotates warmed-up proxy sessions with a residential fallback, included in the price, so bulk runs finish without you handling retries.

Are the numbers search volumes? No. Google Trends gives a relative 0-100 index. For absolute monthly volume, use a keyword volume tool next to this one.

How many keywords can I compare? Google compares 5 at a time. Compare mode takes any number and puts them all on one 0-100 scale through a shared anchor term.

How far back does the data go? To 2004 with timeRange: "all", and as recent as the past hour with now 1-H.

How much does it cost? $1.50 per 1,000 keywords with data, all three data types included. Keywords without data cost nothing. The free plan's $5 monthly credit covers about 3,000.

Good to know

  • Values are Google's relative 0-100 index, not absolute search counts. For monthly search volume use a keyword volume tool alongside this one.
  • In keyword report mode each keyword is scaled on its own. To compare keywords against each other, use compare mode.
  • In compare mode pick an anchor with steady, middling interest. Keywords that can't be scaled because the anchor had no data in their batch are listed in the run summary.
  • Very rare keywords often have no data in Google Trends; they come back free with hasData: false.
  • Google Trends data is public. This Actor reads only what Google shows any visitor to trends.google.com.

Support

Found a problem or need a field added? Open an issue on the Actor's Issues tab and it will be answered.