# Google Trends Scraper – Interest Over Time, Regions & Related (`stevenkramp/google-trends-scraper`) Actor

Get Google Trends data for any search term or compare up to 5: interest over time, interest by country/region/city, related queries (top + rising/breakout) and related topics, plus a trend summary (peak, change, direction). Web, YouTube, News, Images, Shopping. Pay only per result with data.

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

## Pricing

from $3.00 / 1,000 trend 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 – Interest Over Time, Regions & Related

Get **Google Trends data** for any keyword, or compare up to 5 keywords, in any country, region or city. You get the interest over time, interest by region, related queries (top + rising, including "Breakout" searches) and related topics in **one clean result per keyword**. A ready-made trend summary is included: average, peak, change in % and direction.

**$3 per 1,000 results.** You only pay for results that contain data. Keywords without enough search volume, and requests that fail, are reported and not charged.

### What you get for each keyword

| Field | Example |
|---|---|
| `searchTerm` / `searchTerms` | ai agents |
| `summary` | average 45.5 · peak 100 on 2026-06-07 · change +23.2 % · `rising` (ai agents, US, 12 months) |
| `interestOverTime` | 53 weekly points `{date, value 0–100, isPartial}` (hourly/daily/monthly depending on the period) |
| `interestByRegion` | `{geoCode, geoName, value}` for countries, states, cities or US metro areas |
| `relatedQueries.top` / `.rising` | `{query, value, formattedValue ("+250 %" or "Breakout"), isBreakout, link}` |
| `relatedTopics.top` / `.rising` | `{title, type, mid, value}`, when Google provides them |
| `geo`, `timeRange`, `category`, `searchProperty`, `trendsUrl`, `scrapedAt` | run context + link to the same view on Google Trends |

In **comparison mode** the values are relative to each other, exactly like the comparison view on Google Trends: `values: {"chatgpt": 38, "claude": 67, …}`, with one summary and one related-queries list per keyword.

### Use cases

- **Content and SEO planning:** find rising and breakout queries before your competitors write about them.
- **Product and market research:** see if demand for a product or niche is growing, stable or falling, and where.
- **Seasonality:** get 5 years of history to plan campaigns, stock and prices ("black friday", "air fryer", "solar panels").
- **Brand monitoring:** compare your brand with up to 4 competitors every week or month on a schedule.
- **Dashboards and AI pipelines:** clean JSON with a ready-made summary, so no post-processing is needed.

### How to use

1. Add your **search terms**. Turn on **Compare terms** to put up to 5 terms side by side.
2. Choose a **location** (empty = worldwide, `US`, `DE`, `US-CA` …) and a **time range** (past hour up to 2004–today, or a custom range).
3. Optionally choose **YouTube, News, Images or Shopping** search, a category, and the region resolution (country, region, city, US metro).
4. Run it, then export as JSON, CSV or Excel, or connect to Google Sheets, Make, Zapier or n8n.

```json
{
  "searchTerms": ["ai agents", "chatgpt", "claude"],
  "compareTerms": false,
  "geo": "US",
  "timeRange": "today 12-m",
  "searchProperty": ""
}
```

### Reliability

Google Trends rate-limits automated access very aggressively, and many Trends scrapers fail often because of it. This Actor uses a fresh residential proxy session for every retry, with up to 6 retries per keyword. In our tests, 20 of 20 keywords succeeded in under a minute. Failed keywords are never charged.

### Pricing

Pay per event: **$0.003 per result with data** ($3 per 1,000 results). One result = one keyword, or one comparison of up to 5 keywords. Platform usage and proxy are included.

### Use with AI agents (MCP)

This Actor works as a tool for AI assistants and agents – Claude, ChatGPT, Cursor, VS Code, n8n and other MCP clients – through Apify's hosted MCP server. Add this server URL to your client:

```
https://mcp.apify.com?tools=stevenkramp/google-trends-scraper
```

Sign in with your Apify account when asked. Your agent can then call the Actor in plain language, for example: *"Is interest in 'electric cars' rising in Germany, and which related searches are breaking out?"* It gets structured JSON back, including the summary with direction and change. Runs started by your agent are normal Actor runs on your Apify account at the same pay-per-event price.

### More from stevenkramp

Other Actors by the same developer – same quality standards, pay only for results:

**Search & trends**

