# Google Trends Scraper: Keywords, Regions & Related Queries (`northloop-labs/google-trends-scraper`) Actor

Bulk Google Trends data: interest over time, interest by region, related queries and topics for many keywords per run, 5-keyword comparisons, any country, time range and category, plus alerts for new rising queries.

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

## Pricing

from $2.50 / 1,000 keyword reports

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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: Keywords, Regions & Related Queries

**Get Google Trends data for hundreds of keywords in one run.** For each keyword you get **interest over time**, **interest by region** (countries, states or US metro areas) and **related queries** (top and rising, with "Breakout" flags), for any country, time range, category and search type: web, YouTube, News, Images or Shopping. Put up to **5 keywords on one line** to compare them on the same 0–100 scale, just like the Google Trends website.

Turn on **Only new rising queries since last run** and schedule it, and it works like a trend alert: each run tells you which rising searches are new around your keywords since the last check.

No Google account, API key or proxy setup needed. Every keyword line is fetched through its own residential IP with a cookie warm-up, and blocked requests (HTTP 429, proxy errors, timeouts) are retried automatically on a fresh session. In our tests on Apify, 10 out of 10 runs and 330 out of 330 keyword reports succeeded across 13 countries.

### What you can use it for

- **SEO and content planning:** find rising queries around your topics before they peak, and see which states or countries search for them most.
- **Keyword research in bulk:** compare hundreds of keywords by average, latest and peak interest, and by how much interest grew over the period (`interestChangePct`).
- **Product and market research:** check seasonality (12 months or 5 years of weekly or monthly points), compare brands or products head to head, and size demand by region.
- **E-commerce and dropshipping:** spot products whose search interest is climbing, on web search or Google Shopping.
- **YouTube and news creators:** use YouTube or News search interest to pick topics and timing.
- **Dashboards and AI agents:** one clean row per keyword with summary numbers, ready for Google Sheets, BI tools, n8n or an LLM.

### What data you get

One row per keyword report (one keyword × one geo):

| Field | Description |
|---|---|
| `keyword`, `comparedWith` | The keyword and the other keywords on the same line (same 0–100 scale) |
| `geo`, `timeRange`, `category`, `searchType` | The settings used |
| `averageInterest`, `latestInterest`, `peakInterest`, `peakDate` | Summary of the interest-over-time series (0–100) |
| `interestChangePct` | Average interest in the last quarter of the period vs the first quarter, in % |
| `interestOverTime` | Every point: `date` (ISO, UTC), `formattedTime`, `value`, and `isPartial` for the current, unfinished period |
| `interestByRegion` | `geoCode`, `geoName`, `value` per country, state or metro area, highest first |
| `topRelatedQueries` | The most popular related searches (`query`, `value` 0–100, `link`) |
| `risingRelatedQueries` | Fastest-growing related searches (`value` = growth in %, `formattedValue` like `+250%` or `Breakout`, `isBreakout`) |
| `topRelatedTopics`, `risingRelatedTopics` | Related topics, when Google serves them (see the FAQ) |
| `newRisingQueries`, `newRisingTopics`, `isBaseline`, `previousRunAt` | Monitor mode only: rising items not seen in earlier runs |
| `status` | `ok`, `no-data` (not enough search volume, free) or `error` (free) |
| `trendsUrl` | The same report on the Google Trends website |

### How to scrape Google Trends

1. Enter your **keywords**, one per line. To compare, put up to 5 on one line separated by commas: `coffee, tea, matcha`.
2. Pick one or more **countries or regions** (`US`, `GB`, `DE`, `US-CA`, `GB-ENG`) or `worldwide`. Each line runs once per geo.
3. Choose the **time range** (past hour to 2004–present, or custom dates), and optionally a **category** and **search type**.
4. Choose which **reports** you want and click **Start**.

#### Input example

```json
{
  "keywords": ["air fryer", "iphone, samsung galaxy, google pixel", "electric bike"],
  "geos": ["US", "GB"],
  "timeRange": "today 12-m",
  "category": "0",
  "searchType": "web",
  "reports": ["interestOverTime", "interestByRegion", "relatedQueries"]
}
```

#### Output example

