# Google Trends Scraper (`blueloles/google-trends-scraper`) Actor

Google Trends API alternative: interest over time, by region and city, related and Breakout queries, and today's trending searches. Blocked requests retry on fresh IPs. Pay only for terms that return data.

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

## Pricing

from $1.00 / 1,000 search terms

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 data from [Google Trends](https://trends.google.com/) for any keyword, country and time range. It works as a **Google Trends API**, which Google doesn't otherwise offer to the public. You get **interest over time**, **interest by region and city**, **related and rising queries** (including Breakout searches) and today's **trending searches**, as JSON, CSV or Excel.

It is also a maintained **pytrends alternative**: the popular pytrends Python library has been archived and no longer gets fixes when Google changes Trends.

Google throttles automated Trends traffic hard. This scraper retries every throttled request on a fresh IP address, so **one blocked term never fails your whole run**, and **you pay only for search terms that return data**.

### Why scrape Google Trends?

Google Trends shows what people are searching for, and how that changes over time and between places. Common uses:

- 📈 **SEO and content planning:** find rising queries before they peak and compare keyword demand across countries.
- 🛒 **E-commerce and product research:** spot seasonal demand and compare brands or products.
- 💹 **Market and investment research:** use search interest as a signal for companies, coins or consumer trends.
- 📰 **Newsrooms and social media teams:** track what is trending right now in each country.
- 🎓 **Academic research:** download long time series (back to 2004) for many terms without clicking through the website.

What this Actor adds on top of the Google Trends website:

- **Bulk keywords:** scrape hundreds of terms in one run, each on its own 0-100 scale, or **compare up to 5 terms** on a shared scale exactly as the website does.
- **Headline numbers per term:** average interest, peak and peak date, latest value, and trend change between the start and end of the period, ready to sort in a spreadsheet.
- **Every Google search type:** web, image, news, Google Shopping and YouTube search.
- **Region, city and US metro (DMA) breakdowns.**
- **Spreadsheet-ready views:** one row per date, per region or per rising query, without writing code.
- **Built for reliability:** browser-grade connections, automatic retries on new IPs with backoff, and residential proxy fallback when Google keeps blocking.
- All Apify platform features: **scheduling**, **API access**, **integrations** (Google Sheets, Slack, Zapier, Make, webhooks) and **monitoring**.

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

| Field | Description |
| --- | --- |
| `searchTerm` | The keyword or topic you entered |
| `averageInterest`, `peakInterest`, `peakDate`, `latestInterest` | Headline numbers for the period (0-100 scale) |
| `trendChangePercent` | How much interest grew or fell from the first to the last quarter of the period |
| `interestOverTime` | Interest for every hour, day, week or month in the period |
| `interestByRegion` | Countries, regions, cities or US metros ranked by interest |
| `relatedQueriesTop` | The most popular related searches |
| `relatedQueriesRising` | The fastest-growing related searches, with growth in percent and Breakout flags |
| `relatedTopicsTop`, `relatedTopicsRising` | Related topics, when Google provides them |
| `exploreUrl` | Link to the same search on Google Trends, to check any row by eye |
| `trendingSearch`, `approxTraffic`, `newsArticles` | Trending now: today's trending searches, search volume estimates and linked news stories |

### How to scrape Google Trends

1. Click **Try for free** to open the Actor in Apify Console (a free account is enough).
2. Under **What to scrape**, keep **Search terms**, or choose **Trending now** for today's trending searches.
3. Enter your keywords, one per line.
4. Pick a **Time range**, **Location**, and optionally a **Category** or **Search type** such as YouTube.
5. Click **Start** and wait for the run to finish. Most runs take a few seconds per keyword.
6. Open the **Output** tab and choose a view (Overview, Interest over time, Interest by region, Rising queries), then export as CSV, Excel or JSON.

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

This Actor uses **pay per event** pricing. You pay only for search terms that return data. Terms where Google has no data, or that fail, are **free**. Platform usage (servers and proxies) is included in the price, and the start fee is a negligible $0.00005 per run.

| Your Apify plan | Price per 1,000 search terms |
| --- | --- |
| Free | $2.50 |
| Starter (Bronze) | $1.50 |
| Scale (Silver) and higher | $1.00 |

**Trending now** mode costs **$0.50 per 1,000 trending searches** on every plan.

A search term includes everything you switch on for it: interest over time, region breakdown and related queries. Apify's Free plan includes monthly credits that cover roughly **2,000 search terms a month**. You can set a maximum cost per run in the run options, and the Actor stops cleanly when it is reached.

### Input

See the **Input** tab for every option. Some notes:

- **Search terms** can be plain keywords or Google topic IDs such as `/m/05p0rrx` (Bitcoin the currency). Topics combine spellings and languages; keywords match the exact text.
- **Compare terms on one scale**: off by default, so every term gets its own 0-100 scale, which is best for bulk research. Turn it on to compare terms against each other. Terms are grouped in fives, the most Google allows on one scale, so values are only comparable within a group.
- **Time range** accepts presets (`now 7-d`, `today 12-m`, `today 5-y`, `all`) or custom ranges such as `2024-01-01 2024-06-30`, or `2024-06-01T00 2024-06-05T23` for hourly data. Google picks the bucket size, from one minute for the past hour, through days for a few months and weeks for 5 years, to one month for 2004 to present. `timeResolution` in each row tells you which one you got.
- **Location** takes a country or a region code you type, such as `US-CA` or `GB-ENG`.

Example input:

```json
{
    "searchTerms": ["electric car", "hybrid car", "heat pump"],
    "timeRange": "today 5-y",
    "geo": "US",
    "includeRelatedQueries": true
}
```

### Output

You can download the dataset in various formats such as **JSON, HTML, CSV, or Excel**. Each search term is one row (shortened here):

```json
{
    "resultType": "searchTerm",
    "searchTerm": "bitcoin",
    "status": "ok",
    "geo": "US",
    "timeRange": "today 3-m",
    "resolvedTimeRange": "2026-08-01 2026-11-01",
    "timeResolution": "DAY",
    "averageInterest": 49.29,
    "peakInterest": 100,
    "peakDate": "2026-08-21",
    "latestInterest": 44,
    "trendChangePercent": -24.6,
    "interestOverTime": [
        { "date": "2026-08-01", "value": 51, "hasData": true, "isPartial": false },
        { "date": "2026-08-02", "value": 47, "hasData": true, "isPartial": false }
    ],
    "interestByRegion": [
        { "geoCode": "US-KS", "geoName": "Kansas", "value": 100 },
        { "geoCode": "US-NV", "geoName": "Nevada", "value": 67 }
    ],
    "relatedQueriesTop": [
        { "query": "bitcoin price", "value": 100, "formattedValue": "100", "isBreakout": false }
    ],
    "relatedQueriesRising": [
        { "query": "british man recovers lost bitcoin", "value": 13000, "formattedValue": "Breakout", "isBreakout": true }
    ],
    "exploreUrl": "https://trends.google.com/trends/explore?q=bitcoin&date=today+3-m&geo=US"
}
```

In **Trending now** mode, each trending search is one row:

```json
{
    "resultType": "trendingSearch",
    "geo": "US",
    "rank": 1,
    "trendingSearch": "example trending topic",
    "approxTraffic": "2000+",
    "approxTrafficNumber": 2000,
    "publishedAt": "2026-11-01T18:10:00Z",
    "newsArticles": [
        { "title": "Example headline", "url": "https://example.com/news/story", "source": "Example News" }
    ]
}
```

Use the **Interest over time** view, or the API link in the **Output** tab, to get one row per term per date for charts and spreadsheets.

### Get Google Trends data in Python (pytrends alternative)

Install the Apify client with `pip install apify-client`, then:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("blueloles/google-trends-scraper").call(run_input={
    "searchTerms": ["bitcoin", "ethereum"],
    "timeRange": "today 12-m",
    "geo": "US",
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["searchTerm"], row["averageInterest"], row["trendChangePercent"])
```

Moving from pytrends? This is where each pytrends method's data ends up:

| pytrends | This Actor |
| --- | --- |
| `interest_over_time()` | `interestOverTime` (plus `averageInterest`, `peakDate` and `trendChangePercent`) |
| `interest_by_region(resolution=...)` | `interestByRegion`, with **Region level** set to Country, Region, City or Metro (DMA) |
| `related_queries()` | `relatedQueriesTop` and `relatedQueriesRising` |
| `related_topics()` | `relatedTopicsTop` and `relatedTopicsRising` |
| `trending_searches()` / `realtime_trending_searches()` | **Trending now** mode |
| `build_payload(cat=..., gprop=...)` | **Category** and **Search type** inputs |

You get the same data without managing cookies, proxies or HTTP 429 errors yourself.

### Tips for faster and cheaper runs

- Switch off the sections you don't need. Each section is one request to Google, so interest over time alone is the fastest.
- Keep **Parallel requests** between 2 and 5. Going higher makes Google throttle more, and retries cost time.
- Use **Compare terms** only when you need terms on one scale. Independent terms are easier to read and filter.
- Schedule the Actor (for example, daily Trending now for your country) and send results to Google Sheets or Slack through an integration.

### FAQ

#### Is there an official Google Trends API?

Google opened an alpha Trends API to a small number of approved testers, but most people have no access. This Actor reads the same data the Google Trends website shows, with no API key.

#### Does pytrends still work?

The pytrends repository on GitHub has been archived by its owners, and its last release was in April 2023. It no longer receives fixes, so it breaks whenever Google changes Trends or tightens rate limits. This Actor is maintained, retries blocked requests on fresh IP addresses, and runs on Apify's servers, so you don't need your own proxies.

#### Why are some values 0?

Google Trends reports relative interest from 0 to 100, where 100 is the peak for that term, location and period. A 0 means there was too little search volume to report, not necessarily zero searches. The `hasData` field tells the two apart.

#### Why do numbers differ slightly from the website?

Google computes Trends from a sample of searches, so repeated requests can differ by a few points. Comparisons between terms are only valid within the same comparison group.

#### Why are related topics often empty?

Google withholds related topics from automated requests, while related queries still come through. When Google returns topics, the Actor includes them.

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

Google Trends shows aggregated, anonymous search statistics, with no personal data. Our Actors are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. We therefore believe that our Actors, when used for ethical purposes by Apify users, are safe. However, you should be aware that your results could contain personal data. Personal data is protected by the GDPR in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers.

#### Can I use it from my code or an AI agent?

Yes. Every run is available through the Apify API (see the **API** tab for Python, JavaScript and cURL examples), and AI agents can call it through the Apify MCP server.

#### Something went wrong

Check the `status`, `error` and `warnings` fields of the affected rows first. For example, city-level data is not available for every country. If a problem persists, open an issue in the **Issues** tab with your run link and we will look at it.

# Actor input Schema

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

Search terms: interest over time, interest by region, related queries and related topics for your terms. Trending now: today's trending searches in the countries you pick.

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

Keywords to look up, one per line. You can also enter a Google topic ID such as /m/05p0rrx (Bitcoin the currency) to get topic-level data. Duplicates are removed.

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

Off: each term is scraped on its own, so its interest runs from 0 to 100. On: terms are compared in groups of up to 5, as on the Google Trends website, so values are relative to the most popular term in the group.

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

Pick a preset or type a custom range such as 2024-01-01 2024-06-30 (dates) or 2024-06-01T00 2024-06-05T23 (hours, up to 7 days).

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

Country to scope the search to, or Worldwide. You can also type a region code such as US-CA (California) or GB-ENG (England).

## `category` (type: `string`):

Narrows results to searches in one category, which separates meanings (for example, Jaguar the car vs the animal). Pick a top-level category or type any Google Trends category ID.

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

Which Google search to measure.

## `includeInterestOverTime` (type: `boolean`):

Search interest for each date in the time range (0 to 100), plus average, peak, latest value and trend change.

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

Where the term is most popular: countries for worldwide searches, otherwise regions within the location.

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

Top and rising searches related to each term, including Breakout queries that grew more than 5,000%.

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

Top and rising related topics. Google sometimes returns no topics to automated requests; when that happens these lists are empty.

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

Granularity of Interest by region. Automatic uses countries for Worldwide and regions (states, provinces) otherwise. City works for most countries; Metro (DMA) works only for the United States.

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

Also list regions with too little search volume to rank, with a value of 0.

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

Two-letter country codes for Trending now mode, for example US, IN, GB. Used only when What to scrape is Trending now.

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

Language for labels and related topic names, as a code such as en-US, de or ja.

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

How many requests run at once, each from its own IP address. Higher is faster but more likely to be throttled by Google.

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

How many times a throttled request is retried on a new IP address before the term is marked failed.

## `requestDelaySecs` (type: `number`):

Minimum pause between requests from the same worker. Lower is faster but more likely to be throttled.

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

Google throttles repeated requests from one IP address, so a proxy is strongly recommended.

## `residentialFallback` (type: `boolean`):

When Google keeps blocking the selected proxy, switch that worker to Apify residential proxies.

## Actor input object example

```json
{
  "mode": "searchTerms",
  "searchTerms": [
    "web scraping",
    "data extraction"
  ],
  "compareTerms": false,
  "timeRange": "today 12-m",
  "geo": "",
  "category": "0",
  "searchProperty": "",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "includeRelatedQueries": true,
  "includeRelatedTopics": true,
  "regionResolution": "AUTO",
  "includeLowVolumeRegions": false,
  "trendingGeos": [
    "US"
  ],
  "language": "en-US",
  "maxConcurrency": 3,
  "maxRetries": 8,
  "requestDelaySecs": 1,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "residentialFallback": true
}
```

# Actor output Schema

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

All rows: search-term results or trending searches.

## `interestOverTime` (type: `string`):

Search interest flattened to one row per term per date.

# 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": [
        "web scraping",
        "data extraction"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("blueloles/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": [
        "web scraping",
        "data extraction",
    ] }

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

```

## MCP server setup

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