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

Google Trends data for up to 100 keywords per run: interest over time, interest by region, and top and rising related queries, for any country or worldwide. Rotates IPs when Google rate-limits. $2 per 1,000 keywords, and keywords with no data are free.

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

## Pricing

from $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 Scraper

Pull Google Trends data for a list of keywords: interest over time, interest by region, and the top and rising related searches. It's the same data trends.google.com shows, for any country, region or worldwide, and it downloads as JSON, CSV or Excel or comes through the Apify API.

Google rate-limits Trends requests quickly, and that's where the scrapers I tried before building this one kept failing. This one keeps a small pool of IPs, each with its own Google session. When Google answers "too many requests", it drops that IP and retries on a fresh one, and if that keeps happening it switches to residential IPs by itself. A 50-keyword run on 26 September took 58 seconds and every keyword came back.

### What you get for each keyword

- Interest over time: one value from 0 to 100 per day, week or month, depending on the time range
- The average interest over the whole period
- Interest by region: countries, states, cities or US metro areas, sorted from highest to lowest
- Top related queries and rising related queries, with growth such as +350% or Breakout
- A link to the same view on Google Trends, so you can check any number yourself

Every result also carries a status. Keywords that Google has no data for come back as `no_data` and cost nothing.

### Input

```json
{
    "keywords": ["mortgage rates", "home insurance", "solar panels"],
    "geo": "US",
    "timeframe": "today 12-m",
    "compareKeywords": false
}
```

- `keywords`: up to 100 per run.
- `geo`: a country code like US, GB or DE, a region like US-CA, or empty for worldwide.
- `timeframe`: past hour, 4 hours, day, 7 days, 30 days, 90 days, 12 months, 5 years, or everything since 2004. `customTimeRange` takes exact dates, for example `2024-01-01 2024-12-31`.
- `compareKeywords`: off gives each keyword its own 0 to 100 scale. On puts up to 5 keywords on one scale, which is Google's limit, so you can say one is searched twice as much as another. More than 5 keywords are split into groups of 5.
- `searchType` switches between web, image, news, YouTube and Google Shopping searches, and `category` narrows the results to one Google Trends category.
- `language` sets the language of region names and queries, for example `de` for German names.

### Output

One dataset item per keyword. Here is a real one, trimmed:

```json
{
    "keyword": "chatgpt",
    "status": "ok",
    "geo": "US",
    "timeframe": "today 12-m",
    "averageInterest": 79,
    "interestOverTime": [
        { "date": "2026-09-13T00:00:00.000Z", "value": 78, "isPartial": false },
        { "date": "2026-09-20T00:00:00.000Z", "value": 75, "isPartial": true }
    ],
    "interestByRegion": [
        { "geoCode": "US-CA", "geoName": "California", "value": 100 },
        { "geoCode": "US-DC", "geoName": "District of Columbia", "value": 94 }
    ],
    "relatedQueriesTop": [{ "query": "what is chatgpt", "value": 100, "formattedValue": "100" }],
    "relatedQueriesRising": [{ "query": "chatgpt caricature", "value": 3350, "formattedValue": "+3,350%" }],
    "trendsUrl": "https://trends.google.com/trends/explore?date=today+12-m&q=chatgpt&geo=US"
}
```

The dataset has four views. Overview has one row per keyword. Interest over time, Interest by region and Rising queries have one row per data point, which is the shape you want for a chart or a spreadsheet.

### Pricing

You pay $0.002 for each keyword that returns data, so 50 keywords cost $0.10. Keywords with no data are free, and Apify adds its standard $0.00005 per run for starting the Actor. You can set a maximum charge per run in the run options, and the Actor stops cleanly when it reaches it instead of failing.

### Limits

- The numbers are Google's relative interest from 0 to 100, not search volumes.
- Related topics are not included. The Google endpoint this Actor reads returns an empty list for them.
- Keywords with very little search volume, or small regions, often have no data at all. That's Google's answer, not an error, and those keywords are free.
- The Google SERP proxy doesn't work for Google Trends, so the Actor refuses it. The default Apify proxy is the right choice for almost everyone.
- Up to 100 keywords per run. For more, start several runs or a schedule.

### Changelog

- 2026-09-26: first version.

# Actor input Schema

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

Search terms to look up, one per line. Up to 100 per run.

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

Country code (US, GB, DE), a region such as US-CA, or empty for worldwide.

## `timeframe` (type: `string`):

Period to look at. Ignored when a custom range is set.

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

Off: each keyword gets its own 0 to 100 scale. On: keywords are compared in groups of up to 5 (Google's limit), so values within a group are comparable.

## `interestOverTime` (type: `boolean`):

Search interest per day, week or month, 0 to 100.

## `interestByRegion` (type: `boolean`):

Search interest per country, region or city.

## `relatedQueries` (type: `boolean`):

Top and rising searches connected to the keyword.

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

Start and end date, for example 2024-01-01 2024-12-31. Overrides the time range above.

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

Which Google search to measure.

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

Google Trends category ID, 0 for all categories. The ID is the cat= value in a Google Trends URL.

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

Level of detail for interest by region.

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

Language for region and topic names, such as en, de or es.

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

Google limits how often one IP can ask for Trends data. The Actor switches IPs and retries when that happens.

## Actor input object example

```json
{
  "keywords": [
    "iphone",
    "samsung galaxy"
  ],
  "geo": "US",
  "timeframe": "today 12-m",
  "compareKeywords": false,
  "interestOverTime": true,
  "interestByRegion": true,
  "relatedQueries": true,
  "searchType": "web",
  "category": 0,
  "regionResolution": "auto",
  "language": "en",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (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": [
        "iphone",
        "samsung galaxy"
    ],
    "geo": "US",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("dektionstudio/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": [
        "iphone",
        "samsung galaxy",
    ],
    "geo": "US",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("dektionstudio/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": [
    "iphone",
    "samsung galaxy"
  ],
  "geo": "US",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call dektionstudio/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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