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

Scrape Google Trends by search term: interest over time, interest by region, related queries and related topics. One result per search term.

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

## Pricing

from $1.60 / 1,000 search terms

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

Scrape [Google Trends](https://trends.google.com) by search term. One result per search term: interest over time, interest by region, and top and rising related queries. $2 per 1,000 search terms on the Free plan, less on paid plans.

### What you get

| Field | Type | Description |
| --- | --- | --- |
| `search_term` | string | Search term as given in the input |
| `geo` | string | Location code used, empty for worldwide |
| `time_range` | string | Time range used, for example `today 12-m` |
| `average_interest` | integer | Mean of interest over time, 0 to 100 |
| `interest_over_time` | array | One object per period: `date` (UTC, ISO 8601), `value` (0 to 100), `is_partial` (true for the unfinished last period) |
| `interest_by_region` | array | One object per sub-region: `geo_code`, `geo_name`, `value` (0 to 100) |
| `related_queries_top` | array | Top related queries: `query`, `value` (0 to 100) |
| `related_queries_rising` | array | Rising related queries: `query`, `value`, `growth` (for example `+250%` or `Breakout`) |
| `trends_url` | string | Google Trends page showing the same data |
| `scraped_at` | string | UTC time the search term was scraped, ISO 8601 |

### Input

- `searchTerms`: keywords to look up. One result per search term.
- `geo`: two-letter country code such as `US`, or a region code such as `US-CA`. Empty means worldwide.
- `timeRange`: one of `now 1-H`, `now 4-H`, `now 1-d`, `now 7-d`, `today 1-m`, `today 3-m`, `today 12-m` (default), `today 5-y`, `all`.
- `proxyConfiguration`: fallback proxy, Apify datacenter by default. Each search term is tried directly first and goes through the proxy only after 3 failed attempts.

```json
{
  "searchTerms": ["bitcoin", "electric car"],
  "geo": "US",
  "timeRange": "today 12-m"
}
```

### Example output

```json
{
  "search_term": "bitcoin",
  "geo": "US",
  "time_range": "today 12-m",
  "average_interest": 44,
  "interest_over_time": [
    { "date": "2025-10-12T00:00+00:00", "value": 41, "is_partial": false },
    { "date": "2025-10-19T00:00+00:00", "value": 38, "is_partial": false }
  ],
  "interest_by_region": [
    { "geo_code": "US-WY", "geo_name": "Wyoming", "value": 100 },
    { "geo_code": "US-NV", "geo_name": "Nevada", "value": 93 }
  ],
  "related_queries_top": [
    { "query": "bitcoin price", "value": 100 }
  ],
  "related_queries_rising": [
    { "query": "bitcoin etf", "value": 250, "growth": "+250%" }
  ],
  "trends_url": "https://trends.google.com/trends/explore?q=bitcoin&date=today+12-m&geo=US",
  "scraped_at": "2026-10-12T18:39:13+00:00"
}
```

The example is shortened: a 12-month range returns 52 or 53 periods, and related queries return up to 25 rows each.

### Pricing

Pay per result: one `search-term` event per search term saved. A search term for which Google Trends has no data is skipped and not charged. The run stops cleanly when your maximum charge per run is reached.

### Limitations

- Values are Google's relative index (0 to 100) within one search term, location and time range. They are not search volumes, and values from two different search terms cannot be compared with each other.
- Each search term is looked up on its own. Comparing several terms in one chart is not supported.
- Related topics are not included, because Google Trends currently returns them empty.
- Google rate-limits related queries and regions more strictly than interest over time. If they are still blocked on the last attempt, the search term is saved with those arrays empty and a warning in the log.
- Google rate-limits heavy use. The Actor retries each search term up to 6 times and stops the run if 3 search terms fail in a row, so a blocked run does not keep running.
- No personal data.

### For AI agents

Minimal input:

```json
{ "searchTerms": ["bitcoin"] }
```

Each dataset item is one search term with the fields listed under "What you get". `interest_over_time[].value` and `average_interest` are integers from 0 to 100.

# Actor input Schema

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

Keywords to look up on Google Trends. One result per search term. Example: bitcoin.

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

Two-letter country code, or a region code such as US-CA. Leave empty for worldwide. Example: US.

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

Period covered by interest over time. Example: today 12-m for the past 12 months.

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

Fallback proxy. Each search term is first tried directly; if that fails 3 times, 3 more attempts go through this proxy, each from a different IP.

## Actor input object example

```json
{
  "searchTerms": [
    "bitcoin"
  ],
  "geo": "US",
  "timeRange": "today 12-m",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Interest over time, interest by region, related queries and related topics for each search term.

# 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": [
        "bitcoin"
    ],
    "geo": "US",
    "timeRange": "today 12-m",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("distinct_readjustment/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": ["bitcoin"],
    "geo": "US",
    "timeRange": "today 12-m",
    "proxyConfiguration": { "useApifyProxy": True },
}

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

```

## MCP server setup

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