# Google Trends Scraper: interest, regions, related, trending (`scrapefoundry/google-trends-scraper`) Actor

Google Trends data as clean JSON with no API key: interest over time, interest by region, related queries, related topics, and today's trending searches. Any number of keywords, any country, any timeframe. Built around Google's rate limits: fresh IP per keyword, automatic retries.

- **URL**: https://apify.com/scrapefoundry/google-trends-scraper.md
- **Developed by:** [j money](https://apify.com/scrapefoundry) (community)
- **Categories:** SEO tools, Marketing, AI
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 90.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event + usage

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

Google Trends data as clean JSON, **no API key, no browser**. For every keyword you get interest over
time, interest by region, related queries and related topics, plus today's trending searches with the
news behind them. Any number of keywords, any country, any timeframe, web/news/YouTube/shopping/image
search.

Built around Google's rate limits instead of fighting them: each keyword runs on its own proxy
session (a fresh IP), the cookie warm-up costs 106 bytes instead of an 800 KB page load, widget calls
are spaced the way Google tolerates, and a rate-limited keyword rotates IP and retries automatically.

### Use cases

- Keyword research and SEO: catch rising queries before the competition
- Market research: compare interest across countries, states or cities
- Trading and crypto research: attention spikes as a signal
- Content planning: what is trending today, with the headlines driving it
- Feeding AI agents via the Apify MCP server

### Input

| Field | Meaning | Default |
|---|---|---|
| `keywords` | terms to look up, each fetched on its own | required |
| `compareKeywords` | put up to 5 keywords on one shared 0-100 scale | false |
| `geo` | ISO country or region code, empty = worldwide | `US` |
| `timeframe` | `now 1-d`, `now 7-d`, `today 1-m`, `today 3-m`, `today 12-m`, `today 5-y`, `all`, or `YYYY-MM-DD YYYY-MM-DD` | `today 12-m` |
| `category` | Google Trends category id | 0 |
| `property` | \`\` (web), `images`, `news`, `youtube`, `froogle` | web |
| `dataTypes` | interestOverTime, interestByRegion, relatedQueries, relatedTopics | first three |
| `regionResolution` | COUNTRY, REGION, CITY, DMA | REGION |
| `includeTrendingNow` / `trendingGeo` | today's trending searches | true / `US` |
| `proxyConfiguration` | residential proxy recommended | Apify residential |

### Output

One row per keyword:

```json
{
  "type": "keyword",
  "keyword": "bitcoin",
  "geo": "US",
  "timeframe": "today 12-m",
  "averageInterest": 41.3,
  "interestOverTime": [{ "date": "Oct 12 – 18, 2026", "timestamp": 1792627200000, "value": 14, "isPartial": true }],
  "interestByRegion": [{ "geoCode": "US-WY", "geoName": "Wyoming", "value": 100 }],
  "relatedQueries": { "top": [{ "query": "bitcoin price", "value": 100 }], "rising": [{ "query": "…", "value": 3400, "formattedValue": "+3,400%" }] },
  "relatedTopics": { "top": [], "rising": [] }
}
```

Plus one row per trending term when enabled:

```json
{ "type": "trending", "geo": "US", "title": "…", "approxTraffic": "200K+", "publishedAt": "…", "news": [{ "title": "…", "url": "…", "source": "…" }] }
```

`relatedTopics` can come back empty for some keywords; Google serves that dataset selectively. Use
`compareKeywords` when you need values that are comparable across terms; otherwise each keyword is
scaled 0-100 on its own.

### Pricing

Pay per event. `keyword`: $0.003 per keyword with all requested datasets ($3 per 1,000).
`trending`: $0.0005 per trending term. Plus the standard Actor start event and your proxy usage
(roughly 15 KB per keyword on residential proxy).

### Issues

Google changes Trends often. If a dataset comes back empty or a run fails, open an issue on the Actor
page; typical response is under 6 hours.

# Actor input Schema

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

Search terms to look up. Each keyword is fetched on its own (unlimited count). Turn on 'Compare keywords' to get up to 5 on one shared 0-100 scale.

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

Put up to 5 keywords in one comparison so their values are relative to each other, like the Google Trends compare view.

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

ISO code such as US, GB, DE, or a region like US-CA. Empty = worldwide.

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

Google Trends timeframe: now 1-d, now 7-d, today 1-m, today 3-m, today 12-m, today 5-y, all, or 'YYYY-MM-DD YYYY-MM-DD'.

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

Google Trends category id (0 = all categories).

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

Web search (empty), images, news, youtube or froogle (shopping).

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

Which datasets to fetch per keyword.

## `regionResolution` (type: `string`):

Granularity for interest by region.

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

Also return today's trending searches for the trending country below (free of rate limits).

## `trendingGeo` (type: `string`):

ISO country code for trending searches.

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

Keywords fetched in parallel, each on its own proxy session.

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

Google Trends limits each IP to roughly 10 requests. Residential proxy with a fresh session per keyword is strongly recommended.

## Actor input object example

```json
{
  "keywords": [
    "bitcoin"
  ],
  "compareKeywords": false,
  "geo": "US",
  "timeframe": "today 12-m",
  "category": 0,
  "property": "",
  "dataTypes": [
    "interestOverTime",
    "interestByRegion",
    "relatedQueries"
  ],
  "regionResolution": "REGION",
  "includeTrendingNow": true,
  "trendingGeo": "US",
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "keywords": [
        "bitcoin"
    ]
};

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

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

```

## MCP server setup

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