# Google Trends Scraper - Reliable, No Browser (`gzeff/google-trends-reliable`) Actor

Google Trends data by API in seconds: interest over time, by region, related queries and topics, up to 5 keywords compared. No browser, bounded retries, a clear status for every section. Pay per result.

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

## Pricing

from $1.00 / 1,000 result rows

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, no browser

Get Google Trends data through an API: interest over time, interest by region, related queries and related topics, for one keyword or for up to 5 keywords compared together.

**A pytrends alternative that works in 2026.** pytrends was archived in April 2025 and the official Google Trends API is still limited-access alpha. This Actor gives you the same data as the Google Trends website, as JSON, CSV or Excel, from the Apify API, Python, JavaScript, Make, n8n, Zapier or an AI agent (MCP).

### Why this Actor

Runs either return data or fail with a clear reason. They don't spin for minutes and return nothing.

- **No browser.** Each keyword takes about five lightweight HTTP requests, spaced at least two seconds apart. In a test on October 21, 2026, three keywords with all four sections returned 462 rows in 33 seconds.
- **Plays by Google's rules.** It never loads pages that Google's robots.txt disallows, and it never rotates IPs or sessions to get around a block. If Google answers 429 (too many requests), it slows down (honoring `Retry-After`, otherwise pausing about 30 seconds) and retries at most twice. If Google answers 403 or keeps answering 429, the run stops and tells you to try again later.
- **Bounded time.** Server errors are retried with exponential backoff. Each keyword group has a 150-second budget covering all its requests and retries. When the budget runs out, the affected sections are reported as errors.
- **A status for every section.** Each keyword group and section gets a status (`ok`, `empty` or `error`, with the reason) in the run's key-value store under the key `STATUS`, so an empty result is never ambiguous. A keyword with no Google Trends data is reported as `empty`, not as a failed run.
- **Flat output.** The dataset holds only data rows, one per data point, ready for CSV, Google Sheets or a database.
- **You pay only for rows you get.** $1.00 per 1,000 data rows. Status records and failed sections are never charged.

### What you can use it for

- **SEO and content planning:** find rising queries ("Breakout") around a topic before competitors write about it.
- **Product and market research:** compare brands or products over 5 years, by country or region.
- **Seasonality:** pull weekly interest for a keyword list and feed it to a forecasting model.
- **Dashboards and alerts:** schedule the Actor daily and push the dataset to Google Sheets, Slack or a database.

### Input

| Field | Description | Default |
|---|---|---|
| `searchTerms` | Keywords to analyse | — |
| `geo` | Country or region code (`US`, `FR`, `FR-J`); empty = worldwide | empty |
| `timeRange` | `now 7-d`, `today 1-m`, `today 3-m`, `today 12-m`, `today 5-y`, `all`… | `today 12-m` |
| `sections` | Any of `interest_over_time`, `interest_by_region`, `related_queries`, `related_topics` | all |
| `compareKeywords` | Compare keywords together (groups of 5, values on one shared scale) | `false` |
| `category`, `property` | Google Trends category ID; web, images, news, YouTube or Shopping search | `0`, web |
| `hl` | Interface language of the labels (dates, topic names) | `en-US` |
| `maxAttempts` | Attempts per request before giving up | `5` |
| `proxyConfiguration` | Apify Proxy settings; one session is used for the whole run | Apify Proxy |

### Output examples

```json
{"type": "interest_over_time", "keyword": "coffee", "geo": "FR", "timestamp": 1760832000, "date": "Oct 19 – 25, 2025", "value": 26, "hasData": true, "isPartial": false}
{"type": "related_queries", "keyword": "coffee", "metric": "rising", "rank": 1, "query": "coffee crush krups", "value": 79600, "formattedValue": "Breakout", "isBreakout": true}
```

Status (key-value store, key `STATUS`):

```json
[{"keywords": ["coffee"], "section": "related_topics", "status": "empty", "rows": 0, "error": null}]
```

Google Trends values are relative (0–100 within the request), not search volumes.

### Call it from Python

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("gzeff/google-trends-reliable").call(run_input={
    "searchTerms": ["coffee", "tea"],
    "geo": "US",
    "timeRange": "today 12-m",
    "sections": ["interest_over_time", "related_queries"],
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["type"], row["keyword"], row.get("date") or row.get("query"), row["value"])
```

### FAQ

**How much does a typical run cost?** One keyword with all four sections returns roughly 100 to 400 rows, so about $0.10 to $0.40. Use `sections` to request only what you need.

**Why did a section come back empty?** Google Trends has no data for that keyword, place or period (common for rare keywords or small regions). The `STATUS` record says `empty`, and you are not charged.

**Why is `related_topics` almost always empty?** Since at least October 2026, Google's own endpoint returns an empty list for related topics, even in a regular browser. The section is kept in case Google restores it. It costs nothing when empty, and you can leave it out of `sections`.

**What happens if Google rate-limits the run?** The run stops instead of trying to get around the limit. Keyword groups that were not processed are listed as `skipped` in `STATUS`. Rows already collected are kept, and only those are charged.

**Can I compare more than 5 keywords?** This Actor compares at most 5 keywords per request, like the classic Google Trends Explore view. With `compareKeywords` on, longer lists are split into groups of 5. Values are comparable within a group, not across groups.

### Limits

- Google may rate-limit any automated client. This Actor respects those limits: it slows down, then stops and reports it. It cannot guarantee results for every request.
- For large-scale production use, consider applying to Google's official Trends API (alpha).
- This is an unofficial tool. It is not affiliated with Google.
- Questions and feature requests: open an issue on this Actor.

# Actor input Schema

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

One or more keywords. Each keyword is processed separately unless "Compare keywords together" is on.

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

Country or region code. Empty = worldwide. Examples: US, FR, FR-J.

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

Period covered by the data.

## `sections` (type: `array`):

Which Google Trends sections to extract.

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

Compare up to 5 keywords on one shared 0-100 scale, as on the Google Trends website.

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

Google Trends category ID. 0 = all categories.

## `property` (type: `string`):

Which Google search property to analyse.

## `hl` (type: `string`):

Language of labels such as dates and topic names.

## `maxAttempts` (type: `integer`):

How many times a request is retried after network or server errors. Rate-limit answers (429) are retried at most twice, then the run stops.

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

Apify Proxy settings. One proxy session is used for the whole run; the Actor never switches IPs to get around a block.

## Actor input object example

```json
{
  "searchTerms": [
    "coffee"
  ],
  "geo": "",
  "timeRange": "today 12-m",
  "sections": [
    "interest_over_time",
    "interest_by_region",
    "related_queries",
    "related_topics"
  ],
  "compareKeywords": false,
  "category": 0,
  "property": "",
  "hl": "en-US",
  "maxAttempts": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (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 = {
    "searchTerms": [
        "coffee"
    ]
};

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

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

```

## MCP server setup

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