# Google Trends Scraper (Reliable) (`uxz7/google-trends-reliable`) Actor

Google Trends data that actually arrives: interest over time, interest by region and related queries for up to 5 compared keywords, many countries and time ranges per run, plus Trending Now. Automatic session rotation and retries.

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

## Pricing

from $8.00 / 1,000 trends queries

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 (Reliable)

Get Google Trends data that actually arrives. Compare up to 5 keywords across as many countries and time ranges as you need, and get **interest over time, interest by region and related queries** in one clean result per query. Or pull today's **Trending Now** searches for any country.

Google Trends rate-limits aggressively, which is why many Trends scrapers fail on a large share of runs. This Actor is built around reliability: every blocked or rate-limited request is retried automatically on a fresh session with new cookies and a new residential IP, with exponential back-off. If one section of a query fails, you still get the others, with a clear error message instead of an empty run.

### What you get

- **Interest over time**: the 0–100 timeline Google shows, with dates, labels, partial-period flag and the average per keyword
- **Interest by region**: countries, states/regions, cities or US metro areas (DMA)
- **Related queries**: top and rising (including "Breakout") per keyword
- **Trending Now**: the current top searches Google publishes per country (typically 10 to 20), with approximate search volume and related news headlines
- A direct link to the same query on trends.google.com for every result

Works for web search, image search, news search, Google Shopping and YouTube search, any Trends category, any language.

### Typical uses

- Content and SEO planning: what is rising, where and when
- Market research and product launches: compare brands, products or features across countries
- Investing and e-commerce: seasonality and demand signals
- AI agents and dashboards: fresh trend data on demand through the API or the Apify MCP server

### Input

```json
{
    "keywords": ["chatgpt", "claude", "gemini"],
    "geos": ["US", "DE", "CH"],
    "timeRanges": ["today 12-m", "now 7-d"],
    "searchType": "web"
}
```

This runs 6 queries (1 keyword group × 3 countries × 2 time ranges). Keywords in one group share the same 0–100 scale, exactly like on the Google Trends website. More than 5 keywords are split into groups of 5, or switch off **Compare keywords** to query each keyword on its own.

Time ranges: `now 1-H`, `now 4-H`, `now 1-d`, `now 7-d`, `today 1-m`, `today 3-m`, `today 12-m`, `today 5-y`, `all`, or a custom range like `2025-01-01 2025-12-31`. Leave countries empty for worldwide.

For **Trending Now**, set the mode to "Trending now" and list the countries.

### Output

One item per query (or, with the "Timeline rows" output format, one row per date and keyword for spreadsheets and charts):

```json
{
    "type": "explore",
    "keywords": ["chatgpt", "claude"],
    "geo": "US",
    "timeRange": "today 12-m",
    "searchType": "web",
    "averages": { "chatgpt": 55, "claude": 11 },
    "interestOverTime": [
        { "date": "2025-10-26T00:00:00.000Z", "label": "Oct 26 – Nov 1, 2025", "values": { "chatgpt": 50, "claude": 10 }, "isPartial": false }
    ],
    "interestByRegion": [
        { "geoCode": "US-CA", "geoName": "California", "values": { "chatgpt": 100, "claude": 20 } }
    ],
    "relatedQueries": {
        "chatgpt": {
            "top": [{ "query": "chatgpt login", "value": 100, "formattedValue": "100" }],
            "rising": [{ "query": "chatgpt agent", "value": 6000, "formattedValue": "Breakout" }]
        }
    },
    "trendsUrl": "https://trends.google.com/trends/explore?date=today+12-m&q=chatgpt%2Cclaude&geo=US",
    "errors": []
}
```

Values are illustrative. Trends values are relative (0–100) within each query, as on the Google Trends website.

### Pricing

Pay per result: **$0.008 per successfully delivered query** (all requested sections included, up to 5 compared keywords for the price of one) and **$0.001 per Trending Now search**. Example: 3 keywords × 3 countries × 2 time ranges = 6 queries = $0.048. Queries that fail completely are not charged. Proxy costs are included in the price. Set a maximum cost per run and the Actor stops cleanly when it is reached.

### Tips

- Keep the default residential proxy for the best success rate.
- Fewer, broader runs are faster than many tiny ones; put all countries and time ranges into one run.
- Compare at most 5 keywords on one scale. For more, run several groups and include one anchor keyword in every group.

### Notes

This Actor collects aggregated, anonymous search-interest statistics. It does not collect personal data. It is not affiliated with or endorsed by Google.

# Actor input Schema

## `mode` (type: `string`):

Explore keywords (interest over time, by region, related searches) or get the current Trending Now searches per country.

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

Search terms to analyse. Up to 5 are compared on the same scale; more keywords are split into groups of 5.

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

On: keywords are compared in groups of up to 5 (shared 0-100 scale). Off: every keyword is queried on its own.

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

ISO codes like US, CH, DE or regions like US-CA. Leave empty for worldwide. Every country is a separate query.

## `timeRanges` (type: `array`):

One or more of: now 1-H, now 4-H, now 1-d, now 7-d, today 1-m, today 3-m, today 12-m, today 5-y, all, or a custom range like "2025-01-01 2025-12-31". Default: today 12-m.

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

Which Google property to analyse.

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

Optional Google Trends category ID (0 = all categories).

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

Timeline of search interest (0-100).

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

Search interest per country, region or city.

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

Auto picks countries for worldwide queries, regions for a country and cities for a region.

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

Top and rising related search queries per keyword.

## `outputFormat` (type: `string`):

One rich item per query, or one row per date and keyword (best for spreadsheets and charts).

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

Language for topic names and labels, e.g. en-US, de, fr.

## `timezoneOffset` (type: `integer`):

Offset from UTC in minutes as Google expects it (e.g. -60 for Central European Time, 300 for New York). Default 0 = UTC.

## `maxQueries` (type: `integer`):

Upper limit for keyword groups x countries x time ranges in one run.

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

How often a blocked or rate-limited request is retried with a fresh session.

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

Residential proxies give the most reliable results with Google Trends.

## Actor input object example

```json
{
  "mode": "explore",
  "keywords": [
    "chatgpt",
    "claude",
    "gemini"
  ],
  "compareKeywords": true,
  "geos": [
    "US"
  ],
  "timeRanges": [
    "today 12-m"
  ],
  "searchType": "web",
  "category": 0,
  "interestOverTime": true,
  "interestByRegion": true,
  "regionResolution": "auto",
  "relatedQueries": true,
  "outputFormat": "items",
  "language": "en-US",
  "timezoneOffset": 0,
  "maxQueries": 100,
  "maxRetries": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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": [
        "chatgpt",
        "claude",
        "gemini"
    ],
    "geos": [
        "US"
    ],
    "timeRanges": [
        "today 12-m"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("uxz7/google-trends-reliable").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": [
        "chatgpt",
        "claude",
        "gemini",
    ],
    "geos": ["US"],
    "timeRanges": ["today 12-m"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("uxz7/google-trends-reliable").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": [
    "chatgpt",
    "claude",
    "gemini"
  ],
  "geos": [
    "US"
  ],
  "timeRanges": [
    "today 12-m"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call uxz7/google-trends-reliable --silent --output-dataset

```

## MCP server setup

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

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/RYe0wJd0w5aB5EpJZ/builds/CTJHvXF5Qam1PgOTT/openapi.json