```json
{
  "keyword": "tea",
  "comparedWith": ["coffee"],
  "geo": "US",
  "timeRange": "today 12-m",
  "category": 0,
  "searchType": "web",
  "status": "ok",
  "averageInterest": 36.9,
  "latestInterest": 32,
  "peakInterest": 46,
  "peakDate": "2026-04-12T00:00:00.000Z",
  "interestChangePct": -8.2,
  "interestOverTime": [
    { "date": "2025-10-19T00:00:00.000Z", "formattedTime": "Oct 19 – 25, 2025", "value": 33 },
    { "date": "2025-10-26T00:00:00.000Z", "formattedTime": "Oct 26 – Nov 1, 2025", "value": 32 }
  ],
  "interestByRegion": [
    { "geoCode": "US-SD", "geoName": "South Dakota", "value": 46 },
    { "geoCode": "US-NM", "geoName": "New Mexico", "value": 36 }
  ],
  "topRelatedQueries": [
    { "query": "green tea", "value": 100, "formattedValue": "100", "isBreakout": false, "link": "https://trends.google.com/trends/explore?q=green+tea&date=today+12-m&geo=US" }
  ],
  "risingRelatedQueries": [
    { "query": "loaded tea discount code", "value": 1950, "formattedValue": "+1,950%", "isBreakout": false, "link": "https://trends.google.com/trends/explore?q=loaded+tea+discount+code&date=today+12-m&geo=US" }
  ],
  "topRelatedTopics": [],
  "risingRelatedTopics": [],
  "trendsUrl": "https://trends.google.com/trends/explore?q=coffee%2Ctea&geo=US&date=today%2012-m&hl=en-US",
  "scrapedAt": "2026-10-19T22:31:28.150Z"
}
```

The **Overview** tab of the dataset shows the summary numbers in a table, and **Related queries & topics** shows the related lists.

### Rising-query alerts: get only new breakout searches

With **Only new rising queries since last run** on, the Actor remembers the rising queries (and topics) it has already seen for each keyword, geo and time range, in a named key-value store in your own Apify account (`google-trends-monitor` by default). Each report then gets `newRisingQueries` and `newRisingTopics` with what is new since the last run.

- The first run is a **baseline**: everything counts as new and `isBaseline` is `true`.
- With **Monitor output: Changes only** (the default), later runs save, and charge for, only the keywords that have something new. Keywords with nothing new are free.
- Use **Past 7 days** or **Past 30 days** with a daily or weekly schedule for the freshest alerts. Use a different **Monitor name** for each separate monitor.

### How much does it cost?

This Actor uses **pay-per-event** pricing, so you only pay for what you get:

- **$0.005 per run** (Actor start)
- **$0.0025 per keyword report** ($2.50 per 1,000), whichever reports you pick

A keyword report is one keyword for one geo. A line comparing 5 keywords is 5 reports; `["coffee", "tea"]` in `US` and `GB` is 4. Keywords with too little search volume and requests that fail after all retries are **free**, and so are unchanged keywords in monitor mode. Example: 100 keywords in one country cost $0.255. Platform usage, including the residential proxies, is included in the price. You can cap your spend with the maximum cost per run setting in Apify, and the Actor then stops once the next keyword would go over it.

### Tips

- **Comparisons:** values are relative within one line. `coffee, tea` gives tea 37 on coffee's scale; `tea` alone gives tea 100 at its own peak. Use comparisons when you need to rank keywords against each other, and add a common "anchor" keyword to every line to compare across lines.
- **Geo codes:** countries are ISO codes (`US`, `GB`, `DE`, `IN`, `BR`), regions use ISO 3166-2 (`US-CA`, `GB-SCT`, `DE-BY`, `IN-MH`), US metros use DMA codes (`US-NY-501`).
- **Time ranges:** past hour and 4 hours give minute points, past day and 7 days give hourly points, 1–3 months give daily points, 12 months gives weekly points, 5 years and 2004–present give monthly points. Custom ranges take two dates, like `2024-01-01 2024-12-31`.
- **Categories** remove ambiguity: `apple` in Food & Drink (71) vs Computers & Electronics (5). Any other category ID goes in **Category ID**.
- **Topic IDs:** enter a Google Trends topic ID like `/m/0dl567` as a keyword to measure the topic rather than the exact phrase.
- **Speed:** about 100 keywords in 2–3 minutes. Raise **Parallel requests** (up to 20, each with its own IP) for very big lists.

### Use with AI agents, MCP, Make, Zapier, n8n and the API

#### AI agents and the Apify MCP server

Your AI agent can run this Actor as a tool through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp). In Claude, Cursor, VS Code or any other MCP client, add this server URL to load only this Actor:

```text
https://mcp.apify.com?tools=northloop-labs/google-trends-scraper
```

You sign in to Apify on first connection. Agents that use the default server can also find the Actor with `search-actors` and run it with `call-actor`. Pass `maxTotalChargeUsd` in `callOptions` to cap what one run may cost. The Actor uses pay-per-event pricing, so it also works with Apify's agentic payments.

Example prompt: *"Compare Google search interest in air fryers, slow cookers and instant pots in the US and UK over the past 5 years, and list the rising related queries."*

#### Make, Zapier and n8n

