# Google Trends Scraper – Keywords, Regions, Related & Trending (`datataskflow/google-trends-scraper`) Actor

Reliable Google Trends API: interest over time, by region, related queries, compare unlimited keywords on one scale, plus daily trending searches. Automatic retries, no platform fees.

- **URL**: https://apify.com/datataskflow/google-trends-scraper.md
- **Developed by:** [DataTaskFlow](https://apify.com/datataskflow) (community)
- **Categories:** SEO tools, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.60 / 1,000 keyword results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 – Keywords, Regions, Related Queries & Trending Now

Get Google Trends data as clean JSON, CSV or Excel: **interest over time**, **interest by region**, **related queries**, **daily trending searches**, and a ready-made **trend summary** (average, peak, % change, rising / stable / falling) for every keyword.

Built to be reliable: when Google rate-limits a request, the Actor retries automatically with a fresh IP and falls back to residential proxies. You don't manage proxies and you never pay for platform usage – only for results.

### What you get

| Feature | Details |
|---|---|
| 📈 Interest over time | Every data point (minute to monthly granularity), 0–100 scale |
| 🧮 Trend summary | Average interest, peak value and date, latest value, % change, trend label |
| ⚖️ Compare unlimited terms | Put 20, 50 or 100 keywords on **one common 0–100 scale** (Google itself allows 5) |
| 🌍 Interest by region | Countries, sub-regions, cities or US metro areas |
| 🔎 Related queries | Top and rising, with growth values like "+250%" or "Breakout" |
| 🔥 Trending now | What people are searching for right now in any country, with approximate search volume and news links |
| 🛡️ Reliability | Automatic retries with new IPs, residential fallback, clear error rows instead of silent gaps |

### Use cases

- **SEO and content:** find rising keywords and seasonal peaks before you plan content.
- **Market research:** compare brands, products or competitors on one scale.
- **E-commerce:** spot seasonal demand and the regions where a product is most searched.
- **Finance and crypto:** track attention on tickers, tokens and topics over time.
- **AI agents and dashboards:** feed structured trend data to LLM workflows, n8n, Make or Google Sheets.

### How to use it

1. Enter your **search terms** (one per line).
2. Pick a **country** (or leave empty for worldwide) and a **time range**.
3. Optionally turn on **Compare all terms on one scale**, **Interest by region**, or **Related queries**.
4. Click **Start** and download the results in JSON, CSV, Excel or via API.

For what is trending right now, set **What to scrape** to *Trending now* and choose a country.

#### Input example

```json
{
  "searchTerms": ["bitcoin", "ethereum", "solana"],
  "geo": "US",
  "timeRange": "today 12-m",
  "compareTerms": true,
  "includeInterestByRegion": true,
  "includeRelatedQueries": true
}
```

#### Output example (one item per search term)

```json
{
  "type": "keyword",
  "searchTerm": "bitcoin",
  "location": "US",
  "timeRange": "today 12-m",
  "averageInterest": 41.2,
  "peakValue": 100,
  "peakDate": "2026-03-08T00:00:00Z",
  "latestValue": 37,
  "changePercent": -18.4,
  "trend": "falling",
  "hasData": true,
  "comparedWith": ["ethereum", "solana"],
  "interestOverTime": [
    {"date": "2025-10-05T00:00:00Z", "timestamp": 1759622400, "value": 45, "hasData": true, "isPartial": false}
  ],
  "interestByRegion": [
    {"geoCode": "US-WY", "geoName": "Wyoming", "value": 100}
  ],
  "relatedQueries": {
    "top": [{"query": "bitcoin price", "value": 100, "formattedValue": "100"}],
    "rising": [{"query": "bitcoin etf", "value": 250, "formattedValue": "+250%"}]
  },
  "googleTrendsUrl": "https://trends.google.com/trends/explore?q=bitcoin,ethereum,solana&date=today%2012-m&geo=US",
  "scrapedAt": "2026-10-02T18:00:00Z"
}
```

Trending-now items look like this:

```json
{"type": "trending", "rank": 1, "trend": "champions league", "geo": "GB", "approxTraffic": "500K+", "approxTrafficNumber": 500000, "startedAt": "2026-10-02T15:00:00Z", "newsArticles": [{"title": "…", "url": "…", "source": "…"}]}
```

### Run summary

Every run also saves a `RUN_STATS` record (Storage → Key-value store) with the number of terms that returned data, had no data or failed, the reasons for failures, and how many requests were retried.

### Pricing

Pay per result, no platform usage fees and no start fee:

| Event | When it is charged |
|---|---|
| Keyword | Once per search term that returned data (includes the timeline and the trend summary) |
| Interest by region (add-on) | Per term, only if you turned it on and data exists |
| Related queries (add-on) | Per term, only if you turned it on and data exists |
| Trending item | Per trending search returned |

Terms without data and failed terms are **never charged**. Exact prices are shown on the Pricing tab and get lower on higher Apify plans.

### How comparing more than 5 terms works

Google Trends scales every comparison so that its highest point is 100, and it allows at most 5 terms per comparison. This Actor splits your list into groups that all contain the same **anchor term**, uses the anchor to convert every group to the same scale, and rescales the result so the overall highest point is 100. Pick an anchor of medium popularity (set *Anchor term*) for the most precise results; very rare terms next to very popular ones can round to 0, exactly as on Google Trends.

### FAQ

**Is the data exactly what Google Trends shows?** Yes. Values come from the same endpoints the Google Trends website uses. Google samples its data, so two runs can differ by a few points.

**What does the 0–100 value mean?** 100 is the peak popularity in the chosen time and place; 50 means half as popular. Values are relative, not absolute search counts.

**Why did a term return no data?** Google has too little search volume for it in that time and place. Such terms are returned with `hasData: false` and are not charged.

**Can I schedule it?** Yes. Use Apify Schedules to run it daily or weekly and connect the results to Google Sheets, Slack, n8n, Make or your own API.

**Is scraping Google Trends legal?** The Actor collects only public, aggregated and anonymous trend data, with no personal data. You are responsible for using the data in line with applicable laws and Google's terms.

### Support

Found a bug or need a feature? Open an issue on the **Issues** tab – fixes usually ship within a few days.

# Actor input Schema

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

Keyword trends: interest over time (plus optional regions and related queries) for your search terms. Trending now: what people are searching for right now in a country.

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

Keywords to analyze, one per line. Up to 500 per run. Each term is charged once, only if Google returns data for it.

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

Two-letter country code (US, GB, DE, SI) or a sub-region code such as US-CA. Leave empty for worldwide. In 'Trending now' mode the default is US.

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

Period to analyze. Shorter ranges give finer granularity (minutes, hours, days); longer ranges give weeks or months.

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

Overrides 'Time range'. Format: YYYY-MM-DD YYYY-MM-DD, for example 2025-01-01 2025-06-30.

## `compareTerms` (type: `boolean`):

Off: every term is scaled 0–100 on its own. On: all terms share one 0–100 scale so you can compare them directly. Google allows only 5 terms per comparison; above 5 this Actor chains comparisons through an anchor term so any number of terms ends up on the same scale.

## `anchorTerm` (type: `string`):

Term included in every comparison group to link them together. Choose a term of medium popularity. Defaults to the first search term.

## `includeInterestByRegion` (type: `boolean`):

Adds where the term is most popular (countries, regions or cities). Charged as an add-on per term.

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

Auto: countries for worldwide, sub-regions for a country. DMA (metro areas) works only for the US.

## `includeRelatedQueries` (type: `boolean`):

Adds the top and rising searches related to each term. Charged as an add-on per term.

## `includeTimeline` (type: `boolean`):

Include every data point of interest over time. Turn off if you only need the summary (average, peak, trend).

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

Google Trends category ID (0 = all categories). Example: 7 = Finance, 5 = Computers & Electronics.

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

Which Google search to measure.

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

Language for region names and related queries, e.g. en-US, de-DE.

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

Only for 'Trending now' mode. Google's live feed currently lists about 10–20 trending searches per country at a time.

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

The default works for most users. If Google blocks a request, the Actor retries automatically with a new IP and falls back to residential proxies at no extra cost to you.

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

How many times to retry with a fresh IP when Google blocks a request.

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

How many terms to process at the same time.

## Actor input object example

```json
{
  "mode": "keywords",
  "searchTerms": [
    "bitcoin",
    "ethereum",
    "solana"
  ],
  "geo": "",
  "timeRange": "today 12-m",
  "compareTerms": false,
  "includeInterestByRegion": false,
  "regionResolution": "auto",
  "includeRelatedQueries": false,
  "includeTimeline": true,
  "category": 0,
  "searchProperty": "",
  "language": "en-US",
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "maxRetries": 8,
  "maxConcurrency": 3
}
```

# Actor output Schema

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

No description

## `trending` (type: `string`):

No description

## `runStats` (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",
        "ethereum",
        "solana"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

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

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

```

## MCP server setup

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