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

Reliable Google Trends API: interest over time, interest by region, related queries and topics for up to 5 compared terms, plus Trending now searches by country. Retries blocked requests, monitor mode.

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

## Pricing

from $1.50 / 1,000 results

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

Get **Google Trends** data for any search term: **interest over time**, **interest by region**, **related queries** and **related topics**, plus the searches **trending now** in any country. Compare up to 5 terms at once, or paste any Google Trends Explore URL.

No login, no browser. It uses the same API the Google Trends website uses, through residential proxies, and retries every blocked request with a new IP, so you get data instead of "429 Too Many Requests". One search term with a full year of weekly data is **one result**, not 52. Pair it with the [Google Ads Transparency Scraper](https://apify.com/wakeful_outhouse/google-ads-transparency-scraper) to see which advertisers already run ads on a rising keyword.

What you get:

- 📈 **Interest over time**: the full timeline (hourly, daily, weekly or monthly, as on the website) plus ready-made stats: average, peak and peak date, latest value and change in percent.
- 🗺️ **Interest by region**: countries, states or regions, or metro areas, with a value for each compared term.
- 🔍 **Related queries**: top and rising searches, with "Breakout" flags and links.
- 🧩 **Related topics**: top and rising topics with their type and Knowledge Graph ID (when Google provides them, see FAQ).
- 🔥 **Trending now**: today's trending searches by country, the same list as on trends.google.com/trending: search volume, increase, start and end time, categories, related searches, plus news headlines and pictures for the newest trends.
- ⚖️ **Comparisons**: up to 5 terms on one line, exactly like the "Compare" button on the website.
- 🔔 **Monitoring**: give a run a name and schedule it. Later runs save only what changed: new trending searches, new weeks of data, new related queries. You pay only for those.

### Use cases

- **SEO and content planning**: find rising queries before they peak and see which regions search for a topic most.
- **E-commerce and product research**: check whether a product is growing or fading, and when its season starts.
- **Market and brand research**: compare your brand with competitors over 5 years, by country.
- **News and social media**: get the trending searches of 10 countries every hour, with headlines.
- **Data science and dashboards**: feed clean JSON into BigQuery, Sheets, Looker or your own model.
- **AI agents**: give an agent a reliable Google Trends tool through the Apify API or MCP.

### Input

| Field | Description |
|---|---|
| `searchTerms` | One per line: a term (`ozempic`), up to 5 compared terms separated by commas (`chatgpt, gemini, claude`), or a Google Trends Explore URL |
| `modes` | `interestOverTime`, `interestByRegion`, `relatedQueries`, `relatedTopics` (pick any) |
| `geo` | Country (`US`), region (`US-CA`) or metro (`US-NY-501`). Empty = worldwide |
| `timeRange` | Past hour, 4 hours, day, 7 days, 30 days, 90 days, 12 months, 5 years, or since 2004 |
| `customTimeRange` | Any period: `2024-01-01 2024-12-31`, or hours `2026-10-01T00 2026-10-07T23` |
| `category` | Google Trends category ID (`71` Food & Drink, `7` Finance…). 0 = all |
| `searchType` | Web, Image, News, YouTube or Google Shopping search |
| `includeLowVolumeRegions` | Also return regions with too little data |
| `trendingCountries` | Country codes for Trending now (`US`, `GB`, `DE`…) |
| `trendingHours` | Trends that started in the past 4, 24, 48 hours or 7 days |
| `trendingCategories` | Only trends in these categories (Sports, Entertainment, Technology…) |
| `trendingActiveOnly` | Skip trends that have already ended |
| `maxTrendsPerCountry` | Limit per country (the US often has 500+ trends a day) |
| `includeNews` | Add news headlines and pictures to the newest trends (free) |
| `monitorName` | Name a run to get only changes on each run (see Monitoring) |

```json
{
  "searchTerms": ["ozempic", "chatgpt, gemini, claude", "https://trends.google.com/trends/explore?date=today%205-y&geo=GB&q=electric%20car"],
  "modes": ["interestOverTime", "interestByRegion", "relatedQueries"],
  "geo": "US",
  "timeRange": "today 12-m",
  "trendingCountries": ["US", "GB"],
  "maxTrendsPerCountry": 50
}
```

When you paste an Explore URL, its location, time range, category and search type are used, so you can set up a chart on the website and copy the address bar.

### Output examples

Every result has a `type`. One input line gives one result per data type; related queries and topics give one result per term.

**Interest over time** (timeline shortened):

```json
{
  "type": "interestOverTime",
  "query": "ozempic",
  "keywords": ["ozempic"],
  "geo": null,
  "timeRange": "today 12-m",
  "categoryName": "All categories",
  "searchType": "web",
  "exploreUrl": "https://trends.google.com/trends/explore?q=ozempic&date=today+12-m",
  "keyword": "ozempic",
  "average": 83.8,
  "peak": 100,
  "peakDate": "2026-03-01",
  "latest": 57,
  "changePercent": -19,
  "keywordStats": [{"keyword": "ozempic", "average": 83.8, "peak": 100, "peakDate": "2026-03-01", "latest": 57, "changePercent": -19}],
  "timeline": [
    {"date": "2025-10-12", "timestamp": 1760227200, "formattedTime": "Oct 12 – 18, 2025", "values": {"ozempic": 90}, "isPartial": false},
    {"date": "2026-10-11", "timestamp": 1791676800, "formattedTime": "Oct 11 – 17, 2026", "values": {"ozempic": 56}, "isPartial": true}
  ],
  "dataPoints": 53,
  "resolution": "WEEK"
}
```

`changePercent` compares the last quarter of the period with the first quarter (complete points only). For comparisons, `keyword` is `null` and `keywordStats` has one entry per term.

**Related queries:**

```json
{
  "type": "relatedQueries",
  "keyword": "ozempic",
  "topQueries": [
    {"query": "wegovy", "value": 100, "formattedValue": "100", "isBreakout": false, "link": "https://trends.google.com/trends/explore?q=wegovy&date=today+12-m"}
  ],
  "risingQueries": [
    {"query": "ozivy", "value": 7800, "formattedValue": "Breakout", "isBreakout": true, "link": "https://trends.google.com/trends/explore?q=ozivy&date=today+12-m"}
  ]
}
```

**Interest by region** (comparison):

```json
{
  "type": "interestByRegion",
  "keywords": ["chatgpt", "gemini", "claude"],
  "valueType": "shareOfSearches",
  "resolution": "COUNTRY",
  "regions": [
    {"geoCode": "LK", "geoName": "Sri Lanka", "values": {"chatgpt": 55, "gemini": 40, "claude": 5}, "hasData": true}
  ]
}
```

**Trending now:**

```json
{
  "type": "trendingNow",
  "geo": "US",
  "rank": 10,
  "title": "joe milton",
  "searchVolume": 50000,
  "increasePercentage": 1000,
  "startedAt": "2026-10-16T15:00:00Z",
  "endedAt": null,
  "isActive": true,
  "categories": ["Sports"],
  "trendBreakdown": ["joe milton", "eagles backup qb", "joe milton eagles"],
  "exploreUrl": "https://trends.google.com/trends/explore?q=joe+milton&date=now+1-d&geo=US",
  "approxTraffic": "50000+",
  "newsArticles": [
    {"title": "Joe Milton poached from Cowboys by Eagles, sets stage for MNF", "url": "https://www.dallascowboys.com/news/...", "source": "Dallas Cowboys"}
  ]
}
```

### Monitoring changes

1. Fill in the input as usual and set `monitorName`, for example `weekly-brands`.
2. Save the input as a Task and add an Apify **Schedule** (hourly for Trending now, weekly for Explore data).
3. The first run returns everything. Each later run with the same `monitorName` saves only what changed:

   - **Trending now**: only trends that earlier runs have not returned.
   - **Interest over time**: only when there are new points; new points have `"isNew": true`.
   - **Interest by region**: only when values changed; changed regions keep `previousValues`.
   - **Related queries and topics**: only when new items appeared; they have `"isNew": true`.

   Unchanged results are skipped and **not charged**. Each saved result has `newSinceLastRun`.

Connect a webhook or the Slack / email integration to the Task to get changes delivered. The state is stored in the `google-trends-monitor` key-value store in your account. To start over, use a new `monitorName` or delete its record from that store.

### Pricing

Pay per result: **$1.50 per 1,000 results**. No extra fee per run beyond the Apify default.

A result is a whole report, not a row: one search term with a full timeline is 1 result, one region map is 1 result, one trending search is 1 result. Empty related lists are not saved and not charged.

Set a maximum cost per run in the Apify Console, and the scraper stops cleanly when it is reached.

### Tips

- Keep Apify Proxy with the **Residential** group, which is the default. Google limits requests per IP, and the scraper switches to a new IP after every block. Traffic is tiny, about 6 KB per result.
- Values are relative (0–100), as on the website. To compare terms with each other, put them on one line (`coffee, tea`). Values from separate lines are scaled separately.
- Google returns weekly points for 12 months, daily for 90 days, hourly for 7 days, monthly for 5 years and longer.
- The Explore website shows "Breakout" for a rising query that grew more than 5,000 %. `value` keeps the number.

### Integrations, API and MCP

**REST API.** Run the Actor and get the results in one call (replace `YOUR_APIFY_TOKEN`; it's in Console → Settings → API & Integrations):

```bash
curl -X POST "https://api.apify.com/v2/acts/wakeful_outhouse~google-trends-scraper/run-sync-get-dataset-items" \
  -H "Authorization: Bearer YOUR_APIFY_TOKEN" -H "Content-Type: application/json" \
  -d '{"searchTerms": ["chatgpt"], "modes": ["interestOverTime"], "geo": "US"}'
```

**Python** (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("wakeful_outhouse/google-trends-scraper").call(run_input={"searchTerms": ["chatgpt"], "modes": ["interestOverTime"], "geo": "US"})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

**AI agents (MCP).** Give Claude, Cursor or any MCP client this Actor as a tool through the Apify MCP server:

- hosted: `https://mcp.apify.com?tools=wakeful_outhouse/google-trends-scraper`
- local: `npx -y @apify/actors-mcp-server --actors wakeful_outhouse/google-trends-scraper` (set `APIFY_TOKEN`)

**No-code.** Use the Apify integrations for **Make, Zapier, n8n, Google Sheets, Slack** and **webhooks**: for example, run the Actor on a Schedule and send each new rising query to a Slack channel or append the trend data to a Google Sheet. All formats are available as JSON, CSV, Excel and HTML from the dataset.

### More ad-intelligence tools

Same author, same data format, same pay-per-result pricing:

- [Google Ads Transparency Scraper](https://apify.com/wakeful_outhouse/google-ads-transparency-scraper) — ad copy, YouTube IDs, impressions and regions from the Google Ads Transparency Center.
- [Facebook Ads Library Scraper](https://apify.com/wakeful_outhouse/facebook-ads-library-scraper) — ad text, media, landing pages and run dates from the Meta Ad Library.
- [LinkedIn Ad Library Scraper](https://apify.com/wakeful_outhouse/linkedin-ad-library-scraper) — B2B ad copy, CTAs, landing pages, media, impressions by country and targeting from the LinkedIn Ad Library.

All tools: https://apify.com/wakeful_outhouse

### FAQ

**Is it legal?** Google Trends is a public website. The scraper collects only aggregated, anonymous data that the website shows without logging in. You are responsible for how you use the data.

**Why are related topics sometimes empty?** Google hides related topics from many automated clients and shows only related queries. The scraper tries another IP, but if Google still returns an empty list, the result is skipped and not charged. Related queries, timelines and regions are not affected.

**Why are the numbers different from yesterday?** Google Trends computes values from a sample of searches, so they can move by a few points between days. This is how Google Trends works, also on the website.

**Can I get absolute search volume?** Explore data is relative (0–100). Trending now has an approximate volume (`searchVolume`, for example 50,000+).

**Something broke?** Open an issue on the Issues tab with the run link. Fixes usually ship within a day.

# Actor input Schema

## `searchTerms` (type: `array`):

One per line. Compare up to 5 terms on one line, separated by commas (<code>coffee, tea</code>). You can also paste a Google Trends Explore URL (its location, time range, category and search type are used).

## `modes` (type: `array`):

Each selected data type gives one result per input line (related queries and topics: one per term). Google often hides related topics from automated clients; empty lists are skipped and not charged.

## `geo` (type: `string`):

Country (<code>US</code>), region (<code>US-CA</code>) or metro code (<code>US-NY-501</code>). Empty means worldwide.

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

Period of the chart.

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

Overrides the time range: <code>2024-01-01 2024-12-31</code> for days, or <code>2026-10-01T00 2026-10-07T23</code> for hours (up to 7 days).

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

Google Trends category, e.g. <code>71</code> Food & Drink, <code>18</code> Shopping, <code>7</code> Finance. 0 means all categories. The ID is the <code>cat=</code> value in a Google Trends URL.

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

Which Google search the data comes from.

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

Interest by region: also return regions with too little data (value 0).

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

Two-letter country codes (<code>US</code>, <code>GB</code>, <code>DE</code>…). Returns the searches trending right now, as on trends.google.com/trending: search volume, growth, start time, related searches and news. One result per trend.

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

Trends that started within this period.

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

Only trends in these categories. Empty means all.

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

Skip trends that have already ended.

## `maxTrendsPerCountry` (type: `integer`):

Stop after this many trends for each country. 0 means no limit (the US often has 500+ trends a day).

## `includeNews` (type: `boolean`):

Add news headlines and pictures to the newest trends (from the Google Trends RSS feed, which covers about the 10 newest trends). Free.

## `monitorName` (type: `string`):

Turn on monitoring: give this run any name, for example <code>weekly-brands</code>. Each run with the same name then saves only new trending searches, and only those Explore results that changed since the previous run (new timeline points, new related queries, changed regions). New items are marked with <code>isNew</code>. You pay only for saved results. Use it with an Apify Schedule. The first run saves everything. The state is kept in the <code>google-trends-monitor</code> key-value store of your account. Leave empty for a normal run.

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

How many search terms run in parallel.

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

Residential proxy is recommended: Google limits requests per IP.

## Actor input object example

```json
{
  "searchTerms": [
    "chatgpt",
    "coffee, tea"
  ],
  "modes": [
    "interestOverTime",
    "relatedQueries"
  ],
  "geo": "US",
  "timeRange": "today 12-m",
  "category": 0,
  "searchType": "web",
  "includeLowVolumeRegions": false,
  "trendingCountries": [
    "US"
  ],
  "trendingHours": "24",
  "trendingCategories": [],
  "trendingActiveOnly": false,
  "maxTrendsPerCountry": 20,
  "includeNews": true,
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Interest over time, interest by region, related queries and topics, and trending searches

# 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 = {
    "searchTerms": [
        "chatgpt",
        "coffee, tea"
    ],
    "modes": [
        "interestOverTime",
        "relatedQueries"
    ],
    "geo": "US",
    "trendingCountries": [
        "US"
    ],
    "maxTrendsPerCountry": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("wakeful_outhouse/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 = {
    "searchTerms": [
        "chatgpt",
        "coffee, tea",
    ],
    "modes": [
        "interestOverTime",
        "relatedQueries",
    ],
    "geo": "US",
    "trendingCountries": ["US"],
    "maxTrendsPerCountry": 20,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("wakeful_outhouse/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 '{
  "searchTerms": [
    "chatgpt",
    "coffee, tea"
  ],
  "modes": [
    "interestOverTime",
    "relatedQueries"
  ],
  "geo": "US",
  "trendingCountries": [
    "US"
  ],
  "maxTrendsPerCountry": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call wakeful_outhouse/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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