# Google Trends Scraper (Interest, Regions, Related) (`neatfeeds/google-trends-scraper`) Actor

Compare up to 5 keywords per search on Google Trends: interest over time (one row per date, one column per keyword), interest by region, related queries and related topics. Any country, time range, category or property. Fast, no browser.

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

## Pricing

from $2.00 / 1,000 search 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 (Interest, Regions, Related)

**Get Google Trends data as clean rows: interest over time for up to 5 keywords side by side, interest by country or region, and the top and rising related queries, for any location, time range, category and Google property (Web, YouTube, News, Images, Shopping).**

One input, one dataset, every row tagged with a `type`. No browser, no Google account, no API key.

### What you can use it for

- **SEO and content planning**: find which topics are growing, compare keyword variants before writing, and mine *rising* related queries for new article ideas.
- **E-commerce seasonality**: see when demand for a product peaks in each country, and plan stock, ads and promotions around it.
- **Market research**: compare brands, products or categories on the same 0-100 scale and see where each one is strongest.
- **Data for AI agents and dashboards**: a predictable JSON schema that an agent, a spreadsheet or a BI tool can read without cleaning.

### Input

| Field | What it does |
|---|---|
| `keywords` (required) | Terms to compare. Up to 5 share one search and one 0-100 scale, as on the Trends website. If you pass more, they are split into groups of 5, and each group gets its own `searchId`. |
| `geo` | Empty for worldwide, a country (`US`, `IT`, `DE`) or a region (`US-CA`, `GB-ENG`). |
| `timeRange` | `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`, or custom dates `"2025-01-01 2025-12-31"`. |
| `category` | Trends category id, `0` = all (e.g. 71 Food & Drink, 18 Shopping). |
| `property` | `web` (default), `youtube`, `news`, `images`, `froogle` (Google Shopping). |
| `include` | Sections to return: `interestOverTime`, `interestByRegion`, `relatedQueries` (default: all three), and optionally `relatedTopics`. |
| `maxResults` | Stop after this many rows (default 1000). |
| `proxyConfiguration` | Apify Proxy by default. You don't need to change it. |

Example:

```json
{
  "keywords": ["coffee", "tea"],
  "geo": "US",
  "timeRange": "today 12-m",
  "include": ["interestOverTime", "interestByRegion", "relatedQueries"]
}
```

### Output

One row per logical record. Filter on `type` to get one table per section; the Console has a ready-made view for each. Every row also carries `searchId`, `keywords`, `geo`, `timeRange`, `category`, `property`, `trendsUrl` (the same chart on Google Trends) and `scrapedAt`.

These examples are real rows from a run with `{"keywords": ["coffee", "tea"], "timeRange": "today 3-m"}` (worldwide):

**`interestOverTime`**: one row per date, one value per keyword (wide format). In a CSV or Excel export, `values` becomes the columns `values/coffee` and `values/tea`.

```json
{
  "type": "interestOverTime",
  "date": "2026-07-19",
  "timestamp": 1784419200,
  "formattedTime": "Jul 19, 2026",
  "values": { "coffee": 73, "tea": 35 },
  "isPartial": false,
  "searchId": 1,
  "keywords": ["coffee", "tea"],
  "geo": "WORLDWIDE",
  "timeRange": "today 3-m",
  "category": 0,
  "property": "web",
  "trendsUrl": "https://trends.google.com/trends/explore?date=today+3-m&q=coffee%2Ctea&hl=en-US",
  "scrapedAt": "2026-10-19T22:32:36.607Z"
}
```

**`interestByRegion`**: one row per country or region.

```json
{
  "type": "interestByRegion",
  "geoCode": "MY",
  "geoName": "Malaysia",
  "values": { "coffee": 73, "tea": 27 },
  "valueScale": "sharePercent",
  "searchId": 1
}
```

**`relatedQueries`**: top and rising queries for each keyword.

```json
{
  "type": "relatedQueries",
  "keyword": "coffee",
  "ranking": "top",
  "position": 1,
  "query": "coffee shop",
  "value": 100,
  "formattedValue": "100",
  "isBreakout": null,
  "link": "https://trends.google.com/trends/explore?q=coffee+shop&date=today+3-m",
  "searchId": 1
}
```

```json
{
  "type": "relatedQueries",
  "keyword": "coffee",
  "ranking": "rising",
  "position": 1,
  "query": "flyers mascot",
  "value": 9750,
  "formattedValue": "Breakout",
  "isBreakout": true,
  "link": "https://trends.google.com/trends/explore?q=flyers+mascot&date=today+3-m",
  "searchId": 1
}
```

**`relatedTopics`** rows add `topicTitle`, `topicType` and `topicId` in place of `query`.

That run returned 235 rows: 93 dates, 57 countries and 85 related queries. The dataset schema describes every field.

### Pricing

Pay per result: **$2.00 per 1,000 rows** ($0.002 per row), plus **$0.00005 per run start**. You pay nothing else: proxies and compute are included.

| Run | Rows | Cost |
|---|---|---|
| 1 keyword, past 7 days, interest over time only, `maxResults: 20` | 20 | about $0.04 |
| 1 keyword, past 12 months, interest over time only | ~53 | about $0.11 |
| 2 keywords, past 3 months, worldwide, all default sections | 235 | about $0.47 |
| 5 keywords, past 12 months, one country, all default sections | ~340 | about $0.68 |

