# Google Trends Scraper - Interest, Regions, Related & Trending (`pipiagent/google-trends-scraper`) Actor

Get Google Trends data: interest over time for up to 5 compared terms, interest by country, region, city or metro, related queries (top and rising), and trending searches now with news. Retries and switches address when Google rate-limits.

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

## Pricing

$1.50 / 1,000 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 data from [Google Trends](https://trends.google.com) without copying charts by hand: how search interest in a term changes over time, where people search for it most, which related searches are growing, and what is trending in a country right now. Marketers, SEO teams, journalists, researchers and analysts use it for keyword research, seasonality checks, brand comparisons and content ideas.

- **Four kinds of data in one run.** Interest over time, interest by region, related queries (top and rising) and trending searches with news articles. Pick any combination.
- **Compare up to 5 terms** on the same 0-100 scale, exactly like the Compare button on Google Trends, and run as many comparisons as you like in one run.
- **Handles Google's rate limits.** Google Trends often answers automated traffic with "too many requests". The Actor paces its requests, waits and retries, switches to another address by itself when Google slows it down, keeps everything already collected and tells you exactly which terms to run again.
- **Spreadsheet friendly.** One row per term and data type with summary columns (average, peak, latest value, top region), plus the full detail. English field names, dates in ISO format (UTC).
- **No login, no API key, no proxy setup.**
- **Fair price.** $1.50 per 1,000 results, and one result holds a whole timeline or a whole region table, not one data point.

### What data can you get?

| Data type | One result is | Main fields |
|---|---|---|
| Interest over time | One search term in one location and time range | Average, peak value and date, latest value, step size, full timeline of 0-100 values with dates |
| Interest by region | One search term in one location | Top region, number of regions, every country, state, city or US metro with its 0-100 value |
| Related queries | One search term | Up to 25 top queries with their 0-100 value, up to 25 rising queries with growth % or "Breakout" |
| Trending now | One trending search in one country | Search volume, increase %, start and end time, still trending or not, categories, related searches, up to 5 news articles with picture |

Every keyword result also repeats the settings it was collected with: `searchTerm`, `comparedWith`, `geo`, `timeRange`, the exact `startDate` and `endDate` Google used, `category` and `property` (web, images, news, YouTube or shopping search), and a link to the same view on Google Trends.

### How to use it

1. Click **Try for free**.
2. Type your search terms, one per line. Put up to 5 terms on one line, separated by commas, to compare them.
3. Pick what data you want in **What data to get**, and set the location and time range if you need them.
4. Click **Start**, then download the results as JSON, CSV or Excel.

You can also paste a Google Trends explore URL as a search line. The Actor uses its terms, location, dates and category.

### Input examples

Compare three brands in the United States over the past 5 years, with regional interest:

```json
{
    "searchTerms": ["nike, adidas, puma"],
    "dataTypes": ["interestOverTime", "interestByRegion"],
    "geos": ["US"],
    "timeRange": "past5Years"
}
```

Seasonality of several products, each on its own scale, for a custom date range in the Food & Drink category:

```json
{
    "searchTerms": ["iced coffee", "hot chocolate", "matcha"],
    "dataTypes": ["interestOverTime", "relatedQueries"],
    "timeRange": "custom",
    "startDate": "2023-01-01",
    "endDate": "2024-12-31",
    "category": 71
}
```

City level interest on YouTube search in Japan:

```json
{
    "searchTerms": ["ラーメン"],
    "dataTypes": ["interestByRegion"],
    "geos": ["JP"],
    "property": "youtube",
    "regionLevel": "city"
}
```

What is trending right now in three countries, sports only, sorted by search volume:

```json
{
    "dataTypes": ["trendingNow"],
    "trendingGeos": ["US", "GB", "IN"],
    "trendingHours": "24",
    "trendingCategories": ["Sports"],
    "trendingSortBy": "searchVolume",
    "maxTrendingPerCountry": 25
}
```

### Output examples

Interest over time (the `timeline` is shortened here, a 12 month run has 53 weekly points):

```json
{
    "type": "interestOverTime",
    "searchTerm": "coffee",
    "comparedWith": ["tea"],
    "geo": "worldwide",
    "geoName": "Worldwide",
    "timeRange": "past12Months",
    "startDate": "2025-10-27",
    "endDate": "2026-10-27",
    "category": 0,
    "categoryName": "All categories",
    "property": "web",
    "resolution": "WEEK",
    "averageInterest": 75,
    "peakInterest": 100,
    "peakDate": "2026-05-03T00:00:00Z",
    "latestInterest": 57,
    "latestDate": "2026-10-18T00:00:00Z",
    "firstInterest": 55,
    "dataPoints": 53,
    "timeline": [
        {"date": "2025-10-26T00:00:00Z", "value": 55, "isPartial": false},
        {"date": "2025-11-02T00:00:00Z", "value": 62, "isPartial": false},
        {"date": "2025-11-09T00:00:00Z", "value": 68, "isPartial": false}
    ],
    "url": "https://trends.google.com/trends/explore?date=today+12-m&q=coffee%2Ctea",
    "scrapedAt": "2026-10-27T22:05:48Z"
}
```

Interest by region (shortened, this one listed 56 countries):

```json
{
    "type": "interestByRegion",
    "searchTerm": "coffee",
    "comparedWith": ["tea"],
    "geo": "worldwide",
    "timeRange": "past12Months",
    "regionLevel": "country",
    "topRegion": "Singapore",
    "topRegionCode": "SG",
    "regionCount": 56,
    "regions": [
        {"geoCode": "SG", "geoName": "Singapore", "value": 100},
        {"geoCode": "SH", "geoName": "St. Helena", "value": 88},
        {"geoCode": "AU", "geoName": "Australia", "value": 87}
    ],
    "url": "https://trends.google.com/trends/explore?date=today+12-m&q=coffee",
    "scrapedAt": "2026-10-27T22:05:49Z"
}
```

Related queries (shortened, 25 top and 25 rising):

```json
{
    "type": "relatedQueries",
    "searchTerm": "coffee",
    "geo": "worldwide",
    "timeRange": "past12Months",
    "topCount": 25,
    "risingCount": 25,
    "top": [
        {"query": "coffee shop", "value": 100, "url": "https://trends.google.com/trends/explore?q=coffee+shop&date=today+12-m"},
        {"query": "coffee table", "value": 94, "url": "https://trends.google.com/trends/explore?q=coffee+table&date=today+12-m"}
    ],
    "rising": [
        {"query": "how to remove coffee stain from carpet", "growthPercent": 7950, "growthText": "Breakout", "isBreakout": true, "url": "https://trends.google.com/trends/explore?q=how+to+remove+coffee+stain+from+carpet&date=today+12-m"},
        {"query": "how to brew pour over coffee", "growthPercent": 7150, "growthText": "Breakout", "isBreakout": true, "url": "https://trends.google.com/trends/explore?q=how+to+brew+pour+over+coffee&date=today+12-m"}
    ],
    "scrapedAt": "2026-10-27T22:05:51Z"
}
```

A trending search:

```json
{
    "type": "trendingNow",
    "title": "susan saint james",
    "rank": 2,
    "geo": "US",
    "geoName": "United States",
    "searchVolume": 200000,
    "searchVolumeText": "200K+",
    "increasePercent": 1000,
    "startedAt": "2026-10-27T13:30:00Z",
    "endedAt": null,
    "isActive": true,
    "categories": ["Entertainment"],
    "relatedQueries": ["susan st james", "dick ebersol", "kate and allie", "jane curtin"],
    "timeWindowHours": 24,
    "url": "https://trends.google.com/trends/explore?q=susan+saint+james&date=now+1-d&geo=US",
    "picture": "https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcTzadYc2xDz--qyHNNsMv_MPsot657dCHBn4-oQaHcoI166wXBBCXoellKcf8I",
    "newsArticles": [
        {
            "title": "Susan Saint James, Emmy-winning actor of ‘McMillan & Wife’ and ‘Kate & Allie,’ dies at 80",
            "url": "https://www.cnn.com/2026/10/27/entertainment/susan-saint-james-death",
            "source": "CNN",
            "publishedAt": "2026-10-27T16:32:09Z",
            "picture": "https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcTzadYc2xDz--qyHNNsMv_MPsot657dCHBn4-oQaHcoI166wXBBCXoellKcf8I"
        }
    ],
    "scrapedAt": "2026-10-27T21:48:55Z"
}
```

In CSV and Excel exports the `timeline`, `regions`, `top` and `rising` lists become numbered columns (for example `timeline/0/date`, `timeline/0/value`). The summary columns are always there for quick sorting and filtering.

### How much does it cost?

You pay per saved result: **$1.50 per 1,000 results** ($0.0015 each). There is no start fee and no monthly rental.

One search term gives one result per data type you pick. A 5 year timeline with 260 weekly values is still one result.

| Run | Results | Cost |
|---|---|---|
| 1 comparison of 5 terms, interest over time only | 5 | $0.0075 |
| 20 terms, interest over time + by region + related queries | 60 | $0.09 |
| Trending now, 50 searches in each of 10 countries | 500 | $0.75 |
| The prefilled example (2 terms, 3 data types, 20 trending searches) | 26 | $0.04 |

Terms for which Google has no data produce no result and cost nothing. Set a maximum charge per run in the run options and the Actor stops when it is reached.

### Limits you should know

- **Google rate-limits Google Trends heavily, and sometimes blocks it completely for a while.** This is the main reason Google Trends scrapers fail, and this Actor is not immune. It sends about one request per second, retries with growing pauses and moves to other addresses when Google refuses one. In our tests most keyword runs finished with full data, but at busy times Google refused every address the Actor could use for tens of minutes, and keyword runs started in that window failed. A search group is given up after about 90 seconds of refusals; the run then continues, keeps everything already saved and lists what failed in the status message. If two groups in a row fail, the Actor stops early instead of using your time. If that happens, start the run again later. **Trending now uses a different Google service and worked in every test, even while keyword data was blocked.** Very large runs (hundreds of terms) are more likely to hit a block; split them into several smaller runs.
- **A made-up or misspelled term can look like a block.** In our tests Google answered a random letter string with "too many requests" instead of "no data", and the next requests from the same addresses were refused too. Check spelling before large runs.
- **Values are relative, not search counts.** Google scales every chart so that its highest point is 100. Values from different runs or different comparison groups are not on the same scale. Only terms on the same line are compared on one scale.
- **Google samples its data.** Running the same query twice can give values that differ by a few points. This is how Google Trends works, not an error.
- **The last point of a timeline is often incomplete.** It is marked with `isPartial: true` and is not used for `latestInterest`.
- **Related topics are not included.** Google currently returns an empty related topics list to automated visitors, so the Actor does not offer it.
- **Related queries need enough search volume.** Rare terms, small regions and short time ranges often have no related queries. You are not charged when nothing is found.
- **Metro areas exist only for the United States.** City level data is often empty, especially for worldwide searches; the Actor then falls back to the default level (countries or subregions) and says so in the log.
- **Trending now covers what Google lists for the chosen window**: usually several hundred searches per day for big countries, fewer for small ones. Search volumes are Google's rounded buckets (for example 200K+). There is no worldwide trending list.

### Tips

- **Compare on one line, track on separate lines.** Terms on the same line share one scale, which is what you want for "which brand is bigger". Terms on separate lines each get their own 0-100 scale, which shows the shape of each trend more clearly.
- **Use a category** when a word has several meanings, for example "jaguar" in Autos & Vehicles (47) instead of animals. The category id is the `cat=` number in any Google Trends URL.
- **Run it on a schedule.** Trending now changes every hour. A daily run of the same terms builds your own history.
- **Add several locations** to run the same terms in many countries in one go.

### FAQ

**Is it legal?** The Actor only reads data that Google Trends shows to every visitor without logging in. It does not collect personal data. Check Google's terms and your local rules for how you use the data.

**Why is my value 0?** Google shows 0 when there is not enough search volume for that time or place, not when nobody searched.

**Can I get exact search volumes?** No. Google Trends only publishes relative values (0-100) for keywords and rounded volume buckets for trending searches.

**Something is broken or missing?** Open a ticket in the Issues tab. Issues are usually answered within a day.

# Actor input Schema

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

One line per search. To compare up to 5 terms on the same 0-100 scale (like the Compare button on Google Trends), put them on one line separated by commas, for example "coffee, tea". You can also paste a Google Trends explore URL; its location, dates and category are used for that line.

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

Pick any combination. Each search term gives one result per data type. Trending now does not need search terms.

## `geos` (type: `array`):

Leave empty for worldwide. Otherwise a 2-letter country code (US, GB, DE, JP), a region (US-CA, GB-ENG) or a US metro (US-CA-807). With several locations, every search line runs once per location.

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

Period to look at. Google picks the step size: minutes for the past hour, hours for the past day, days for up to 90 days, weeks for 12 months to 5 years, months for 2004 to now.

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

Only used when Time range is "Custom dates". Format YYYY-MM-DD, not before 2004-01-01.

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

Only used when Time range is "Custom dates". Format YYYY-MM-DD. Leave empty for today.

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

Google Trends category id to narrow the meaning of a term. 0 = all categories. Common ids: 3 Arts & Entertainment, 47 Autos & Vehicles, 44 Beauty & Fitness, 12 Business & Industrial, 5 Computers & Electronics, 7 Finance, 71 Food & Drink, 8 Games, 45 Health, 11 Home & Garden, 958 Jobs & Education, 16 News, 29 Real Estate, 174 Science, 18 Shopping, 20 Sports, 67 Travel. The id is the cat= number in a Google Trends URL.

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

Which Google search to measure, like the "Web search" menu on Google Trends.

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

The run stops after saving this many results (all data types together).

## `regionLevel` (type: `string`):

Interest by region only. Automatic gives countries for worldwide searches and states or provinces for a country. Cities works for most locations. Metro areas (DMA) exist only for the United States.

## `includeLowVolumeRegions` (type: `boolean`):

Also list regions where Google has too little search volume (they get the value 0).

## `trendingGeos` (type: `array`):

Countries (or regions like US-CA) to get current trending searches for. Defaults to US.

## `trendingHours` (type: `string`):

Searches that started trending within this window.

## `maxTrendingPerCountry` (type: `integer`):

Google lists up to several hundred trending searches per country for 24 hours.

## `trendingSortBy` (type: `string`):

Relevance is the order Google shows on the Trending now page.

## `trendingCategories` (type: `array`):

Keep only trending searches in these categories. Leave empty for all.

## `trendingActiveOnly` (type: `boolean`):

Skip searches that Google marks as no longer trending.

## `includeTrendingNews` (type: `boolean`):

Add up to 5 news articles (title, link, source, time, picture) that Google shows for each trending search.

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

Optional. The Actor works without a proxy and switches to Apify's datacenter proxy by itself if Google rate-limits the server. Set a proxy here only if runs keep failing.

## Actor input object example

```json
{
  "searchTerms": [
    "coffee, tea",
    "bitcoin, ethereum, solana",
    "running shoes"
  ],
  "dataTypes": [
    "interestOverTime",
    "interestByRegion",
    "relatedQueries",
    "trendingNow"
  ],
  "geos": [
    "US",
    "GB"
  ],
  "timeRange": "past12Months",
  "category": 0,
  "property": "web",
  "maxItems": 1000,
  "regionLevel": "auto",
  "includeLowVolumeRegions": false,
  "trendingGeos": [
    "US"
  ],
  "trendingHours": "24",
  "maxTrendingPerCountry": 20,
  "trendingSortBy": "relevance",
  "trendingActiveOnly": false,
  "includeTrendingNews": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Interest over time, interest by region, related queries and trending searches saved by the run, one item per result.

# 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": [
        "coffee, tea"
    ],
    "dataTypes": [
        "interestOverTime",
        "interestByRegion",
        "relatedQueries",
        "trendingNow"
    ],
    "timeRange": "past12Months",
    "trendingGeos": [
        "US"
    ],
    "maxTrendingPerCountry": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("pipiagent/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": ["coffee, tea"],
    "dataTypes": [
        "interestOverTime",
        "interestByRegion",
        "relatedQueries",
        "trendingNow",
    ],
    "timeRange": "past12Months",
    "trendingGeos": ["US"],
    "maxTrendingPerCountry": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("pipiagent/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": [
    "coffee, tea"
  ],
  "dataTypes": [
    "interestOverTime",
    "interestByRegion",
    "relatedQueries",
    "trendingNow"
  ],
  "timeRange": "past12Months",
  "trendingGeos": [
    "US"
  ],
  "maxTrendingPerCountry": 20
}' |
apify call pipiagent/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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