# Google Trends Scraper — Interest Over Time, Regions, Related (`lieund/google-trends-scraper`) Actor

Google Trends data for many keywords and countries in one run: interest over time with average, peak and % change, interest by region, top and rising related queries. Compare up to 5 keywords. Web, YouTube, News, Images or Shopping.

- **URL**: https://apify.com/lieund/google-trends-scraper.md
- **Developed by:** [Mon Data Tools](https://apify.com/lieund) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 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.

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 **Google Trends data for many keywords and countries in one run**: interest over time, interest by region and related queries, the same data you see on the Google Trends *Explore* page, as clean JSON, CSV or Excel.

Each result also has ready-made numbers so you don't have to analyse the chart yourself: **average interest, peak and when it happened, latest value, and % change** over the period.

### What you can use it for

- **SEO and content:** check which keywords are growing or fading before you write, and find rising related searches.
- **Product and market research:** see seasonality (when demand peaks) and which states or countries search a product most.
- **Comparing brands or products:** put up to 5 keywords on the same 0-100 scale, like the comparison on Google Trends.
- **YouTube, News, Images and Shopping:** measure interest on those Google searches too, not only web search.
- **Dashboards and AI agents:** schedule it and send the numbers to Google Sheets, a database or an AI workflow.

### How to use it

1. Add your **keywords** (one per line).
2. Add one or more **countries** (`US`, `GB`, `DE`, `JP`, `VN` ...), a region like `US-CA`, or `WORLD`. Every keyword is looked up in every country.
3. Pick a **time range**: past hour, 4 hours, day, 7 days, 30 days, 90 days, 12 months, 5 years, since 2004, or your own dates.
4. Optionally turn on **interest by region**, **related queries** or **compare keywords**, and choose a search type or category.
5. Click **Start**.

Google limits how fast its Trends data can be read, so the Actor works steadily: expect about **10-15 seconds per keyword** (a little more with regions and related queries). 100 keywords take roughly 20-25 minutes. Requests are spaced out and retried automatically when Google slows them down.

### Output

One result per keyword per country:

```json
{
  "keyword": "air fryer",
  "country": "US",
  "timeRange": "today 12-m",
  "category": 0,
  "searchType": "web",
  "comparedWith": [],
  "hasData": true,
  "averageInterest": 65.6,
  "peakInterest": 100,
  "peakDate": "2026-04-12T00:00:00.000Z",
  "latestInterest": 60,
  "latestDate": "2026-11-15T00:00:00.000Z",
  "changePercent": -12,
  "interestOverTime": [
    { "date": "2025-11-16T00:00:00.000Z", "label": "Nov 16 – 22, 2025", "value": 78, "isPartial": false }
  ],
  "interestByRegion": [
    { "geoCode": "US-WY", "geoName": "Wyoming", "value": 100 }
  ],
  "relatedQueriesTop": [
    { "query": "air fryer chicken", "value": 100 }
  ],
  "relatedQueriesRising": [
    { "query": "ninja crispi air fryer", "growth": "+200%", "value": 200 }
  ],
  "exploreUrl": "https://trends.google.com/trends/explore?date=today%2012-m&geo=US&q=air%20fryer",
  "scrapedAt": "2026-11-22T12:07:24.733Z"
}
```

| Field | Meaning |
|---|---|
| `interestOverTime` | Google's 0-100 interest for each point in time. `isPartial` marks the current, unfinished point |
| `averageInterest`, `peakInterest`, `peakDate`, `latestInterest` | Computed from complete points only |
| `changePercent` | Average of the last quarter of the period compared with the first quarter. Positive means growing |
| `interestByRegion` | Where the keyword is searched most (0-100), strongest first. Cities include `lat` and `lng` |
| `relatedQueriesTop` / `relatedQueriesRising` | Most searched and fastest growing related searches. "Breakout" means growth above 5,000% |
| `comparedWith` | In compare mode, the other keywords on the same scale |
| `hasData` | `false` when Google has too little search volume for the keyword |

Values are relative (0-100), exactly as Google Trends shows them, not absolute search counts. Related queries are passed through as Google returns them; for very broad worldwide keywords Google's "rising" list can include unrelated searches.

### Integrations

- **Schedules:** run it every day or week with [Apify schedules](https://docs.apify.com/platform/schedules) to build your own trend history.
- **Google Sheets, Slack, email, CRM:** send results anywhere with [Make](https://docs.apify.com/platform/integrations/make), [Zapier](https://docs.apify.com/platform/integrations/zapier) or [n8n](https://docs.apify.com/platform/integrations/n8n).
- **Your own app:** get a [webhook](https://docs.apify.com/platform/integrations/webhooks) when a run finishes, then read the dataset through the API.
- **AI agents:** let AI agents run this Actor through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp).

### Pricing

**$2 per 1,000 keyword results** (one result = one keyword in one country), with a near-zero start fee and no per-run fee. Region data and related queries are included at no extra cost. If you set **Max cost per run**, the Actor stops before going over it.

### Related

- [Google Trends Trending Now](https://apify.com/lieund/google-trends-trending-now): every trending search from up to 125 countries in one run.
- [Google Autocomplete Scraper](https://apify.com/lieund/google-autocomplete-scraper): find hundreds of keyword ideas, then check them here.
- [App Store Reviews Scraper](https://apify.com/lieund/app-store-reviews-scraper): Apple App Store reviews for any app from up to 178 countries in one run.

### Notes

- Data comes from the public Google Trends website. The Actor does not collect personal data.
- Google Trends data is sampled, so values can differ slightly between runs, the same as on the website.

# Actor input Schema

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

Search terms to look up. Each keyword is one result (per country).

## `countries` (type: `array`):

Two-letter country codes (US, GB, DE, JP, VN...), a region like US-CA, or WORLD for worldwide. Every keyword is looked up in every country you list.

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

Same choices as on Google Trends. Shorter ranges give finer points (minutes or hours).

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

Used when Time range is Custom dates. Format: 2025-01-01 2025-06-30

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

Put keywords on the same 0-100 scale in groups of up to 5 (like the comparison on Google Trends). Off: each keyword gets its own scale.

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

Add which regions (or countries, for WORLD) search the keyword most.

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

Level of detail for interest by region.

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

Add the top and rising related searches for each keyword.

## `searchType` (type: `string`):

Which Google search to measure.

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

Google Trends category id, e.g. 71 Food & Drink, 5 Computers & Electronics. 0 means all categories.

## Actor input object example

```json
{
  "keywords": [
    "air fryer",
    "standing desk"
  ],
  "countries": [
    "US"
  ],
  "timeRange": "today 12-m",
  "compareKeywords": false,
  "includeInterestByRegion": false,
  "regionResolution": "auto",
  "includeRelatedQueries": false,
  "searchType": "web",
  "category": 0
}
```

# Actor output Schema

## `keywords` (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": [
        "air fryer",
        "standing desk"
    ],
    "countries": [
        "US"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lieund/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": [
        "air fryer",
        "standing desk",
    ],
    "countries": ["US"],
}

# Run the Actor and wait for it to finish
run = client.actor("lieund/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": [
    "air fryer",
    "standing desk"
  ],
  "countries": [
    "US"
  ]
}' |
apify call lieund/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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