# Google Trends Scraper (`measured_mountainpass/google-trends-scraper`) Actor

Compare unlimited keywords on one Google Trends scale, not just five. Get interest over time with ready-made analysis (trend, change %, YoY, rank, share, peak, seasonality), interest by region down to city level, related searches with breakouts, and trending searches with volume and news.

- **URL**: https://apify.com/measured_mountainpass/google-trends-scraper.md
- **Developed by:** [Brett Hozie](https://apify.com/measured_mountainpass) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 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: unlimited keyword comparison and trend analysis

Google Trends compares five keywords at a time. This Actor compares **as many as you give it** on one shared 0 to 100 scale, and hands back the analysis you would otherwise build yourself: which keywords are rising or falling, by how much, who leads, each keyword's share of interest, peaks and seasonality.

It also returns interest by region, related searches with breakout flags, and today's trending searches with search volume and growth.

### What you get

| Data | What is in it |
| --- | --- |
| **Interest over time** | The full timeline for every keyword, from the past hour to everything since 2004. |
| **Ready-made analysis** | Trend (rising, falling, stable, breakout), change in percent, year-over-year change, average, median, latest, peak and low with dates, volatility, and seasonality (strongest and weakest month). |
| **Ranking across all keywords** | Rank and share of interest for every keyword, the leader and the fastest growing keyword, in one `COMPARISON` record. |
| **Interest by region** | Countries, states and provinces, cities or US metro areas, strongest first. With two to five keywords: which keyword leads in each region. |
| **Related searches** | Top and rising searches for every keyword, growth in percent, breakout flag. |
| **Trending now** | Up to several hundred trending searches per country with search volume, growth, start time, whether still trending, related searches, category and current news headlines for every one. |

### Why this one

- **No five-keyword limit.** 20 competitors, 100 product ideas or 500 SEO keywords are measured against each other and put on one scale. Other Trends tools return separate five-keyword groups that cannot be compared with each other.
- **Small keywords stay readable.** Next to a giant, Google rounds a small keyword to 0, 1 or 2. This Actor looks each keyword up on its own as well and rescales it, so a niche term keeps its real curve at the right size.
- **Honest about accuracy.** Every keyword has a `scaleQuality` of high, medium or low, so you know how exactly it could be measured against the rest.
- **Analysis included.** Sort by `changePercent` or filter by `trend` straight away. No spreadsheet formulas, no code.
- **Many locations in one run.** Give a list of countries or regions and get the full result set for each.
- **Fast and light.** A keyword report takes about a second. No browser is used, and most runs need no proxy at all.
- **Two layouts.** Nested (one row per keyword, timeline inside) for apps and AI agents. Flat (one row per data point) for Excel, Google Sheets and BI tools.

### How to use it

1. Add your **keywords**, one per line.
2. Add one or more **locations**: a country name or code (`United States`, `US`, `DE`), a region code (`US-CA`) or `worldwide`.
3. Pick a **time range**. For year-over-year change and seasonality choose 5 years.
4. Optionally switch on **interest by region** and **related searches**, or add countries under **Trending now**.
5. Start the run. Results are in the Output tab, and the keyword ranking is in the `COMPARISON` record.

#### Example input

```json
{
    "keywords": ["nike", "adidas", "new balance", "puma", "asics", "hoka", "on running"],
    "geo": ["US", "GB", "DE"],
    "timeRange": "past_5_years",
    "includeRegions": true,
    "includeRelatedQueries": true,
    "trendingCountries": ["US"]
}
```

### Output

#### Keyword report (`interest_over_time`)

```json
{
    "type": "interest_over_time",
    "keyword": "new balance",
    "geo": "US",
    "timeRange": "today 12-m",
    "searchType": "web",
    "status": "ok",
    "scale": "shared",
    "scaleQuality": "high",
    "comparedKeywords": 7,
    "rank": 3,
    "shareOfInterest": 13.65,
    "resolution": "week",
    "points": 52,
    "average": 16.15,
    "median": 14.5,
    "latest": 10.2,
    "peak": 35.1,
    "peakDate": "2026-04-12T00:00:00.000Z",
    "changePercent": -34.96,
    "yearOverYearPercent": null,
    "trend": "falling",
    "volatility": 36.65,
    "seasonality": null,
    "exploreUrl": "https://trends.google.com/trends/explore?q=new%20balance&geo=US&date=today%2012-m",
    "timeline": [
        { "date": "2025-11-09T00:00:00.000Z", "value": 18.4 },
        { "date": "2025-11-16T00:00:00.000Z", "value": 19.1 }
    ]
}
```

With the flat layout you get one `keyword_summary` row per keyword and one `interest_over_time` row per date instead.

#### Other rows

- `interest_by_region`: `keyword`, `regionLevel`, `topRegion`, and `regions` with `code`, `name` and `value`.
- `region_comparison` (two to five keywords): for every region, the leading keyword and each keyword's share.
- `related_queries`: `top` (search and score) and `rising` (search, `growthPercent`, `breakout`).
- `trending_search`: `term`, `country`, `searchVolume`, `growthPercent`, `startedAt`, `isActive`, `hoursTrending`, `relatedQueries`, `categories`, `newsCount`, `news`, `trendsUrl`.

#### Records

- `COMPARISON`: one ranking per location with every keyword's average, peak, latest value, share of interest, rank, change and trend.
- `SUMMARY`: status for every keyword and location, including the reason when something returned no data.

### How the shared scale works

Google Trends gives relative numbers: 100 is the highest point among the keywords in one request, and one request holds five keywords at most. To compare more, the Actor keeps one reference keyword in every request and uses it to convert all groups to the same scale. When a keyword is too small to register next to the reference, a smaller reference is used as a bridge, several steps down if needed. The largest point of the whole list is 100.

A keyword that Google reports as zero against even the smallest reference stays on its own scale and is marked `"scale": "own"`.

Google Trends data is sampled, so repeated runs can differ by a point or two, exactly like reloading the Google Trends page.

### What does it cost?

You pay per result, not per minute:

- one **keyword report** per keyword and location (timeline and analysis),
- one **region breakdown** per keyword and location, only when switched on,
- one **related searches list** per keyword and location, only when switched on,
- one **trending search** per row.

Keywords with no data are not charged. Set a maximum cost per run in the run options and the Actor stops cleanly when it is reached.

### Tips

- **Ambiguous words.** `apple` mixes the company and the fruit. Add a category number, or use a more specific phrase.
- **Seasonal products.** Use 5 years: `seasonality.peakMonthName` tells you when demand peaks each year, and `seasonality.isSeasonal` tells you whether the pattern is strong enough to plan around. Long-term growth is removed first, so a fast-growing keyword is not mistaken for a seasonal one.
- **Finding winners in a long list.** Sort by `changePercent` and look at `trend: "breakout"`.
- **Content ideas.** Rising related searches with `breakout: true` are topics that barely existed a period ago.
- **Scheduling.** Run trending searches every hour or keyword reports every week with an Apify schedule and compare over time.

### FAQ

**Do I need a proxy?**
Usually not. The Actor connects directly first, which is the fastest and costs nothing. If Google starts refusing requests it switches to Apify datacenter proxy and then to residential proxy on its own, and the run continues.

**Why are the values not whole numbers?**
On a shared scale across many keywords, whole numbers would turn small keywords into 0 or 1. Decimals keep their real shape. Switch off "Put all keywords on one scale" to get Google's own 0 to 100 values per keyword.

**Why does a keyword show no data?**
Google Trends hides keywords with very low search volume for the chosen location and period. Try a wider location or a longer time range.

**Are these search volumes?**
No. Interest values are Google's relative index. Only trending searches come with an approximate search volume.

**Can I get related topics?**
Not at the moment: Google only shows related topics to signed-in visitors, and this Actor never logs in.

**Is news included for every trending search?**
Yes. Each trending search gets current headlines with link, source and publication time, in the main language of the country. Links are Google News links that open the original article. The top stories of the day also get a picture.

**Is this legal?**
The Actor reads only public Google Trends pages, without logging in, and collects no personal data. You are responsible for how you use the results.

### Support

Found a keyword or location that does not behave as expected? Open an issue on the Issues tab with the run link and it will be looked at.

# Actor input Schema

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

Search terms to look up, one per line. Add as many as you like: all of them are put on one shared 0 to 100 scale, so you can rank 50 brands or 200 product ideas against each other. Google Trends itself stops at five. Leave empty if you only want trending searches.

## `geo` (type: `array`):

Where to measure interest, one per line. Use a country name or code (United States, US, Germany, DE), a region code (US-CA, GB-ENG) or worldwide. Every location gets its own full set of results, so three locations cost three times as much as one. Leave empty for worldwide.

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

How far back to look. Longer ranges give coarser points: the past 7 days is hourly, 12 months is weekly, 5 years and all time are monthly. Year-over-year change and seasonality need more than one year, so pick 5 years for those.

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

Optional. Set this to use your own date range instead of the time range above.

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

Optional. Only used together with a custom start date. Leave empty for today.

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

Which Google search to measure. YouTube shows video demand, Shopping shows buying intent.

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

Optional Google Trends category number to narrow an ambiguous keyword (for example 71 for Food and Drink so that apple means the fruit). 0 means all categories. The number is the cat= value in a Google Trends link.

## `compareOnOneScale` (type: `boolean`):

On: every keyword is measured against the others, so values, rank and share of interest are comparable across the whole list. Off: each keyword gets its own 0 to 100 scale, like looking it up alone.

## `preciseValues` (type: `boolean`):

On: small keywords keep a detailed curve even next to a giant, instead of Google's rounded 0, 1, 2 values. Uses one extra lookup per keyword. Turn off for the fastest possible run.

## `includeRegions` (type: `boolean`):

Adds a ranked list of regions for every keyword. With two to five keywords you also get a region-by-region comparison showing which keyword leads where.

## `regionLevel` (type: `string`):

How fine the region list should be. Automatic gives countries for worldwide and states or provinces for a country. Metro areas exist for the United States only.

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

Adds the top related searches and the fastest rising ones for every keyword, with growth in percent and a breakout flag for searches that grew more than 5,000%.

## `trendingCountries` (type: `array`):

Optional. Add country names or codes (US, Germany, JP) to get what people are searching for right now, with search volume, growth, start time, related searches, category and news. Works with or without keywords.

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

Time window for trending searches.

## `trendingCategory` (type: `string`):

Only trending searches from this category.

## `trendingSort` (type: `string`):

Order of the trending list before the limit below is applied.

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

Skip searches whose spike has already ended.

## `maxTrendingPerCountry` (type: `integer`):

Google lists up to several hundred per country. Use 0 for all of them.

## `includeTrendingNews` (type: `boolean`):

Adds current news headlines with link, source and publication time to every trending search, so you can see why it is trending.

## `trendingNewsPerSearch` (type: `integer`):

How many headlines to attach to each trending search.

## `outputFormat` (type: `string`):

Nested: one row per keyword with the whole timeline inside it. Best for apps, JSON and AI agents. Flat: one row per date, region or related search. Best for Excel, Google Sheets and BI tools.

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

Language for region names and related searches, as a code such as en-US, de, fr or ja.

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

How many lookups run at the same time. The default is a safe speed; higher is faster but makes Google more likely to slow you down.

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

Leave as is. The Actor connects directly first (fastest and free) and switches to Apify datacenter proxy, then residential proxy, only if Google starts refusing requests. Pick specific proxy groups or your own proxies to force all lookups through them.

## Actor input object example

```json
{
  "keywords": [
    "nike",
    "adidas",
    "new balance",
    "puma",
    "asics",
    "hoka",
    "on running"
  ],
  "geo": [
    "US"
  ],
  "timeRange": "past_12_months",
  "searchType": "web",
  "category": 0,
  "compareOnOneScale": true,
  "preciseValues": true,
  "includeRegions": false,
  "regionLevel": "auto",
  "includeRelatedQueries": false,
  "trendingHours": "24",
  "trendingCategory": "0",
  "trendingSort": "google",
  "trendingActiveOnly": false,
  "maxTrendingPerCountry": 100,
  "includeTrendingNews": true,
  "trendingNewsPerSearch": 3,
  "outputFormat": "nested",
  "language": "en-US",
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

## `comparison` (type: `string`):

No description

## `summary` (type: `string`):

No description

# 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": [
        "nike",
        "adidas",
        "new balance",
        "puma",
        "asics",
        "hoka",
        "on running"
    ],
    "geo": [
        "US"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("measured_mountainpass/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": [
        "nike",
        "adidas",
        "new balance",
        "puma",
        "asics",
        "hoka",
        "on running",
    ],
    "geo": ["US"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("measured_mountainpass/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": [
    "nike",
    "adidas",
    "new balance",
    "puma",
    "asics",
    "hoka",
    "on running"
  ],
  "geo": [
    "US"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call measured_mountainpass/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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