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

Google Trends Scraper & API: interest over time, interest by region, top and rising related queries, keyword comparison (up to 5) and trending searches, for any country, time range, category or YouTube/News/Shopping search. $4 per 1,000 keywords; failed terms are free.

- **URL**: https://apify.com/gouda_studios/google-trends-scraper.md
- **Developed by:** [Gouda Studios](https://apify.com/gouda_studios) (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

from $4.00 / 1,000 search term 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 & API

**Google Trends Scraper** gets Google Trends data for any number of keywords in one run and returns clean JSON, CSV or Excel, or you can call it through the API. Each keyword's row has **interest over time**, **interest by region**, **top and rising related queries** (including Breakout), **related topics** and a ready-made **trend summary** (average, latest, peak, trend direction).

You don't need a Google account, an API key, pytrends or your own proxy. A residential proxy, retries and session rotation are built in. **You pay $4 per 1,000 keywords, and keywords that fail are free.**

### Why use this Google Trends API

- **Reliable:**
  - every request is retried with backoff on a fresh IP
  - each keyword has its own time budget
  - the run stops cleanly before its timeout, so you never lose finished results
- **Partial data counts as a result.** If Google withholds one widget, such as related topics, you still get the rest, and the row lists what was missing in `warnings`.
- **Compare up to 5 keywords** on one shared 0-100 scale, the same way as on trends.google.com.
- **Paste Google Trends URLs.** The actor reads their `q`, `geo`, `date`, `cat` and `gprop`.
- **Any country, region (for example `US-CA`), time range, category, or search type:** web, Image, News, Google Shopping, or YouTube search trends.
- **Trending now:** today's trending searches for a country, with approximate traffic and news links.
- **Ready for AI agents.** You get flat, predictable JSON with `status` on every row. It works from the Apify MCP server, n8n, Make, Zapier, LangChain and the REST API.

### What data you get

| Field | Description |
|---|---|
| `searchTerm` | The keyword |
| `interestOverTime` | Timeline of `{date, timestamp, value 0-100, isPartial}` |
| `averageInterest`, `latestInterest`, `peakInterest`, `peakDate` | Summary of the timeline |
| `trendDirection`, `trendChangePct` | `up` / `down` / `flat` (or `new` when interest started near 0): the last quarter of the period compared with the first quarter |
| `interestByRegion` | 0-100 per country, state or sub-region |
| `relatedQueries.top` / `.rising` | Related searches, with `isBreakout` |
| `relatedTopics.top` / `.rising` | Related topics (best effort, because Google sometimes withholds them) |
| `googleTrendsUrl` | Opens the same view on trends.google.com |
| `status` | `ok`, `error` (not charged) or `skipped` (not charged) |

### Input example

```json
{
  "searchTerms": ["bitcoin", "ai agents", "https://trends.google.com/trends/explore?q=chatgpt&geo=GB&date=today%203-m"],
  "geo": "US",
  "timeRange": "today 12-m",
  "relatedQueries": true,
  "compareMode": false,
  "trendingNow": false
}
```

Time range values are `now 1-H`, `now 4-H`, `now 1-d`, `now 7-d`, `today 1-m`, `today 3-m`, `today 12-m`, `today 5-y` and `all`. You can also set a `customTimeRange` such as `2025-01-01 2025-12-31`.

### Output example (one row per keyword, from a real run on Nov 10, 2026; arrays shortened)

```json
{
  "type": "keyword",
  "searchTerm": "bitcoin",
  "geo": "US",
  "timeRange": "today 12-m",
  "property": "web",
  "status": "ok",
  "averageInterest": 33.4,
  "latestInterest": 20,
  "peakInterest": 100,
  "peakDate": "Feb 1 – 7, 2026",
  "trendDirection": "down",
  "trendChangePct": -55.4,
  "interestOverTime": [
    { "date": "Nov 9 – 15, 2025", "timestamp": 1762646400, "value": 52, "isPartial": false }
  ],
  "interestByRegion": [ { "geoCode": "US-NV", "geoName": "Nevada", "value": 100 } ],
  "relatedQueries": {
    "top": [ { "query": "bitcoin price", "value": 100, "formattedValue": "100", "isBreakout": false, "link": "https://trends.google.com/..." } ],
    "rising": [ { "query": "bitcoin etf outflows", "value": 4250, "formattedValue": "+4,250%", "isBreakout": false, "link": "https://trends.google.com/..." } ]
  },
  "googleTrendsUrl": "https://trends.google.com/trends/explore?q=bitcoin&date=today%2012-m&geo=US",
  "scrapedAt": "2026-11-10T14:54:59+00:00"
}
```

With **Compare keywords** on, each group of up to 5 terms returns one `comparison` row. In that row, `interestOverTime[].values` holds one value per keyword on a shared scale, and `summary` holds per-keyword averages, peaks and trend.

### Pricing

| Event | Price |
|---|---|
| Keyword with Google Trends data (or one trending-now row) | **$0.004** ($4 per 1,000) |
| Actor start | $0.0005 |

The proxy and compute are included. Failed and skipped keywords are **not charged**. Set a maximum charge per run, and the actor stops cleanly once it reaches that maximum.

### Use it from code or an AI agent

```python
from apify_client import ApifyClient
client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("gouda_studios/google-trends-scraper").call(run_input={"searchTerms": ["bitcoin", "ethereum"], "geo": "US"})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["searchTerm"], row.get("averageInterest"), row.get("trendDirection"))
```

For MCP clients such as Claude, Cursor and others, add `https://mcp.apify.com/?tools=gouda_studios/google-trends-scraper`.

### Use cases

- Keyword research and SEO content planning: find rising queries and seasonality
- Product, e-commerce and dropshipping demand validation
- Market research and brand-vs-competitor comparisons
- Feeding trend signals into AI agents, dashboards and trading or forecasting models

### FAQ

**Is there an official Google Trends API?** Google has no general public Trends API. This actor is a ready-to-use Google Trends API alternative.

**Why are values 0-100?** Google Trends normalizes interest. 100 is the peak popularity for the chosen term, place and time. To compare several terms on one scale, use Compare keywords.

**Why is related topics empty sometimes?** Google sometimes withholds that widget from automated sessions. The rest of the row is still returned, and the row is listed in `warnings`.

**Is it legal?** The actor collects publicly available aggregate data. Use it in line with Google's terms and your local laws.

Found a bug or need a field? Open an issue on the Issues tab. We respond quickly.

# Actor input Schema

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

Keywords or phrases, one per line. You can also paste Google Trends explore URLs; their q, geo, date, cat and gprop override the settings below. Each term returns one result row.

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

ISO code like US, GB, DE, or US-CA. Leave empty for worldwide.

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

How far back to look.

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

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

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

Google Trends category number, 0 for all categories.

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

Which Google search the trend data comes from.

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

Timeline of 0-100 interest values.

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

0-100 interest for each subregion.

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

Top and rising related searches.

## `relatedTopics` (type: `boolean`):

Top and rising related topics (best effort: Google often withholds these from automated sessions, so the field may be empty).

## `compareMode` (type: `boolean`):

Puts terms in groups of up to 5 on one shared 0-100 scale, like comparing them on trends.google.com. Returns one row per group with interest over time and by region for each keyword. Charged per keyword.

## `trendingNow` (type: `boolean`):

Adds one row per currently trending search in the chosen country, with traffic and news links.

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

Interface language for names, e.g. en-US, de, es.

## `maxTerms` (type: `integer`):

Stop after this many terms.

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

Optional. Leave off to use the built-in residential proxy, included in the price.

## `maxConcurrency` (type: `integer`):

How many search terms are fetched at the same time, each on its own IP.

## Actor input object example

```json
{
  "searchTerms": [
    "bitcoin",
    "ai agents"
  ],
  "geo": "US",
  "timeRange": "today 12-m",
  "category": 0,
  "property": "",
  "interestOverTime": true,
  "interestByRegion": true,
  "relatedQueries": true,
  "relatedTopics": true,
  "compareMode": false,
  "trendingNow": false,
  "language": "en-US",
  "maxTerms": 100,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "maxConcurrency": 3
}
```

# 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": [
        "bitcoin",
        "ai agents"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("gouda_studios/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",
        "ai agents",
    ],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("gouda_studios/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",
    "ai agents"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call gouda_studios/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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