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

Get Google Trends data for keywords: interest over time, interest by region, related queries and related topics. Also returns the trending-now searches per country. Pay per result.

- **URL**: https://apify.com/santamaria-automations/google-trends-scraper.md
- **Developed by:** [NanoScrape](https://apify.com/santamaria-automations) (community)
- **Categories:** SEO tools, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 trend 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 search interest data from [Google Trends](https://trends.google.com/trends/) for any keyword: interest over time, interest by region, and top and rising related queries. A second mode returns the searches that are trending right now in a country, with search volume, growth and related searches for each one.

### What you can do with it

- Track how interest in a keyword changes over the past hour, day, week, year or since 2004.
- Compare up to 5 keywords on one scale to see which one wins.
- Find the regions where a keyword is strongest, for local campaigns or market research.
- Collect related queries, including rising and "Breakout" queries, for keyword research and content ideas.
- Monitor the current trending searches per country for news, PR and social media teams.

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `mode` | text | `keywords` | `keywords` for keyword trends, `trending` for the current trending searches. |
| `keywords` | list of text | `["coffee", "tea"]` when empty | Keywords to look up. A comma or line separated text also works, and so does a Google Trends explore link. |
| `compareKeywords` | true/false | `false` | Off: one row per keyword. On: groups of up to 5 keywords are compared on one scale, one row per group. |
| `geo` | list of text | worldwide (US in trending mode and in the sample) | Country codes such as `US` or `DE`, or regions such as `US-CA`. Every geo gives its own rows. Country names such as `Germany` are understood too. |
| `timeframe` | text | `today 12-m` | One 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`. Short forms such as `7d` and date ranges such as `2024-01-01 2024-06-30` also work. |
| `category` | integer | `0` | Google Trends category number, `0` for all categories. |
| `property` | text | web search | `news`, `images`, `youtube` or `froogle` (Google Shopping) to measure interest on that search instead. |
| `timeline` | true/false | `true` | Include interest over time. |
| `regions` | true/false | `true` | Include interest by region. |
| `relatedQueries` | true/false | `true` | Include top and rising related queries. |
| `relatedTopics` | true/false | `false` | Experimental, see the FAQ. |
| `maxItems` | integer | `0` | Maximum rows for the whole run, `0` means no limit. |

Numbers and true/false values may be given as text (`"25"`, `"true"`). An empty input `{}` runs a small sample (coffee and tea in the US, 2 rows) and the run status says so. If the input cannot be read, the same sample runs and the log shows a warning.

#### Example: keyword trends

```json
{
  "keywords": ["coffee", "tea"],
  "geo": ["US", "DE"],
  "timeframe": "today 12-m"
}
```

#### Example: compare keywords for the past 7 days

```json
{
  "keywords": ["coffee", "tea", "juice"],
  "compareKeywords": true,
  "geo": "US",
  "timeframe": "now 7-d"
}
```

#### Example: trending searches

```json
{
  "mode": "trending",
  "geo": ["US", "DE"],
  "maxItems": 50
}
```

### Output

#### Keyword rows

One row per keyword (or per compared group), geo and timeframe.

| Field | Type | Description |
|-------|------|-------------|
| `keyword` | string | The keyword. In compare mode the keywords joined with a comma. |
| `keywords` | array | The keywords of the row. |
| `compare` | boolean | True when several keywords were compared on one scale. |
| `geo` | string | Geo code, empty for worldwide. |
| `timeframe` | string | Timeframe of the data. |
| `category` | integer | Category number. |
| `property` | string | Search type, empty for web search. |
| `timeline` | array | Points with `time` (Unix seconds), `date` (ISO), `label` (as Google shows it), `value` (0 to 100, first keyword), `values` (one per keyword) and `is_partial`. |
| `regions` | array | Regions with `geoCode`, `geoName`, `value` and `values`. |
| `related_queries_top` | array | Top related queries: `keyword`, `query`, `value`, `formatted_value`, `link`. |
| `related_queries_rising` | array | Rising related queries. `formatted_value` is `Breakout` for the fastest risers. |
| `related_topics_top` | array | Top related topics (experimental, usually empty). |
| `related_topics_rising` | array | Rising related topics (experimental, usually empty). |
| `averages` | object | Average interest per keyword over the timeline, partial points excluded. |
| `source_url` | string | The matching Google Trends page. |
| `scraped_at` | string | UTC timestamp. |

Values are relative: 100 is the peak for the chosen keyword, geo and timeframe, and Google does not publish absolute search counts. Fields you switch off come back as empty lists.

In a test with 5 keyword rows (coffee and tea in the US for 12 months, coffee in the US and Germany for 7 days, with the matching options on) every row had a timeline and averages, every row with regions switched on had regions, and every row with related queries switched on had top and rising queries. Tea had 22 rising queries where coffee had 25.

```json
{
  "keyword": "coffee",
  "keywords": ["coffee"],
  "compare": false,
  "geo": "US",
  "timeframe": "today 12-m",
  "category": 0,
  "property": "",
  "timeline": [
    {"time": 1761436800, "date": "2025-10-26", "label": "Oct 26 – Nov 1, 2025", "value": 61, "values": [61], "is_partial": false}
  ],
  "regions": [
    {"geoCode": "US-WY", "geoName": "Wyoming", "value": 100, "values": [100]}
  ],
  "related_queries_top": [
    {"keyword": "coffee", "query": "coffee near me", "value": 100, "formatted_value": "100", "link": "https://trends.google.com/trends/explore?q=coffee+near+me&date=today+12-m&geo=US"}
  ],
  "related_queries_rising": [
    {"keyword": "coffee", "query": "home workout routines", "value": 6000, "formatted_value": "Breakout", "link": "https://trends.google.com/trends/explore?q=home+workout+routines&date=today+12-m&geo=US"}
  ],
  "related_topics_top": [],
  "related_topics_rising": [],
  "averages": {"coffee": 79.6},
  "source_url": "https://trends.google.com/trends/explore?date=today+12-m&geo=US&q=coffee",
  "scraped_at": "2026-10-27T10:53:23Z"
}
```

(Timeline, regions and query lists are shortened here; a 12-month timeline has 53 weekly points and a US row has 51 regions.)

A keyword with no search interest in the chosen geo and timeframe returns no row, and the run status names it.

#### Trending rows

One row per trending search. A geo returns the same list as the Trending now page for the last 24 hours, in its default order. The number of rows depends on the geo and the time of day. Use `maxItems` to stop earlier.

| Field | Type | Description |
|-------|------|-------------|
| `title` | string | The trending search. |
| `approx_traffic` | string | Search volume as a string, for example `200000+`. |
| `search_volume` | integer | The same volume as a number. |
| `increase_percentage` | integer | Increase in search volume in percent. |
| `pub_date`, `started_at` | string | When the search started trending, UTC. |
| `ended_at` | string | When the trend ended, UTC. `null` while it is active. |
| `is_active` | boolean | True while the trend is active. |
| `related_queries` | array | Related searches of the trend. |
| `category_ids` | array | Google Trends category numbers of the trend. |
| `picture`, `picture_source` | string | Image and its source. Only on fallback rows (see below), otherwise `null`. |
| `news_items` | array | News stories with `title`, `snippet`, `url`, `source`, `picture`. Only on fallback rows (see below), otherwise `null`. |
| `geo` | string | Country code. |
| `rank` | integer | Position in the list. |
| `source_url` | string | The Google Trends trending page for the geo. |
| `scraped_at` | string | UTC timestamp. |

If the full list cannot be loaded, the run falls back to a shorter list of the newest trends. Those rows have `null` in `search_volume`, `increase_percentage`, `started_at`, `ended_at`, `is_active`, `related_queries` and `category_ids`, and may carry `picture` and `news_items`.

```json
{
  "title": "dortmund – werder bremen",
  "approx_traffic": "200000+",
  "pub_date": "2026-10-27T18:50:00Z",
  "picture": null,
  "picture_source": null,
  "news_items": null,
  "geo": "DE",
  "rank": 1,
  "source_url": "https://trends.google.com/trending?geo=DE",
  "scraped_at": "2026-10-28T06:46:38Z",
  "search_volume": 200000,
  "increase_percentage": 1000,
  "started_at": "2026-10-27T18:50:00Z",
  "ended_at": null,
  "is_active": true,
  "related_queries": ["dortmund – werder bremen", "dfb-pokal", "pokal", "dortmund werder bremen"],
  "category_ids": [17]
}
```

### Pricing

Pay per result. The Pricing tab of this Actor lists the events and their prices:

- `actor-start`: charged once per run, together with the first delivered row.
- `trend-result`: one per delivered keyword row.
- `trending-search`: one per delivered trending search. Without `maxItems`, a trending run delivers the whole list for each geo, 400 to 518 trending searches per geo in the 10-28 test, so set `maxItems` if you only need the top of the list.

Keywords without data and keywords that could not be fetched are not charged. If the run reaches the maximum charge you set, it stops and the status says how many rows were delivered.

### Use with AI agents (MCP)

The Actor can be called from any MCP client through the Apify MCP server. Ask for "interest in electric cars in Germany over 5 years" and pass `keywords`, `geo` and `timeframe` as in the examples above. Every output field is listed in the tables above, and results are plain JSON.

### FAQ

**What do the values mean?** 100 is the highest interest for that keyword, geo and timeframe, 50 is half of it. In compare mode all keywords share one scale, so the values show which keyword is larger.

**Why are `related_topics_top` and `related_topics_rising` empty?** In testing, Google returned empty topic lists for the keywords we tried, also when the keyword was resolved to a topic first. The option is off by default and costs extra lookups per keyword. If two keywords in a row come back without topics, the run skips further topic lookups.

**Why is a keyword missing from the results?** It had no search interest in the chosen geo and timeframe, or Google refused the request repeatedly. The run status lists both cases by keyword. Try a broader geo or a longer timeframe.

**How many points does the timeline have?** It depends on the timeframe: hourly or finer points for the short ones, weekly for 12 months, monthly for 5 years and longer. A last point marked `is_partial` is still in progress.

**How do I find the category number?** Open Google Trends, choose a category and read the `cat` value in the page address.

**Can I run many keywords?** Yes. Keywords are fetched one after another with pauses, at roughly 20 seconds per keyword, so a run with 100 keywords takes about half an hour. Use `maxItems` or the maximum charge to cap a run.

### Limits

- Interest values are relative, not search counts.
- Up to 5 keywords can be compared in one row.
- The trending mode returns what Google lists for the last 24 hours at the time of the run, including searches that already stopped trending (`is_active` false). In the test, DE returned 400 and US 518 searches. Use `maxItems` to limit a run.
- Related topics are experimental.

### Support

Questions or a missing field: contact@nanoscrape.com.

# Actor input Schema

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

keywords returns trend data for the keywords below. trending returns the current trending searches for each country in Geo.

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

Search terms to look up (for example coffee, electric car). Each keyword gets its own row unless Compare keywords is on. Leave empty to run the sample (coffee, tea in the US). Not used in trending mode.

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

Off: one row per keyword. On: up to 5 keywords are compared on one scale and returned in one row (values are relative to each other).

## `geo` (type: `array`):

Country codes (US, DE, GB) or regions (US-CA). Each geo gives its own rows. Leave empty for worldwide; in trending mode empty means US.

## `timeframe` (type: `string`):

Period for keyword trends. Hourly data for the shortest ones, weekly or monthly points for the longer ones.

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

Google Trends category number. 0 means all categories (for example 71 is Food and Drink, 7 is Finance).

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

Which Google search the interest is measured on.

## `timeline` (type: `boolean`):

Adds the timeline of search interest (0 to 100) to every row.

## `regions` (type: `boolean`):

Adds search interest per country, state or region.

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

Adds the top and rising related search queries.

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

Experimental. Adds the top and rising related topics. Google returned empty topic lists in testing, so the lists are usually empty. Each keyword needs three extra lookups.

## `maxItems` (type: `integer`):

Maximum number of rows to return across the whole run. 0 means no limit.

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

Proxy used for requests. The default works for most runs.

## Actor input object example

```json
{
  "mode": "keywords",
  "keywords": [
    "coffee",
    "tea"
  ],
  "compareKeywords": false,
  "geo": [
    "US"
  ],
  "timeframe": "today 12-m",
  "category": 0,
  "property": "",
  "timeline": true,
  "regions": true,
  "relatedQueries": true,
  "relatedTopics": false,
  "maxItems": 0,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `defaultDataset` (type: `string`):

Trend data per keyword and geo, or trending searches, with timeline, regions 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 = {
    "keywords": [
        "coffee",
        "tea"
    ],
    "geo": [
        "US"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

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

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

```

## MCP server setup

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