Apify has official integrations for [Make](https://docs.apify.com/platform/integrations/make), [Zapier](https://docs.apify.com/platform/integrations/zapier) and [n8n](https://docs.apify.com/platform/integrations/n8n). Use "Run Actor", pick `northloop-labs/google-trends-scraper`, paste your input as JSON, and send the dataset items on to Google Sheets, Slack, Airtable or email. Inside Apify you can also connect Google Sheets or Slack, or add a [webhook](https://docs.apify.com/platform/integrations/webhooks) that fires when a run finishes.

#### API

Run it and get the results in one call (this endpoint waits up to 5 minutes, which suits up to about 100 keywords per run):

```bash
curl -X POST "https://api.apify.com/v2/acts/northloop-labs~google-trends-scraper/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"keywords": ["air fryer", "coffee, tea"], "geos": ["US"], "timeRange": "today 12-m"}'
```

Or with the Python client (`pip install apify-client`). The JavaScript client works the same way:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("northloop-labs/google-trends-scraper").call(run_input={"keywords": ["air fryer", "coffee, tea"], "geos": ["US"], "timeRange": "today 12-m"})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["keyword"], item["averageInterest"], item["interestChangePct"])
```

### Data & privacy

- The Actor collects only **aggregated, anonymous search-interest data** that Google Trends shows publicly: index values from 0 to 100, region names and related search phrases. It contains no personal data about searchers.
- Results are written **only to your own Apify account**: the run's default dataset, plus, in monitor mode, the list of rising items already seen in a named key-value store. The Actor sends the data nowhere else and keeps no copy. A small `RUN_SUMMARY` record holds only counts, errors and request statistics.

### Is it legal to scrape Google Trends?

The Actor reads public Google Trends pages without logging in and does not bypass any login or paywall, and the data is aggregated and anonymous. Google's Terms of Service restrict automated access, so check that your use fits your own legal and compliance requirements. If you publish charts or numbers, cite Google Trends as the source. This isn't legal advice.

### FAQ

#### How many keywords can I scrape in one run?

Up to 2,000 keyword lines, each with up to 5 keywords, times any number of geos. A run of 100 keywords in one country takes about 2–3 minutes with the default 8 parallel requests.

#### How do I compare keywords?

Put them on one line, separated by commas: `iphone, samsung galaxy, google pixel`. Google Trends allows up to 5 per comparison. Each keyword still gets its own row, with values on the shared scale and the others listed in `comparedWith`.

#### Why are the values between 0 and 100 and not search volumes?

Google Trends doesn't publish absolute search volumes. 100 is the peak popularity in the chosen period, region and comparison, and 50 means half as popular. Values are relative, so compare keywords on the same line or with a common anchor keyword.

#### Why are related topics or city-level regions empty?

Google currently serves related topics and city-level region data only to signed-in users of the Trends website, and returns empty lists to automated, anonymous sessions. Related queries, interest over time and interest by country, state and US metro area work normally. A report with no data at all is free, and the Actor will fill these fields automatically if Google starts serving them again.

#### Why do I get `no-data` for some keywords?

Google shows no data when a keyword has very little search volume in the chosen geo and period. Try a bigger region, a longer time range or a broader keyword. These rows are free.

#### What does "Breakout" mean in rising queries?

The search grew by more than 5,000% compared with the previous period, usually because it is new. `isBreakout` is `true` and `value` holds the growth in %.

#### How do I get alerts for new rising searches?

Turn on **Only new rising queries since last run**, choose **Past 7 days** or **Past 30 days**, and add a daily or weekly schedule in Apify. Then send each run's results to Slack, email or Google Sheets with Apify's integrations, Make, Zapier or n8n.

#### Which export formats can I use?

Results land in an Apify dataset. Download them as JSON, JSONL, CSV, Excel, XML, HTML or RSS from the run page, or read them through the API, Make, Zapier, n8n or Google Sheets.

### How this Actor was made

This Actor was made with AI. An AI agent wrote and tested the code, this README and the store listing, and a human owns and maintains the Actor. It reads the same JSON endpoints the Google Trends website uses for its own charts (explore, then the interest-over-time, region and related-searches widgets), through residential IPs with a cookie warm-up, and retries blocked requests on a fresh session.

### More Actors from Northloop Labs

- [Luma, Eventbrite & Meetup Events Scraper](https://apify.com/northloop-labs/tech-events-finder): tech, AI and startup events from Luma, Eventbrite and Meetup.
- [Greenhouse, Lever, Ashby & Workable Jobs Scraper](https://apify.com/northloop-labs/company-jobs-finder): open jobs from company career pages.
- [Google Ads Transparency Center Scraper](https://apify.com/northloop-labs/google-ads-transparency-library): a company's ads from the Google Ads Transparency Center.
- [Podcast Transcriber for RSS & Apple Podcasts](https://apify.com/northloop-labs/podcast-transcriber): podcast transcripts with timestamps and SRT subtitles.
- [EU TED & UK Find a Tender Scraper](https://apify.com/northloop-labs/public-tenders-monitor): UK and EU public tenders with daily alerts.

### Feedback

Missing something, such as Trending Now by country, a flat one-row-per-date output or another Google property? Open an issue in the **Issues** tab and we will look at it.

# Actor input Schema

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

One report per line. To compare keywords on the same 0-100 scale, put up to 5 on one line separated by commas, e.g. "coffee, tea, matcha". You can also enter a Google Trends topic ID such as /m/0dl567.

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

Where to measure interest: a 2-letter country code (US, GB, DE), a region (US-CA, GB-ENG, IN-MH) or a US metro area (US-NY-501). Use "worldwide" (or leave empty) for the whole world. Each keyword line is run once per geo.

## `timeRange` (type: `string`):

The period of the report. Short ranges give minute or hourly points, 12 months gives weekly points, 5 years and 2004-present give monthly points.

## `customTimeRange` (type: `string`):

Only used when Time range is Custom: start and end date separated by a space, e.g. "2024-01-01 2024-12-31" (any dates from 2004-01-01).

## `reports` (type: `array`):

Which Google Trends sections to collect for each keyword. Fewer sections run faster; the price per keyword report is the same. Related topics: Google currently serves them only to signed-in users, so this list is usually empty (a report with no data at all is free).

## `category` (type: `string`):

Limit interest to one Google Trends category. For any other category, set its numeric ID in Category ID.

## `categoryId` (type: `integer`):

Any numeric Google Trends category ID, e.g. 1227 for Computer Security. Takes priority over Category.

## `searchType` (type: `string`):

Which Google search to measure.

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

Level of detail for Interest by region. Auto = countries for worldwide, subregions (states) for a country. Metro areas (DMA) work for the US. Google currently withholds city-level data from automated sessions, so City usually comes back empty.

## `includeLowVolumeRegions` (type: `boolean`):

Also return regions with low search volume in Interest by region (same as the checkbox on Google Trends).

## `maxRelatedItems` (type: `integer`):

Cap for each related queries/topics list (top and rising). Google returns up to 25.

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

Language for region and topic names, e.g. en-US, de, fr, es, pt-BR, ja.

## `onlyNewRising` (type: `boolean`):

Remember the rising queries and topics already seen for each keyword and add newRisingQueries / newRisingTopics to every report. Schedule the run daily or weekly to get an alert-style feed of breakout searches. The first run is a baseline.

## `monitorOutput` (type: `string`):

Changes only = after the first run, save (and pay for) only reports that have new rising items. All = save every report with the new items marked.

## `monitorStoreName` (type: `string`):

Name of the key-value store in your Apify account that keeps the seen rising items (a-z, 0-9 and dashes). Use different names for separate monitors.

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

How many keyword lines are fetched in parallel, each through its own residential IP.

## Actor input object example

```json
{
  "keywords": [
    "chatgpt",
    "coffee, tea"
  ],
  "geos": [
    "US"
  ],
  "timeRange": "today 12-m",
  "reports": [
    "interestOverTime",
    "interestByRegion",
    "relatedQueries"
  ],
  "category": "0",
  "searchType": "web",
  "regionResolution": "auto",
  "includeLowVolumeRegions": false,
  "maxRelatedItems": 25,
  "language": "en-US",
  "onlyNewRising": false,
  "monitorOutput": "changes",
  "monitorStoreName": "google-trends-monitor",
  "maxConcurrency": 8
}
```

# Actor output Schema

## `overview` (type: `string`):

Average, latest and peak interest and the trend change for each keyword.

## `related` (type: `string`):

Top and rising related queries and topics per keyword.

## `all` (type: `string`):

Every field, including the full interest-over-time series and interest by region.

## `runSummary` (type: `string`):

Counts, errors and request statistics for this run.

# 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": [
        "chatgpt",
        "coffee, tea"
    ],
    "geos": [
        "US"
    ],
    "reports": [
        "interestOverTime",
        "interestByRegion",
        "relatedQueries"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("northloop-labs/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": [
        "chatgpt",
        "coffee, tea",
    ],
    "geos": ["US"],
    "reports": [
        "interestOverTime",
        "interestByRegion",
        "relatedQueries",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("northloop-labs/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": [
    "chatgpt",
    "coffee, tea"
  ],
  "geos": [
    "US"
  ],
  "reports": [
    "interestOverTime",
    "interestByRegion",
    "relatedQueries"
  ]
}' |
apify call northloop-labs/google-trends-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,northloop-labs/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/exr0u7Al7dyxDV3RI/builds/kZBfXLtmoMciYUT14/openapi.json
