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

Google Trends data for any keyword: interest over time, interest by country, region, city or US metro, and top and rising related searches. Compare up to 5 keywords, or check YouTube, News, Images and Shopping trends. Fast, no browser.

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

## Pricing

$1.50 / 1,000 searches

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 as clean data](https://gat-assets.pages.dev/trends/hero.png)

## Google Trends Scraper

Get [Google Trends](https://trends.google.com) data for any keyword as clean JSON, CSV or Excel: **interest over time**, **interest by country, state, city or US metro area**, and **top and rising related searches**. Compare up to 5 keywords on the same scale, and look at **YouTube, News, Images and Google Shopping** search trends too.

No browser, no login. Fast and reliable: ~130 keywords in under 3 minutes. **$1.50 per 1,000 searches.**

### ✨ Why this scraper?

| Feature | What you get |
| :--- | :--- |
| ⚡ **Fast and reliable** | Reads Google Trends' own data endpoints — no browser that times out |
| 📈 **Interest over time** | Every point of the chart, hourly to monthly, with the partial last point flagged |
| ⚖️ **Compare up to 5 keywords** | `coffee, tea, matcha` on one line → one result, all on the same 0–100 scale |
| 🗺️ **Four region levels** | Countries, states/regions, **cities** (with coordinates) or **US metro areas (DMA)** |
| 🚀 **Rising searches** | Top and rising related searches, including "Breakout" terms |
| ▶️ **Five search types** | Web, YouTube, News, Images, Google Shopping |
| 🔗 **Paste a Trends URL** | Copy any Google Trends explore link; its country, dates and filters are kept |
| 💰 **Simple price** | $1.50 per 1,000 searches, platform usage and proxy included |

### 🎯 Use cases

- **SEO and content planning** — find rising searches before your competitors write about them.
- **Product and e-commerce research** — use Google Shopping trends to time launches and stock.
- **Market sizing by region** — see which states, cities or metro areas care most.
- **Brand monitoring** — compare your brand against competitors every week.
- **Data science and dashboards** — feed clean time series into notebooks, BI tools or forecasting models.
- **AI agents** — call it through the Apify MCP server: *"Is matcha still growing in the US?"*

### 🚀 How to use

1. Add **keywords**, one search per line. Put several on one line with commas to compare them: `coffee, tea, matcha`.
2. Optional: choose **country or region**, **time range**, **search type** and **region level**.
3. Click **Start**. Download the results or pull them via API.

```json
{
  "searchTerms": ["coffee, tea, matcha", "air fryer"],
  "geo": "US",
  "timeRange": "today 5-y",
  "searchType": "web",
  "regionResolution": "DMA"
}
```

| Input | What it does |
| :--- | :--- |
| `searchTerms` | One search per line. Commas compare up to 5 keywords. Google Trends explore URLs work too. |
| `geo` | Empty for worldwide, a country (`US`, `DE`, `TW`) or a region (`US-CA`, `GB-ENG`). |
| `timeRange` | Past hour, 4 hours, day, 7 days, 30 days, 90 days, 12 months, 5 years, or since 2004. |
| `customTimeRange` | Your own dates: `2025-01-01 2025-06-30`. |
| `searchType` | `web`, `youtube`, `news`, `images` or `shopping`. |
| `category` | Google Trends category ID, e.g. `71` Food & Drink. `0` = all. |
| `regionResolution` | `default` (countries or states), `CITY` or `DMA` (US metro areas). |
| `includeRegions`, `includeRelatedQueries` | Turn sections off for a smaller output. |

### 📦 Output

One item per search line. Real example (shortened):

```json
{
  "searchTerms": ["apple"],
  "geo": "Worldwide",
  "timeRange": "today 12-m",
  "searchType": "web",
  "trendsUrl": "https://trends.google.com/trends/explore?q=apple&date=today+12-m&hl=en-US",
  "interestOverTime": [
    { "date": "2025-10-19", "timestamp": 1760832000, "isPartial": false, "apple": 67 },
    { "date": "2025-10-26", "timestamp": 1761436800, "isPartial": false, "apple": 63 }
  ],
  "averageInterest": { "apple": 70 },
  "interestByRegion": [
    { "geoName": "Singapore", "geoCode": "SG", "apple": 100 },
    { "geoName": "United States", "geoCode": "US", "apple": 90 }
  ],
  "relatedQueries": [
    { "keyword": "apple", "type": "top", "query": "apple watch", "value": 100, "formattedValue": "100" },
    { "keyword": "apple", "type": "rising", "query": "apple iphone 17e", "value": 5950, "formattedValue": "Breakout" }
  ],
  "noData": false,
  "query": "apple"
}
```

| Field | Description |
| :--- | :--- |
| `interestOverTime` | One row per point; one column per keyword (0–100). `isPartial` marks the unfinished last period. |
| `averageInterest` | Average per keyword over the range. |
| `interestByRegion` | One row per region with a column per keyword; cities include `latitude` / `longitude`. |
| `regionComparison` | When comparing keywords: each keyword's share of searches in each region (adds up to 100). |
| `relatedQueries` | `top` and `rising` related searches per keyword. Rising `value` is the % increase; "Breakout" means more than +5000%. |
| `noData` | `true` when Google has too little search volume for this search. |
| `trendsUrl` | Opens the same chart on Google Trends. |

> Google Trends values are relative (0–100), not absolute search counts. Comparing keywords on one line puts them on the same scale; separate lines are each scaled on their own.

### 💰 How much does it cost?

You pay **$0.0015 per search line** ($1.50 per 1,000), whether it has one keyword or five. Platform usage and proxy are included.

| Searches | Cost |
| :--- | ---: |
| 100 | $0.15 |
| 1,000 | $1.50 |
| 10,000 | $15.00 |

Apify's free plan includes $5 of monthly credit — enough for about 3,300 searches.

### 🔁 Tracking trends over time

Schedule the Actor weekly (Apify **Schedules**) with the same keywords and watch `relatedQueries` with `type: "rising"` for new terms. Use `customTimeRange` to fetch the same historical window every time.

### 🔌 Integrations

- **API / SDKs** — start runs and fetch results from Python, JavaScript or any HTTP client.
- **Zapier, Make, n8n, Google Sheets, Slack** — via Apify integrations.
- **MCP** — add the [Apify MCP server](https://mcp.apify.com) to Claude, Cursor or any MCP client and call this Actor as a tool.

### ❓ FAQ

**Why are the numbers 0–100 and not search volumes?**
That is how Google Trends works: 100 is the peak popularity within your chosen keywords, place and time range.

**Why does the same keyword give different numbers in two runs?**
Google Trends samples its data, so small differences between requests are normal, especially for low-volume keywords.

**Where are related topics?**
Google Trends no longer returns related topics through its data endpoints, so this Actor returns related searches only.

**Can I export to CSV or Excel?**
Yes — every Apify dataset downloads as JSON, CSV, Excel, XML or HTML.

### ⚖️ Is this legal?

Google Trends is a public tool. This Actor reads the same public data the Google Trends website shows and does not log in. You are responsible for how you use the data; check the rules that apply to you.

### 💬 Need help?

Open an issue on the **Issues** tab — feature requests welcome.

# Actor input Schema

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

One search per line. Separate up to 5 keywords with commas to compare them on the same scale. You can also paste a Google Trends explore URL; it keeps its own country, dates and filters.

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

Leave empty for worldwide. Two-letter country code (US, GB, DE, TW…) or a region code like US-CA or GB-ENG.

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

Period to look at. Short ranges give hourly or minute data; long ranges give weekly or monthly data.

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

Optional. Two dates, YYYY-MM-DD YYYY-MM-DD (e.g. 2025-01-01 2025-06-30). Overrides Time range.

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

Which Google search to measure: web, YouTube, News, Images or Shopping.

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

Google Trends category, e.g. 71 Food & Drink, 7 Finance, 12 Business & Industrial. 0 = all categories.

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

Add the breakdown by country (worldwide) or by state/region (inside a country).

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

Level of the region breakdown. US metro areas (DMA) only work when the country is US.

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

Add the top and rising related searches for each keyword.

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

Language for region names, e.g. en-US, de, ja, zh-TW.

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

Apify datacenter proxy works well and is included in the price. If you see many retries in the log, switch to Residential.

## Actor input object example

```json
{
  "searchTerms": [
    "coffee",
    "coffee, tea, matcha"
  ],
  "geo": "",
  "timeRange": "today 12-m",
  "searchType": "web",
  "category": 0,
  "includeRegions": true,
  "regionResolution": "default",
  "includeRelatedQueries": true,
  "language": "en-US",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

One item per search: interest over time, average interest, interest by region and related 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": [
        "coffee",
        "coffee, tea, matcha"
    ]
};

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

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

```

## MCP server setup

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