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

Google Trends scraper: get interest over time, interest by country or region, and top and rising related queries for any search term. Any country, time range, category or Google property (web, YouTube, news, images, shopping). No login, no API key.

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

## Pricing

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

![banner](https://anyx.solutions/banners/google-trends-scraper.png)

## Google Trends Scraper

**Interest over time, interest by region and top and rising related queries for any search term, as clean JSON.**

This Google Trends scraper turns Google Trends into a dataset you can use in a spreadsheet, a dashboard or a pipeline. Give it search terms (or paste explore links from trends.google.com) and it returns, for each term, the interest-over-time series, the interest by country or subregion, and the top and rising related queries. Pick any country, time range, category and Google property: web, image, news and YouTube search or Google Shopping. It is built for marketers, SEO and content teams, e-commerce sellers, analysts and researchers who track demand, seasonality and emerging topics. No login and no API key.

### ⚡ Quick start

```json
{
  "searchTerms": ["coffee", "matcha"],
  "geo": "US",
  "timeRange": "today 12-m",
  "maxItems": 5
}
```

### 🧩 Input

| Field                     | Type    | Required | Default                      | Description                                                                                                                                                           |
| ------------------------- | ------- | -------- | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `searchTerms`             | array   | no       | —                            | Terms to look up, one per line. Each term is its own search, scaled to its own peak (0 to 100).                                                                       |
| `startUrls`               | array   | no       | —                            | Explore URLs copied from trends.google.com. Their own country, time range, category and property are used. A comparison (`q=tea,coffee`) becomes one search per term. |
| `geo`                     | string  | no       | `""`                         | Country or region code, such as `US`, `GB`, `DE` or `US-CA`; empty is worldwide.                                                                                      |
| `timeRange`               | string  | no       | `today 12-m`                 | Past hour, 4 hours, day, 7 days, 30 days, 90 days, 12 months, 5 years or `all` (2004 to present). A custom range is accepted as `YYYY-MM-DD YYYY-MM-DD`.              |
| `category`                | integer | no       | `0`                          | Google Trends category ID (0 is all categories; 71 is Food & Drink).                                                                                                  |
| `property`                | string  | no       | `""`                         | Empty is web search, or `images`, `news`, `froogle` (Google Shopping) or `youtube`.                                                                                   |
| `includeInterestByRegion` | boolean | no       | `true`                       | Add interest by country (worldwide) or by subregion (within a country).                                                                                               |
| `includeRelatedQueries`   | boolean | no       | `true`                       | Add the top and rising related queries.                                                                                                                               |
| `maxItems`                | integer | no       | —                            | Maximum searches in a run. Each search term is one search and one dataset item.                                                                                       |
| `proxyConfiguration`      | object  | no       | `{ "useApifyProxy": false }` | Proxy settings. For long lists of terms, a proxy spreads the requests over more IPs.                                                                                  |

Either `searchTerms` or `startUrls` is needed.

### 📤 Output

One dataset item per search term. Interest values are Google's own relative scale: 100 is the peak for that term, region or period, not an absolute search count.

#### Fields

| Field              | Type    | Description                                                                                       |
| ------------------ | ------- | ------------------------------------------------------------------------------------------------- |
| `searchTerm`       | string  | The term searched.                                                                                |
| `geo`              | string  | Country or region code; empty for worldwide.                                                      |
| `timeRange`        | string  | Time range covered.                                                                               |
| `category`         | integer | Category ID.                                                                                      |
| `property`         | string  | Google property; empty for web search.                                                            |
| `url`              | string  | The Google Trends explore page these numbers come from.                                           |
| `resolution`       | string  | Granularity of the series (for example `WEEK` or `DAY`), chosen by Google for the range.          |
| `interestOverTime` | array   | Points with `date`, `period`, `value` (0 to 100) and `isPartial`.                                 |
| `interestByRegion` | array   | Regions with `geoCode`, `geoName` and `value` (0 to 100). Null when switched off.                 |
| `relatedQueries`   | object  | `top` and `rising` lists of `query`, `value`, `formattedValue` and `url`. Null when switched off. |

<details><summary>Example output</summary>

```json
{
  "searchTerm": "matcha",
  "geo": "",
  "timeRange": "today 12-m",
  "category": 0,
  "property": "",
  "url": "https://trends.google.com/trends/explore?q=matcha&date=today+12-m&hl=en-US",
  "resolution": "WEEK",
  "interestOverTime": [
    {
      "date": "2025-11-02T00:00:00.000Z",
      "period": "Nov 2 – 8, 2025",
      "value": 68,
      "isPartial": false
    }
  ],
  "interestByRegion": [
    { "geoCode": "SG", "geoName": "Singapore", "value": 100 },
    { "geoCode": "PH", "geoName": "Philippines", "value": 75 }
  ],
  "relatedQueries": {
    "top": [
      {
        "query": "matcha latte",
        "value": 100,
        "formattedValue": "100",
        "url": "https://trends.google.com/trends/explore?q=matcha+latte&date=today+12-m"
      }
    ],
    "rising": [
      {
        "query": "alpro matcha",
        "value": 600,
        "formattedValue": "+600%",
        "url": "https://trends.google.com/trends/explore?q=alpro+matcha&date=today+12-m"
      }
    ]
  }
}
```

</details>

### 💡 Use cases

- Spot seasonality and plan campaigns, stock and content around when demand peaks.
- Find rising and breakout queries to catch new products and topics early.
- Compare interest across countries or regions to choose where to launch.
- Feed keyword research and SEO reports with related queries for each term.
- Track a list of brands or products week after week in a dashboard.

### ❓ FAQ

- **Do I need a proxy?** Small runs work without one. For long lists of terms, turn on a proxy to avoid Google's rate limits.
- **Are the numbers search volumes?** No. Google Trends reports relative interest from 0 to 100, scaled to the peak of each term. A small region can show 100 because it is the highest for that term.
- **What is a breakout query?** A rising query whose growth is above 5,000%; Google shows it as "Breakout".
- **Can I compare terms?** Each term is scaled to its own peak, so values are not comparable across terms. A comparison link is split into one search per term.
- **Why did a run return fewer items than expected?** Google rate-limits bursts of requests. Lower the number of terms per run or enable a proxy.

### 🔗 More scrapers by Anyx

- [Google Search Scraper](https://apify.com/anyxsolutions/google-search-scraper)
- [Google News Scraper](https://apify.com/anyxsolutions/google-news-scraper)
- [Google Ads Scraper](https://apify.com/anyxsolutions/google-ads-scraper)
- [Bing Search Scraper](https://apify.com/anyxsolutions/bing-search-scraper)
- [Google Play Scraper](https://apify.com/anyxsolutions/google-play-scraper)

### 🤝 Anyx Solutions

We build custom scrapers and data-extraction pipelines.

- Email: tantosthor@gmail.com

### 🖼 Image credit

Image credit: [trends.google.com](https://trends.google.com/)

# Actor input Schema

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

Terms to look up, one per line, for example coffee or matcha. Each term is its own search, scaled to its own peak (0–100). The filters below apply to every term.

## `startUrls` (type: `array`):

Explore URLs copied from trends.google.com (for example https://trends.google.com/trends/explore?q=coffee\&geo=US\&date=today%205-y). Their own country, time range, category and property are used. A comparison (q=tea,coffee) becomes one search per term.

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

Country or region code for search terms, for example US, GB, DE or US-CA. Leave empty for worldwide.

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

Period to cover for search terms. A custom range is also accepted as "YYYY-MM-DD YYYY-MM-DD".

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

Google Trends category ID for search terms (0 is all categories; e.g. 71 is Food & Drink). The ID is the cat= value in an explore URL.

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

Which Google search the interest is measured on, for search terms.

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

Add interest by country (worldwide) or by subregion (within a country).

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

Add the top and rising related queries for each search term.

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

Maximum number of searches in a run. Each search term (and each term in an explore URL) is one search and one dataset item.

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

Proxy settings. Small runs need none; for long lists of terms, a proxy spreads the requests over more IPs and avoids Google's rate limits.

## Actor input object example

```json
{
  "searchTerms": [
    "coffee",
    "matcha"
  ],
  "timeRange": "today 12-m",
  "category": 0,
  "includeInterestByRegion": true,
  "includeRelatedQueries": true,
  "maxItems": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (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 = {
    "searchTerms": [
        "coffee",
        "matcha"
    ],
    "maxItems": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("anyxsolutions/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",
        "matcha",
    ],
    "maxItems": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("anyxsolutions/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",
    "matcha"
  ],
  "maxItems": 5
}' |
apify call anyxsolutions/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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