# Google Trends Scraper & API - Bulk Keywords, Daily Data (`headply/google-trends-scraper`) Actor

Google Trends API and pytrends alternative: interest over time for hundreds of keywords on one comparable scale, daily historical data for multi-year ranges, interest by region, related queries and Trending Now searches.

- **URL**: https://apify.com/headply/google-trends-scraper.md
- **Developed by:** [Mayowa Ogedengbe](https://apify.com/headply) (community)
- **Categories:** SEO tools, Marketing, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.80 / 1,000 keyword series

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Google Trends Scraper

Scrape **Google Trends** for as many keywords as you like and get every number on **one comparable scale**. Google only compares five keywords at a time and rescales each comparison, so numbers from different comparisons can't be put side by side. This Actor links comparisons through shared keywords, so 500 keywords come back as if Google had compared them all at once. It also returns **daily data over any range** (even 2004 to today), **interest by region**, **related and rising queries**, and **Trending Now** with search volumes. No login, no API key, no five-keyword limit.

It is a practical **Google Trends API alternative**: Google's official Trends API is still an invite-only alpha, and the popular open-source libraries break on rate limits.

#### Sample output (real run: 10 drinks, US, past 12 months, one shared scale)

| Keyword | Average interest | Peak | Peak week |
|---|---|---|---|
| coffee | 76.5 | 100 | 2026-04-12 |
| tea | 36.6 | 45 | 2026-04-05 |
| espresso | 9.6 | 14.8 | 2026-04-12 |
| matcha | 6.2 | 8.6 | 2026-04-12 |
| energy drink | 3.7 | 7.9 | 2026-04-12 |
| chai | 3.0 | 4.2 | 2026-08-23 |
| cold brew | 2.0 | 3.4 | 2026-06-21 |
| kombucha | 1.1 | 1.6 | 2026-06-21 |

Google Trends only compares 5 terms at a time and rescales every request to 0-100. This Actor chains overlapping batches so **every keyword sits on the same scale** (validated within 0-1.7% of Google's own numbers), and the full time series comes with each row.

#### Why this one

| | This Actor | pytrends / DIY | Typical Store alternative |
|---|---|---|---|
| Keywords compared on one scale | **Hundreds** | 5 | 5 |
| Daily data for multi-year ranges | Yes, stitched and calibrated | Weekly or monthly only | Rarely |
| Rate limits (429) | Handled with session rotation | Breaks | Some fail 1 run in 4 |
| Price | **$3 / 1,000 keyword series** | Free, your time | $2 to $25 / 1,000, often plus start fees |

**What it costs:** 100 keywords with their time series = about $0.50.

### What this Actor does

- Returns **interest over time** for any number of keywords or topics, for one or many locations.
- **Normalizes across batches.** Keywords beyond five are chained through shared "pivot" keywords, chosen so no keyword is lost to Google's rounding. Every value is on one scale where 100 is the single highest point in the run.
- Builds **daily history over long ranges.** Google switches to weekly data after about nine months and to monthly after five years. This Actor fetches daily windows and calibrates each one against the full-range series, so levels stay consistent across years.
- Adds **interest by region** at country, state, metro (US) or city level, and **related queries**, both top and rising, including Breakouts.
- Scrapes **Trending Now**: everything on trends.google.com/trending, with approximate search volume, growth, start and end time, category and related searches.
- Supports **web, image, news, YouTube and Google Shopping** search, category filters, topic IDs such as `/m/07bsy`, and hourly ranges (past hour to past 7 days).
- Rotates to a fresh IP and session the moment Google throttles, and always finishes before the run timeout with everything collected so far.

### How accurate is the normalization?

We checked it against Google itself. Eighteen keywords were normalized together. Then pairs that had landed in *different* Google requests were compared directly on Google Trends. The ratio between the two keywords matched within:

| Pair | Google, compared directly | This Actor | Difference |
| --- | --- | --- | --- |
| chatgpt / yoga | 5.27 | 5.27 | 0.0% |
| netflix / pilates | 7.82 | 7.81 | 0.1% |
| iphone / netflix | 2.52 | 2.52 | 0.1% |
| coffee / sourdough | 9.23 | 9.26 | 0.4% |
| airbnb / padel | 21.67 | 21.76 | 0.4% |
| spotify / ozempic | 5.64 | 5.66 | 0.4% |
| bitcoin / kombucha | 14.70 | 14.52 | 1.2% |
| tesla / notion | 11.66 | 11.86 | 1.7% |

For daily stitching, the change in level across every window seam matched Google's own daily data within 0 to 3%. (Tested 25 September 2026, US, past 12 months and past 5 years.)

The usual shortcut is one fixed "anchor" keyword in every request. It loses small keywords to rounding: in simulation it was off by up to 74%, or returned zero, for keywords a few hundred times smaller than the anchor. This Actor stayed under 1% on the same data.

### What data can you extract from Google Trends?

| Group | Fields |
| --- | --- |
| Keyword | keyword, keywordTitle (the name of a topic ID), isTopic, geo, timeframe, startDate, endDate, resolution, searchProperty, category |
| Summary | average, peak, peakDate, latest, changePct (last quarter of the range vs the first), comparedWith |
| Time series | timeline: date and value per point, isPartial for the still-filling last point |
| Regions | interestByRegion: geoName, geoCode, value (0-100) |
| Related | relatedQueries.top and relatedQueries.rising (value, formattedValue, isBreakout) |
| Scale | scale.method, scale.stitchedDaily, scale.precision (high, medium or low), exploreUrl |
| Trending Now | rank, query, geo, searchVolume, increasePct, startedAt, endedAt, isActive, relatedSearches, categories, newsArticleCount |

### How to scrape Google Trends

1. Choose **Interest over time** or **Trending now**.
2. Add your **keywords**, one per line. There's no limit of five.
3. Add **locations** such as `US`, `GB`, `US-CA` or `US-NY-501`, or leave empty for worldwide.
4. Pick a **time range**. Turn on **Daily data for long ranges** if you want one point per day over years.
5. Optionally add **interest by region** and **related queries**, then run and export to JSON, CSV or Excel.

#### Example input

```json
{
  "keywords": ["coffee", "tea", "matcha", "kombucha", "yerba mate", "cold brew", "chai"],
  "geos": ["US", "GB"],
  "timeframe": "today 5-y",
  "dailyResolution": true,
  "includeRelatedQueries": true
}
```

#### Example output (one keyword, trimmed)

```json
{
  "type": "interestOverTime",
  "keyword": "coffee",
  "geo": "US",
  "timeframe": "today 12-m",
  "startDate": "2025-09-25",
  "endDate": "2026-09-25",
  "resolution": "WEEK",
  "average": 76.23,
  "peak": 100.0,
  "peakDate": "2026-04-12",
  "latest": 71.0,
  "changePct": 13.4,
  "comparedWith": ["tea", "matcha"],
  "scale": {"method": "single-request", "stitchedDaily": false, "precision": "high"},
  "timeline": [{"date": "2025-09-21", "value": 65.0}, {"date": "2025-09-28", "value": 70.0}],
  "relatedQueries": {
    "top": [{"query": "coffee near me", "value": 100}],
    "rising": [{"query": "how to remove coffee stain from carpet", "value": 5050, "isBreakout": true, "formattedValue": "Breakout"}]
  },
  "exploreUrl": "https://trends.google.com/trends/explore?q=coffee&date=today+12-m&geo=US"
}
```

### How much does it cost to scrape Google Trends?

Pay per result. You only pay for what you turn on.

| Event | What it is |
| --- | --- |
| Keyword series | One keyword in one location: summary and time series |
| Normalized keyword | Added when a run has more than five keywords and they are put on one scale |
| Daily history, per year | Added per keyword per year of stitched daily data |
| Region breakdown | Interest by region for one keyword |
| Related queries | Top and rising queries for one keyword |
| Trending search | One trending search in Trending Now mode |

Current prices are shown on the Actor's pricing tab. A typical run of 100 keywords over the past 12 months takes under a minute.

### Tips

- **Compare like with like for the finest detail.** Google rounds every value to a whole number, so a keyword more than about 100 times smaller than the biggest in the same run carries less detail. The `scale.precision` field flags it.
- **Topics vs search terms.** A topic ID (from the Google Trends URL, for example `/m/0dr90d` for Tesla the company) counts every language and spelling. A plain keyword counts that exact search.
- **The last point is often partial.** It's marked `isPartial: true` and left out of `latest` and `changePct`.
- **Locations:** country codes (`DE`), regions (`US-TX`, `GB-SCT`) and US metro areas (`US-CA-807`).

### FAQ

**Is there an official Google Trends API?** Google announced one in July 2025. It is still an application-only alpha, returns only consistently scaled interest over time, and has no regions, related queries or Trending Now.

**Why are my numbers different from the Google Trends website?** Values are relative to the highest point among *all* keywords in the run, not just the five on screen. Ratios between keywords are the same as on Google; the absolute 0 to 100 level moves with the set you compare.

**Can I track keywords every day?** Yes. Schedule the Actor and store runs, or pick the past 7 days for hourly data.

**Is scraping Google Trends legal?** Google Trends shows aggregated, anonymized search interest. It contains no personal data. As with any data source, check that your use fits your own legal requirements.

### Support

Found a bug or need a field? Open an issue on the Actor's Issues tab and it will be looked at quickly.

### Related Actors

- [Google Trends Bulk Keyword Comparison](https://apify.com/headply/google-trends-bulk-keyword-comparison): the same engine, focused on comparing up to 500 keywords on one scale.
- [Google Trends Trending Now Scraper](https://apify.com/headply/google-trends-trending-now): what people are searching right now, with search volume.

### Use it as an API

Run it from your own code and get the results back in one call. Replace `YOUR_TOKEN` with your [Apify API token](https://console.apify.com/settings/integrations).

```bash
curl -X POST "https://api.apify.com/v2/acts/headply~google-trends-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"keywords": ["coffee", "tea", "matcha"], "geos": ["US"], "timeframe": "today 12-m"}'
```

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")
run_input = {'keywords': ['coffee', 'tea', 'matcha'], 'geos': ['US'], 'timeframe': 'today 12-m'}
run = client.actor("headply/google-trends-scraper").call(run_input=run_input)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

It also works from Make, Zapier, n8n, Google Sheets and as a tool for AI agents through the [Apify MCP server](https://mcp.apify.com/?tools=headply/google-trends-scraper).

### More data tools from the same developer

- [Threads Scraper & API](https://apify.com/headply/threads-scraper): posts, reply trees, profiles and keyword search from Threads
- [Yelp Scraper & API](https://apify.com/headply/yelp-scraper): every business in a city with phones, websites and all reviews
- [TikTok & YouTube Transcript API](https://apify.com/headply/tiktok-youtube-transcript-scraper): video to text, even without captions
- [Airbnb & Vrbo Scraper](https://apify.com/headply/airbnb-vrbo-scraper): listings, calendars, occupancy and revenue
- [Jumia Scraper & API](https://apify.com/headply/jumia-price-intelligence): prices and sellers across 8 African countries

# Changelog

This Actor's version history is a separate document: https://apify.com/headply/google-trends-scraper/changelog.md

# Actor input Schema

## `mode` (type: `string`):

<b>Interest over time</b> returns a time series (and optionally regions and related queries) for your keywords. <b>Trending now</b> returns what is spiking in Google Search right now, with search volume.

## `keywords` (type: `array`):

One search term per line. No limit of five: add up to 500 and they are all returned on one comparable scale. Topic IDs such as <b>/m/07bsy</b> also work. Used in <i>Interest over time</i> mode.

## `geos` (type: `array`):

Country or region codes, one per line: <b>US</b>, <b>GB</b>, <b>US-CA</b> (California), <b>US-NY-501</b> (New York metro). Leave empty for worldwide. Each location is a separate set of results.

## `timeframe` (type: `string`):

The period to cover. Pick <b>Custom</b> to set exact dates below.

## `startDate` (type: `string`):

First day of a custom range, from 2004-01-01.

## `endDate` (type: `string`):

Last day of a custom range. Leave empty for today.

## `dailyResolution` (type: `boolean`):

Google only gives daily points for ranges up to about nine months, then switches to weekly or monthly. Turn this on to get one daily point per day over any range, even 2004 to today. Each window is calibrated against the full-range series so the levels stay consistent across years.

## `normalizeAcrossBatches` (type: `boolean`):

Google compares at most five keywords at a time and scales each comparison on its own. With this on, keywords beyond five are linked through shared keywords, so 100 means the same thing for every keyword in the run. Turn off to process independent groups of five.

## `includeInterestByRegion` (type: `boolean`):

Add each keyword's interest per country, state, metro or city.

## `regionResolution` (type: `string`):

The level for interest by region. <b>Auto</b> uses countries for worldwide and states or provinces for a country. Metro areas are available for the US.

## `includeRelatedQueries` (type: `boolean`):

Add the top related searches and the fastest-rising ones (including Breakouts) for each keyword.

## `includeTimeline` (type: `boolean`):

Turn off if you only need the summary numbers (average, peak, latest, change).

## `category` (type: `integer`):

Google Trends category ID to narrow the meaning of a keyword, for example <b>71</b> for Food & Drink or <b>12</b> for Business & Industrial. 0 means all categories.

## `searchProperty` (type: `string`):

Which Google search to measure.

## `language` (type: `string`):

Interface language for names of regions and topics, for example en-US or de-DE.

## `trendingGeos` (type: `array`):

Country codes for <i>Trending now</i> mode, one per line.

## `trendingHours` (type: `string`):

How far back to look.

## `trendingActiveOnly` (type: `boolean`):

Skip trends that have already ended.

## `trendingMinVolume` (type: `integer`):

Skip trends below this approximate number of searches.

## `trendingCategories` (type: `array`):

Keep only these categories. Leave empty for all.

## `maxTrendingItems` (type: `integer`):

0 means all.

## `maxConcurrency` (type: `integer`):

How many Google sessions run at once. Higher is faster for large keyword lists; each session uses its own IP.

## `proxyConfiguration` (type: `object`):

Google throttles Trends per IP. Residential proxies give the most reliable results.

## Actor input object example

```json
{
  "mode": "interestOverTime",
  "keywords": [
    "coffee",
    "tea",
    "matcha"
  ],
  "geos": [
    "US"
  ],
  "timeframe": "today 12-m",
  "dailyResolution": false,
  "normalizeAcrossBatches": true,
  "includeInterestByRegion": false,
  "regionResolution": "auto",
  "includeRelatedQueries": false,
  "includeTimeline": true,
  "category": 0,
  "searchProperty": "web",
  "language": "en-US",
  "trendingGeos": [
    "US"
  ],
  "trendingHours": "24",
  "trendingActiveOnly": false,
  "trendingMinVolume": 0,
  "maxTrendingItems": 0,
  "maxConcurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

One item per keyword and location, or per trending search.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "keywords": [
        "coffee",
        "tea",
        "matcha"
    ],
    "geos": [
        "US"
    ],
    "trendingGeos": [
        "US"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("headply/google-trends-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "keywords": [
        "coffee",
        "tea",
        "matcha",
    ],
    "geos": ["US"],
    "trendingGeos": ["US"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("headply/google-trends-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "keywords": [
    "coffee",
    "tea",
    "matcha"
  ],
  "geos": [
    "US"
  ],
  "trendingGeos": [
    "US"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call headply/google-trends-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,headply/google-trends-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/MZiFztaVezbHtWeKo/builds/qysTDsinXkxuPyhWD/openapi.json
