# Google Trends Scraper & API - 100 Keywords (`dataio/google-trends-scraper`) Actor

Scrape Google Trends data: interest over time, interest by region, related and rising queries, related topics and today's trending searches. Compare up to 100 keywords on one 0-100 scale (Google allows 5), within 0.2% of Google's own figures. Rate limits handled.

- **URL**: https://apify.com/dataio/google-trends-scraper.md
- **Developed by:** [Tom Awake](https://apify.com/dataio) (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 $1.40 / 1,000 keywords

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

### What does Google Trends Scraper do?

Google Trends Scraper extracts Google search interest for your keywords:
**interest over time**, **interest by region**, **related and rising
queries**, **related topics**, and **today's trending searches**. You get one
row per keyword, with a summary you can sort (average, peak, change) and the
full series. It works like a **Google Trends API**, with no Google account and
no code needed.

- **Compare 100 keywords, not 5.** Google Trends compares only 5 terms at a
  time, and each request has its own 0–100 scale, so two batches can't be
  compared. This actor repeats an *anchor* term in every batch and rescales,
  which puts every keyword on **one scale**. Measured against Google's own
  single-request figures, the error is **0.2 % at most** (DeepSeek 2.13 vs
  2.13, Grok 4.87 vs 4.87).
- **Rate limits handled.** Google Trends answers with HTTP 429 quickly. Each
  batch runs in its own proxy session and is retried in a new one after a
  refusal, never silently dropped. From Apify's servers, 9 keywords with 51 US
  states each and 10 trending searches came back in 21 seconds with no refusal.
- **The endpoints that still work.** The old `dailytrends` endpoint returns
  404\. Trending searches come from Google's live "Trending now" feed.

### What data can you extract from Google Trends?

| Data | Fields |
|---|---|
| Interest over time | `interestOverTime` (date, value, isPartial), `averageInterest`, `peakInterest`, `peakDate`, `trendChangePct` |
| Interest by region | `interestByRegion`: countries, states, cities or US metro areas |
| Related queries | `relatedQueries.top`, `relatedQueries.rising` (with breakout values) |
| Related topics | `relatedTopics.top`, `relatedTopics.rising` |
| Trending now | rank, search term, approximate traffic, start time, news articles |
| Scale | `anchorTerm`, `comparableAcrossBatches`, `scaleConfidence` |

### How to scrape Google Trends

1. Enter your **search terms**, up to 100.
2. Pick a **country or region** (empty for worldwide) and a **time range**, from the past hour to 2004 onwards, or custom dates.
3. Choose the search type (web, YouTube, news, images, shopping) and the extras: related queries, topics, regions, trending now.
4. Click **Start**, then download JSON, CSV or Excel, or call it through the API.

### How much does it cost to scrape Google Trends?

You pay per keyword returned, and per trending search if you ask for them.

| Job | Cost |
|---|---|
| 10 keywords, 12 months, related queries | about $0.02 |
| 100 keywords on one scale | about $0.20 |
| Today's 10 trending searches | about $0.01 |

Subscription plans pay less per keyword.

### Input example

```json
{
  "searchTerms": ["chatgpt", "claude", "gemini", "perplexity", "copilot", "deepseek", "grok", "mistral", "llama"],
  "geo": "US",
  "timeRange": "past-12-months",
  "includeRelatedQueries": true,
  "includeInterestByRegion": true,
  "regionResolution": "REGION"
}
```

### Output example

```json
{
  "type": "interest",
  "searchTerm": "claude",
  "geo": "US",
  "timeRange": "today 12-m",
  "averageInterest": 17.12,
  "peakInterest": 32,
  "trendChangePct": 149,
  "interestOverTime": [{"date": "2025-09-14T00:00:00+00:00", "value": 5, "isPartial": false}, "..."],
  "relatedQueries": {
    "top": [{"query": "claude ai", "value": 100}, {"query": "claude code", "value": 78}],
    "rising": [{"query": "claude cowork", "value": 73050, "formattedValue": "Breakout"}]
  },
  "anchorTerm": "chatgpt",
  "comparableAcrossBatches": true,
  "scaleConfidence": "anchored"
}
```

`scaleConfidence` is `exact` when Google compared everything in one request,
`anchored` when batches were rescaled, and `weak` when the anchor was too rare
in a batch to rescale precisely. If you see `weak`, choose a more-searched
anchor.

### Use the Google Trends API in Python

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("DataIO/google-trends-scraper").call(run_input={
    "searchTerms": ["chatgpt", "claude", "gemini"], "geo": "US",
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["searchTerm"], row["averageInterest"], row["trendChangePct"])
```

No pytrends quotas to fight. It also works from JavaScript, Make, Zapier, n8n,
or AI agents through the Apify MCP server.

### Other actors you might like

- [Google Hotels Scraper](https://apify.com/DataIO/google-hotels-scraper): hotel prices and ratings for any city and dates.
- [Wikipedia Pageviews by Language](https://apify.com/DataIO/wikipedia-pageviews-by-language): another view of public attention, per language.
- [npm Download Trends](https://apify.com/DataIO/npm-registry-download-trends): adoption trends for JavaScript packages.

### FAQ

#### Is it legal to scrape Google Trends?

Google Trends data is public and aggregated. It contains no personal data. How
you use it is your responsibility.

#### Are the values search volumes?

No. Google Trends gives relative interest from 0 to 100, not counts of
searches. With this actor, the 100 is shared by all your keywords.

#### Why are related topics sometimes empty?

Google provides topics only when a request has a single keyword. That is
Google's rule.

#### Can I track trends over time?

Yes. Schedule the actor daily or weekly with the same keywords, or with
`includeTrendingNow` to log what is trending.

### Source

Public Google Trends pages. This actor is not affiliated with or endorsed by
Google.

# Actor input Schema

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

Up to 100. Google compares only 5 at a time; beyond 5, the actor repeats an anchor term in every batch and rescales, so every term ends up on ONE 0–100 scale (measured: within 0.2% of Google's own single-request figures).

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

Repeated in every batch to rescale them. Defaults to your first term. Pick a term that is searched steadily: a rare anchor makes the rescaling noisy (rows then say scaleConfidence: weak).

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

Empty for worldwide, a country code (US, FR, DE), or a region (US-CA, FR-IDF).

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

Period covered. Short ranges return hourly or minute points; long ranges return weekly or monthly points, as Google Trends does.

## `startDate` (type: `string`):

YYYY-MM-DD. Used only with the custom range.

## `endDate` (type: `string`):

YYYY-MM-DD. Used only with the custom range.

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

Which Google search the interest is measured on.

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

Google Trends category number, 0 for all categories.

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

Top and rising related queries for each keyword.

## `includeRelatedTopics` (type: `boolean`):

Google provides topics only when a batch has a single term.

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

Interest per country, region, city or metro area, at the resolution below.

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

Granularity of interest by region. Regions, cities and metro areas need a country in the Country or region field.

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

Google's 'Trending now' list for the country above, with approximate traffic and news links.

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

Google Trends rate-limits hard. Each batch runs in its own proxy session and is retried in a new one after a refusal.

## Actor input object example

```json
{
  "searchTerms": [
    "chatgpt",
    "claude",
    "gemini"
  ],
  "geo": "US",
  "timeRange": "past-12-months",
  "searchProperty": "web",
  "category": 0,
  "includeRelatedQueries": true,
  "includeRelatedTopics": false,
  "includeInterestByRegion": false,
  "regionResolution": "COUNTRY",
  "includeTrendingNow": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Every row produced by the run, in JSON.

# 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": [
        "chatgpt",
        "claude",
        "gemini"
    ],
    "geo": "US",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

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

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

```

## MCP server setup

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