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

Interest over time, interest by region, related queries (top + rising) and Trending Now from Google Trends. Built for reliability with automatic retries and fresh sessions.

- **URL**: https://apify.com/fetchwelldata/google-trends-reliable.md
- **Developed by:** [Fetchwell Data](https://apify.com/fetchwelldata) (community)
- **Categories:** SEO tools, Marketing, AI
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.50 / 1,000 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

Get **interest over time, interest by region, related queries (top and rising) and Trending Now** from Google Trends. It works for any keyword, country and time range, and the results are ready for spreadsheets, dashboards or AI agents.

### Why this scraper

- **Built to finish runs.** Google Trends rate-limits hard. Every request gets a fresh session and proxy IP, with smart back-off, so a rate limit triggers a retry instead of failing the run.
- **One clean result per keyword.** Each keyword's full timeline, region list or related-query list comes back as a single dataset item, so you aren't paying for thousands of rows.
- **Compare mode.** Compare up to 5 terms on the same scale, just like the Compare box on Google Trends.
- **Trending Now** for any country, with linked news articles.
- **Clear errors.** A failed keyword is listed with the reason and **is not charged**.

### What you get

| Data type | Contents |
|---|---|
| `interestOverTime` | Date, value (0–100), partial-data flag, average and peak |
| `interestByRegion` | Countries or regions ranked by interest |
| `relatedQueries` | Top and rising queries, including "Breakout" |
| `trendingNow` | Trending searches, approximate traffic and news links |

### Example input

```json
{
  "searchTerms": ["coffee", "matcha"],
  "dataTypes": ["interestOverTime", "relatedQueries"],
  "geo": "US",
  "timeRange": "today 12-m"
}
```

### Example output (interest over time)

```json
{
  "keyword": "matcha",
  "dataType": "interestOverTime",
  "geo": "US",
  "timeRange": "today 12-m",
  "averageValue": 71.4,
  "maxValue": 100,
  "timeline": [{ "date": "2025-11-16T00:00:00.000Z", "formattedTime": "Nov 16 – 22, 2025", "value": 64, "isPartial": false }]
}
```

### Pricing

You pay per result item. One item is one keyword × one data type, or one trending search. Failed keywords are free.

### Tips

- Google Trends values are **relative** (0–100), not search volumes.
- Use **residential proxies** (the default) for the best success rate.
- Location codes: `US`, `GB`, `AE`, `DE`, `US-CA` … leave empty for worldwide.

### Use with Claude and other AI agents

Connect the Apify MCP server with this Actor preloaded:

```
https://mcp.apify.com?tools=fetchwelldata/google-trends-reliable
```

Then ask, for example: *"Compare search interest for matcha vs coffee in the US over 12 months and list the rising related queries."*

Pairs well with our [Google News Scraper](https://apify.com/fetchwelldata/google-news-reliable) to see what the press covers alongside what people search.

*Not affiliated with or endorsed by Google.*

**Free Claude skills and n8n templates using this tool:** https://github.com/fetchwell-data/claude-skills

# Actor input Schema

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

Keywords or topics to look up. Each term is fetched on its own unless 'Compare terms together' is on.

## `dataTypes` (type: `array`):

Which Google Trends data to return for each term.

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

Country or region code, e.g. US, GB, AE, DE or US-CA. Leave empty for worldwide.

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

Period to analyse.

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

Optional. Overrides 'Time range'. Format: YYYY-MM-DD YYYY-MM-DD, e.g. 2025-01-01 2025-12-31.

## `compareTogether` (type: `boolean`):

Compare up to 5 terms in one chart so values are relative to each other (like the Compare box on Google Trends). Terms are grouped in fives.

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

Google Trends category ID. 0 = all categories.

## `searchProperty` (type: `string`):

Which Google search property to use.

## `includeTrendingNow` (type: `boolean`):

Also return today's trending searches for each location in 'Trending Now locations'.

## `trendingNowGeos` (type: `array`):

Country codes for Trending Now, e.g. US, GB, AE.

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

Interface language for names and labels, e.g. en-US.

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

Minutes from UTC as Google Trends expects it (UTC+4 = -240). 0 = UTC.

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

How many fresh sessions to try when Google rate-limits a request.

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

Google Trends rate-limits heavily. Residential proxies give the best success rate.

## Actor input object example

```json
{
  "searchTerms": [
    "coffee",
    "matcha"
  ],
  "dataTypes": [
    "interestOverTime"
  ],
  "geo": "",
  "timeRange": "today 12-m",
  "compareTogether": false,
  "category": 0,
  "searchProperty": "",
  "includeTrendingNow": false,
  "trendingNowGeos": [
    "US"
  ],
  "language": "en-US",
  "timezoneOffset": 0,
  "maxRetries": 8,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

One row per keyword and data type, plus Trending Now items.

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

Full results including timelines, region lists and related queries.

# 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",
        "matcha"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("fetchwelldata/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",
        "matcha",
    ],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

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

```

## MCP server setup

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