On average, a full search with the default sections returns 230-355 rows (more keywords mean more related queries) and costs **$0.46-0.71**. Turn off the sections you don't need (`include`) or set `maxResults` to pay less. If you set a spending limit on the run, the actor stops cleanly when it reaches it and keeps everything collected so far.

### Why this actor

- **No browser, so it's fast and cheap.** It reads the same JSON that the Trends website loads. A search takes a few seconds and uses very little memory.
- **It handles blocks for you.** Google rate-limits each IP. Every search runs on its own proxy session with a fresh cookie. When Google answers 429, the actor switches to a new IP and downloads only the sections still missing, so one slow section doesn't throw away the others.
- **Spreadsheet-ready.** One row per date with one column per keyword, ISO dates in UTC, and English labels whatever country the proxy is in. Every row links back to the chart on Google Trends so you can check it.
- **Predictable for agents.** Fixed field names, a `type` on every row, and nulls instead of missing keys.

### FAQ

**What do the 0-100 values mean?**
Google Trends never gives absolute search volumes. Over time, 100 is the highest point of the whole comparison and 50 means half as popular. Values compare only within the same `searchId`, so put the keywords you want to compare in the same group of 5. By region, a single keyword is scored 0-100 against the top region (`valueScale: "relativeInterest"`). For several keywords Google returns each keyword's share of that region's searches, in percent (`valueScale: "sharePercent"`).

**Why are some values 0?**
There was not enough search volume for that keyword, date or region. Regions with no data at all are left out.

**What does "Breakout" mean in rising queries?**
Google shows "Breakout" when a query grew by more than 5000%. The row has `isBreakout: true`, and `value` holds the growth number Google uses to rank it.

**Why are related topics off by default?**
Google currently shows related topics only to signed-in users and returns an empty list to everyone else. You can still add `relatedTopics` to `include`, and you are billed only for rows that are actually returned.

**How do I cap my spending?**
Set `maxResults`, or set a maximum cost when you start the run (Console or API). The actor checks the limit before saving each batch and stops cleanly.

**Can I use it through the API, Make, Zapier or n8n?**
Yes. Call the actor with the JSON input above through the Apify API, the official clients, or any Apify integration. Then read the dataset as JSON, CSV or Excel, optionally filtered by `type`. You can also schedule runs on Apify to track trends daily or weekly.

**Is the data the same as on the website?**
Yes. It comes from the same endpoints the Trends website uses. Because Trends samples searches, two runs a few hours apart can differ by a few points, just as two page loads can.

This actor reads public Google Trends data and is not affiliated with Google.

# Actor input Schema

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

Search terms to compare. Up to 5 keywords share one search and one 0-100 scale (like the Trends website). More than 5 are split into several searches of 5, each with its own searchId.

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

Empty for worldwide, a country code (US, IT, DE) or a region code (US-CA, GB-ENG).

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

A preset (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 custom dates "YYYY-MM-DD YYYY-MM-DD". Google picks the resolution: hourly up to 7 days, daily up to ~9 months, weekly up to 5 years, monthly beyond.

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

Google Trends category id, e.g. 0 = all, 71 = Food & Drink, 18 = Shopping, 12 = Business & Industrial, 5 = Computers & Electronics. Copy it from the cat= parameter of a Trends URL.

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

Which Google search to measure.

## `include` (type: `array`):

Which Trends sections to return. Each dataset row has a `type` field with one of these values. Related topics are off by default: Google currently returns them only to signed-in users, so they are often empty.

## `maxResults` (type: `integer`):

Stop after this many rows in total (each row is one billed result).

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

Google Trends rate-limits each IP. Apify Proxy rotates IPs automatically; switch to residential proxies only if you see many blocked searches in the log.

## Actor input object example

```json
{
  "keywords": [
    "coffee",
    "tea"
  ],
  "geo": "",
  "timeRange": "today 3-m",
  "category": 0,
  "property": "web",
  "include": [
    "interestOverTime",
    "interestByRegion",
    "relatedQueries"
  ],
  "maxResults": 1000,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `interestOverTime` (type: `string`):

Dataset items in the "Interest over time" view: type, searchId, date, formattedTime, values, isPartial, geo, timeRange.

## `interestByRegion` (type: `string`):

Dataset items in the "Interest by region" view: type, searchId, geoCode, geoName, values, valueScale.

## `relatedQueries` (type: `string`):

Dataset items in the "Related queries" view: type, searchId, keyword, ranking, position, query, value, formattedValue, isBreakout, link.

## `relatedTopics` (type: `string`):

Dataset items in the "Related topics" view: type, searchId, keyword, ranking, position, topicTitle, topicType, value, formattedValue, link.

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

Every dataset item with all fields.

# 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": [
        "coffee",
        "tea"
    ],
    "timeRange": "today 3-m",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("neatfeeds/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 = {
    "keywords": [
        "coffee",
        "tea",
    ],
    "timeRange": "today 3-m",
    "proxyConfiguration": { "useApifyProxy": True },
}

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

```

## MCP server setup

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