# Google Trends Explorer - Fast API, Compare and Regions (`devcolton/google-trends-explorer`) Actor

Fast Google Trends API: interest over time, interest by region (countries, states, US metros, cities) and related queries for any keyword. Compare up to 5 keywords on one scale. No browser, automatic retries.

- **URL**: https://apify.com/devcolton/google-trends-explorer.md
- **Developed by:** [Colton](https://apify.com/devcolton) (community)
- **Categories:** SEO tools, Developer tools
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 keyword 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 Explorer — fast Google Trends API

**Google Trends Explorer** gets Google Trends data for any keyword: **interest over time**, **interest by region** (countries, states, US metro areas, cities) and **related queries** (top and rising). It works in seconds, without a browser. Type your keywords, click **Start**, and download the results as JSON, CSV or Excel.

### What can this Actor do?

- 📈 **Interest over time** for any time range: past hour, 7 days, 12 months, 5 years, 2004–today, or your own dates.
- 🗺️ **Interest by region** at country, state, **US metro (DMA)** or city level.
- 🔎 **Related queries**, top and rising, including "Breakout" terms.
- ⚖️ **Compare up to 5 keywords on one scale**, exactly like the compare box on Google Trends.
- 🎯 **All Google Trends filters:** location, category, and search type (Web, Images, News, Shopping, YouTube).
- ⚡ **Fast and reliable:** about 5 seconds per keyword, with automatic retries on fresh proxies when Google rate-limits.

### What data can I get?

| Field | Description |
|---|---|
| `keyword`, `geo`, `timeRange`, `searchType` | What was searched |
| `interestOverTime` | List of `{date, value, isPartial}`, relative interest 0–100 |
| `averageInterest`, `peak` | Average interest and the highest point |
| `interestByRegion` | List of `{geoCode, geoName, value}` |
| `regionSearchShare` | Compare mode: each region's split of searches between the keywords |
| `relatedQueries` | `{top, rising}` related searches |
| `comparedWith` | Other keywords in the same comparison |

### How to use Google Trends Explorer

1. Click **Try for free** and sign in (new Apify accounts get free monthly credit).
2. Enter one or more **keywords**.
3. Optional: pick **locations** (e.g. `US`, `GB`, `US-TX`), a **time range**, and turn on **Compare keywords on one scale**.
4. Click **Start**. Most runs finish in under a minute.
5. Open the **Output** tab and download the data, or use it through the API, Google Sheets, Zapier or Make.

### Input example

```json
{
  "keywords": ["chatgpt", "gemini", "claude ai"],
  "compareKeywords": true,
  "geos": ["US"],
  "timeRange": "today 12-m",
  "regionResolution": "REGION"
}
```

### Output example

```json
{
  "keyword": "coffee",
  "geo": "US",
  "timeRange": "today 5-y",
  "searchType": "web",
  "averageInterest": 57.63,
  "peak": { "date": "Apr 12, 2026", "value": 100 },
  "interestOverTime": [
    { "date": "Oct 18, 2026", "value": 69, "isPartial": false },
    { "date": "Oct 25, 2026", "value": 89, "isPartial": true }
  ],
  "interestByRegion": [
    { "geoCode": "759", "geoName": "Cheyenne WY-Scottsbluff NE", "value": 100 },
    { "geoCode": "606", "geoName": "Dothan AL", "value": 74 }
  ],
  "relatedQueries": {
    "top": [ { "query": "coffee near me", "value": 100 }, { "query": "coffee shop", "value": 79 } ],
    "rising": [ { "query": "ryze coffee", "formattedValue": "Breakout" } ]
  }
}
```

### How much does it cost?

You pay only for results: **$0.002 per keyword result**, or **$2 per 1,000**. That includes everything you turned on for that keyword (timeline, regions, related queries). There's no start fee, and proxies are included. Apify's free monthly credit covers hundreds of keywords.

### Tips and limits

- **Values are relative (0–100)**, exactly as on Google Trends, not absolute search volumes.
- **Comparing keywords:** turn on *Compare keywords on one scale*. Otherwise each keyword is scaled 0–100 on its own.
- **Related topics:** Google currently returns related *topics* only to its own website, so this list is usually empty. Related *queries* are always included.
- **Data sampling:** Google Trends samples its data, so very small keywords can vary slightly between runs, just like on the website.

### Other Actors by DevColton

| Actor | What it does |
|---|---|
| [iStock & Getty Images Scraper](https://apify.com/DevColton/istock-getty-images-scraper) | Stock photo search results and keyword research |
| [Dreamstime Scraper](https://apify.com/DevColton/dreamstime-scraper) | Stock images with download counts, keywords and best sellers |
| [Seek, Jobstreet & JobsDB Jobs Scraper](https://apify.com/DevColton/seek-jobstreet-jobsdb-scraper) | Jobs from 8 Asia-Pacific countries with salaries and applicant counts |
| [Envato Market Scraper](https://apify.com/DevColton/envato-market-scraper) | ThemeForest and CodeCanyon items with sales, prices and ratings |
| [Tori, FINN, Blocket & DBA Scraper](https://apify.com/DevColton/tori-finn-blocket-dba-scraper) | Second-hand listings from Finland, Norway, Sweden and Denmark |
| [IKEA Products & Prices Scraper](https://apify.com/DevColton/ikea-products-prices-scraper) | IKEA prices in 41 countries, compared in USD |
| [idealo Scraper](https://apify.com/DevColton/idealo-price-comparison-scraper) | Prices and every shop's offer on idealo.de and idealo.at |
| [Career Site Jobs Scraper](https://apify.com/DevColton/ats-career-sites-jobs-scraper) | Jobs from Greenhouse, Lever, Ashby, Workday and SmartRecruiters career pages |
| [Bayt Jobs Scraper](https://apify.com/DevColton/bayt-jobs-scraper) | Jobs in the UAE, Saudi Arabia, Qatar and the Middle East |

### FAQ

#### Is it legal to scrape this data?

This Actor collects only publicly available data that anyone can see in a browser without logging in. It doesn't access accounts or private data. You're responsible for how you use the data: check the website's terms and the laws that apply to you, especially if you store personal information.

#### Can I use it with the API, Python, Google Sheets or Zapier?

Yes. You can start runs and fetch results through the [Apify API](https://docs.apify.com/api/v2) or the official [Python](https://docs.apify.com/api/client/python) and [JavaScript](https://docs.apify.com/api/client/js) clients, and send results to Google Sheets, Zapier, Make, n8n or a webhook.

#### Can I run it on a schedule?

Yes. In Apify Console, open **Schedules** to run it hourly, daily or weekly, and get the new data automatically.

#### Something isn't working, or I need a feature

Open an issue in the **Issues** tab. Issues get a quick reply, and feature requests are welcome. Custom scraping work is also possible; mention it in an issue.

# Actor input Schema

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

Search terms to look up, one per line (e.g. 'coffee', 'chatgpt'). Each keyword becomes one result row per location, unless you compare them.

## `compareKeywords` (type: `boolean`):

Query keywords together in groups of up to 5, exactly like typing them into Google Trends' compare box, so their values are directly comparable (0-100 relative to the group's peak).

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

Country or region codes, e.g. US, GB, US-TX. Leave empty for worldwide. Each keyword is fetched for each location.

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

Period to analyze. Ignored when a custom time range is set.

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

Overrides Time range. Format: YYYY-MM-DD YYYY-MM-DD

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

Which Google search the interest refers to: Web (default), Images, News, Google Shopping or YouTube.

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

Optional Google Trends category ID to narrow ambiguous keywords (e.g. 71 = Food & Drink). 0 = all categories.

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

How detailed the interest-by-region breakdown is. Metro areas (DMA) work for the US; cities work for most countries.

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

Timeline of relative interest (0-100).

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

Relative interest per country, state, metro area or city.

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

Queries people also searched for, top and rising.

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

Topics people also searched for, top and rising (Google sometimes withholds these; returned empty when it does).

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

Language code for labels, e.g. en-US, de, ja.

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

How many times to retry with a fresh proxy session when Google rate-limits.

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

Proxies are included in the price. Keep Apify Proxy on: Google rate-limits single IPs quickly.

## Actor input object example

```json
{
  "keywords": [
    "bitcoin",
    "ethereum"
  ],
  "compareKeywords": false,
  "geos": [],
  "timeRange": "today 12-m",
  "searchType": "",
  "category": 0,
  "regionResolution": "",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "includeRelatedQueries": true,
  "includeRelatedTopics": true,
  "language": "en-US",
  "maxRetries": 6,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

All results in the default dataset (overview 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 = {
    "keywords": [
        "bitcoin",
        "ethereum"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("devcolton/google-trends-explorer").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": [
        "bitcoin",
        "ethereum",
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("devcolton/google-trends-explorer").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": [
    "bitcoin",
    "ethereum"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call devcolton/google-trends-explorer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,devcolton/google-trends-explorer"
        }
    }
}
```

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/dP2rJg5IHgVDAIKN8/builds/sYktsIQ7l1ZBHzgBq/openapi.json
