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

Get Google Trends data for any keyword: interest over time, interest by country, region or city, and top and rising related queries. Compare up to 5 terms. Automatic retries on fresh IPs.

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

## Pricing

$5.00 / 1,000 result scrapeds

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 any keyword as clean JSON, CSV or Excel:

- **Interest over time** (0–100), with a ready-made summary: average, peak, peak date and latest value
- **Interest by region**: countries, states/provinces, cities or US metro areas
- **Related queries**: top and rising, including "Breakout" queries
- **Comparisons** of up to 5 keywords on the same scale, plus each keyword's share of searches per region

Works for Web, Image, News, Google Shopping and YouTube search, in any location, for any time range from the past hour to 2004.

### Built to be reliable

Google Trends rate-limits automated traffic aggressively. When a request is blocked, this Actor retries automatically on a fresh residential IP with exponential backoff. If a term still fails after every retry, you get a clear `error` message for that term and **you are not charged for it**.

### Use cases

- **SEO and content**: find rising queries before your competitors write about them
- **Market research**: compare brands, products or categories across countries and regions
- **E-commerce**: measure seasonality to plan inventory and campaigns
- **Finance and crypto research**: track public attention around assets and companies
- **Data and AI pipelines**: feed trend data into dashboards, models or agents through the API

### How to use

1. Add your search terms.
2. Choose a location and time range, or leave the defaults (worldwide, past 12 months).
3. Click **Start**. Download the results or connect them to Google Sheets, Make, Zapier, n8n or your own code through the Apify API.

### Input example

```json
{
  "searchTerms": ["bitcoin", "ethereum", "solana"],
  "compareTerms": true,
  "geo": "ES",
  "timeRange": "today 3-m"
}
```

Leave **Location** empty for worldwide data. Use a country code (`US`, `ES`, `AR`) or a region code (`US-CA`). For exact dates, fill in **Custom time range** with `2024-01-01 2024-12-31`.

### Output example

One result per search term (lists shortened):

```json
{
  "searchTerm": "bitcoin",
  "geo": "ES",
  "timeRange": "today 3-m",
  "property": "web",
  "category": 0,
  "summary": {
    "averageInterest": 48.5,
    "peakInterest": 100,
    "peakDate": "2026-08-21T00:00:00Z",
    "latestInterest": 32
  },
  "interestOverTime": [
    { "date": "2026-07-03T00:00:00Z", "value": 54, "isPartial": false },
    { "date": "2026-07-04T00:00:00Z", "value": 50, "isPartial": false }
  ],
  "interestByRegion": [
    { "geoCode": "ES-RI", "geoName": "La Rioja", "value": 100 },
    { "geoCode": "ES-NC", "geoName": "Navarre", "value": 82 }
  ],
  "shareByRegion": [
    { "geoCode": "ES-ML", "geoName": "Melilla", "value": 100 },
    { "geoCode": "ES-CE", "geoName": "Ceuta", "value": 100 }
  ],
  "relatedQueries": {
    "top": [
      { "query": "bitcoin precio", "value": 100 },
      { "query": "bitcoin price", "value": 35 }
    ],
    "rising": [
      { "query": "how to buy bitcoin safely", "value": 750, "formattedValue": "+750%" },
      { "query": "bitcoin koers dollar", "value": 160, "formattedValue": "+160%" }
    ]
  },
  "comparedWith": ["ethereum", "solana"],
  "scrapedAt": "2026-10-03T23:35:34Z"
}
```

`shareByRegion` and `comparedWith` appear only when **Compare terms** is on.

### Pricing

You pay per search term that returns data. Failed terms are free. See the **Pricing** tab for the current price.

### FAQ

**Are these absolute search volumes?**
No. Google Trends values are relative: 100 is the peak of interest for the selected terms, location and period, and every other value is scaled against it. That is also why a term gets different numbers when compared with others than when analyzed alone.

**How many terms can I run?**
As many as you want per run. In comparison mode Google allows up to 5 terms at once.

**Why residential proxies?**
Google blocks datacenter IPs quickly. Residential proxies are the default and keep runs reliable.

**Is it legal to scrape Google Trends?**
This Actor collects publicly available, aggregated and anonymous statistics; it does not collect personal data. You are responsible for how you use the data. If in doubt, consult a lawyer about your use case.

**Want to see the ads behind a trend?**
Try the [Google Ads Transparency Scraper](https://apify.com/agusgueglio14/google-ads-transparency-scraper) to get every ad a brand or website runs on Google Search, YouTube and more.

**Something doesn't work?**
Open an issue in the **Issues** tab with the input you used. Fixes are usually quick.

# Actor input Schema

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

Keywords to look up on Google Trends. Each term is returned as its own result.

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

Put all terms (max 5) on the same 0-100 scale, like the comparison view on trends.google.com. Also adds each term's share of searches per region. When off, each term is scaled on its own.

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

Country or region code, e.g. US, ES, AR, GB or US-CA. Leave empty for worldwide.

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

Period to analyze. Ignored if you fill in a custom time range.

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

Exact dates as "YYYY-MM-DD YYYY-MM-DD", e.g. "2024-01-01 2024-12-31". Overrides the time range above.

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

Which Google search to analyze.

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

Google Trends category to narrow results (0 = all categories). The ID is the `cat` parameter in a trends.google.com URL.

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

Time series of search interest (0-100), plus average, peak and latest values.

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

Search interest per country, region or city.

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

Top and rising related searches, including breakout queries.

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

Level of detail for interest by region. Automatic uses countries for worldwide and subregions for a country. Metro areas (DMA) work for the US only. Google has little city-level data: if cities come back empty, turn on 'Include low search volume regions'.

## `includeLowSearchVolumeRegions` (type: `boolean`):

Also return regions where Google has little data.

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

Language for region and topic names, e.g. en-US, es-ES, de.

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

How many times to retry on a new IP when Google blocks or rate-limits a request.

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

How many terms to process in parallel.

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

Google Trends blocks datacenter IPs quickly, so residential proxies are recommended.

## Actor input object example

```json
{
  "searchTerms": [
    "bitcoin",
    "ethereum"
  ],
  "compareTerms": false,
  "timeRange": "today 12-m",
  "property": "web",
  "category": 0,
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "includeRelatedQueries": true,
  "regionResolution": "AUTO",
  "includeLowSearchVolumeRegions": false,
  "language": "en-US",
  "maxRetries": 6,
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

One row per search term with average, peak and latest interest.

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

Interest over time, interest by region and related queries for each search term.

# 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"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

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

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

```

## MCP server setup

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