- [Keyword Trends Finder](https://apify.com/stevenkramp/keyword-trends-finder) – keyword ideas with trend direction
- [Google News Scraper](https://apify.com/stevenkramp/google-news-scraper) – news articles with real URLs
- [Google Images Scraper](https://apify.com/stevenkramp/google-images-scraper) – full-size image URLs
- [Google Shopping Scraper](https://apify.com/stevenkramp/google-shopping-scraper) – prices and merchants
- [Google Jobs Scraper](https://apify.com/stevenkramp/google-jobs-scraper) – job listings

**Apps**

- [Google Play Store Scraper](https://apify.com/stevenkramp/google-play-store-scraper) – Android app data and rankings
- [Google Play Reviews Scraper](https://apify.com/stevenkramp/google-play-reviews-scraper) – Play Store reviews and ratings
- [Apple App Store Scraper](https://apify.com/stevenkramp/apple-app-store-scraper) – iPhone, iPad and Mac app data
- [Shopify App Store Scraper](https://apify.com/stevenkramp/shopify-app-store-scraper) – Shopify apps and pricing plans

**Research & media**

- [arXiv Papers Scraper](https://apify.com/stevenkramp/arxiv-papers-scraper) – research papers and abstracts
- [Apple Podcasts Scraper](https://apify.com/stevenkramp/apple-podcasts-scraper) – podcasts with latest episodes

**Websites & places**

- [Website SEO Audit](https://apify.com/stevenkramp/website-seo-audit) – broken links, titles, sitemap
- [Germany Neighborhood Profile](https://apify.com/stevenkramp/germany-neighborhood-profile) – German neighborhood rents and vacancy

### FAQ

**What do the values mean?** Google Trends shows relative interest from 0 to 100. 100 is the peak in the selected period and place. The values are not absolute search counts.

**Why is the last point marked `isPartial`?** The current week or day is not finished yet. The summary ignores partial points.

**Why are related topics sometimes empty?** Google does not show related topics for every query, and never in comparisons. Related queries are usually available.

**Personal data?** None. The Actor returns aggregated, anonymous Google Trends statistics only.

**Something broken?** Open an issue in the Issues tab. Google changes Trends from time to time, and we fix scrapers quickly.

# Actor input Schema

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

Keywords or topics to analyze, e.g. "bitcoin", "ai agents". Each term becomes one result (or one comparison, see below).

## `compareTerms` (type: `boolean`):

Off: every term is analyzed on its own (values 0–100 relative to that term). On: terms are compared in groups of up to 5, like the comparison view on Google Trends (values relative to each other).

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

Empty = worldwide. Country code like US, DE, GB, IN or a region like US-CA, DE-BY.

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

Period to analyze. Hourly/daily/weekly/monthly resolution is chosen by Google depending on the period.

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

Overrides the time range above. Format: "YYYY-MM-DD YYYY-MM-DD", e.g. "2025-01-01 2025-12-31".

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

Where people searched.

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

0 = all categories. Google Trends category IDs, e.g. 7 = Finance, 5 = Computers & Electronics, 71 = Food & Drink.

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

Language for region names and related topics, e.g. en-US, de, fr.

## `includeInterestOverTime` (type: `boolean`):

Timeline with values 0–100 plus a summary (average, peak, change in %, direction).

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

Countries (worldwide) or regions/cities inside the selected country.

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

Top and rising queries, including "Breakout" searches (growth over 5000%).

## `includeRelatedTopics` (type: `boolean`):

Top and rising topics, when Google provides them for the query (not available in comparisons).

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

Automatic = countries for worldwide, regions for a country. CITY and DMA (US metro areas) give finer detail.

## `includeLowSearchVolumeRegions` (type: `boolean`):

Also list regions where Google has only little data (shown as low values).

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

How many terms are fetched at the same time.

## `maxRetries` (type: `integer`):

Google Trends rate-limits often. Each retry uses a fresh proxy session. Failed terms are not charged.

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

Residential Apify Proxy is used by default for the best success rate. Usually no change needed.

## Actor input object example

```json
{
  "searchTerms": [
    "ai agents",
    "chatgpt"
  ],
  "compareTerms": false,
  "geo": "",
  "timeRange": "today 12-m",
  "searchProperty": "",
  "category": 0,
  "language": "en-US",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "includeRelatedQueries": true,
  "includeRelatedTopics": true,
  "regionResolution": "",
  "includeLowSearchVolumeRegions": false,
  "maxConcurrency": 3,
  "maxRetries": 6,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

One item per keyword or comparison.

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

Keyword, location, time range and trend summary as a table.

# 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": [
        "ai agents",
        "chatgpt"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("stevenkramp/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": [
        "ai agents",
        "chatgpt",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("stevenkramp/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": [
    "ai agents",
    "chatgpt"
  ]
}' |
apify call stevenkramp/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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