# Google Trends Scraper & API - Interest, Queries, Trending Now (`despottt/google-trends-scraper`) Actor

Scrape Google Trends without the official API: interest over time, interest by region and related queries (top and rising) for any keyword, country and time range. Compare up to 5 keywords across Web, YouTube, News, Images and Shopping, plus Trending now searches with news.

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

## Pricing

from $2.00 / 1,000 keyword results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 & API: Interest Over Time, by Region, Related Queries & Trending Now

**Get Google Trends data as clean JSON, CSV or Excel without the official API: interest over time, interest by region, related queries and today's trending searches.**

Pass keywords or Google Trends URLs and get **interest over time**, **interest by region** and **related queries** (top and rising, with Breakout values). You can also pull **Trending now** searches for any country, each with its search volume, breakdown queries and news articles. No browser and no Google account needed. Run it on Apify, call it through the API, or use it as a real-time **Standby** HTTP endpoint.

### What can this Google Trends scraper do?

- 📈 **Interest over time** for any keyword, country, region (e.g. `US-CA`), category and time range. Ranges go from the past hour to 2004–present, and you can set custom dates.
- 🗺️ **Interest by region** at country, region, metro (DMA) or city level.
- 🔎 **Related queries**, both top and rising. Breakout values are included.
- 🧩 **Related topics** fields are included, but Google currently returns them empty for most automated requests (see Limitations).
- ⚖️ **Compare up to 5 keywords** on the same scale, just like the Trends UI.
- 🌐 **Web, Image, News, Google Shopping and YouTube** search properties.
- 🔥 **Trending now / daily trending searches** for any country, over the past 4h, 24h, 48h or 7 days. Each trend has its volume, % increase, start and end time, categories, trend breakdown and top news articles.
- 🆕 **Only new results** mode for monitoring. Schedule the actor and you only get trends you haven't seen before.
- ⚡ **Standby mode**: call it like a REST API with `GET /?keywords=bitcoin&geo=US` and get results in a few seconds.
- 💸 **Free error rows**: if a keyword has too little search volume, the row is returned with an `error` and you are not charged for it.

### Use cases

- **SEO and content planning**: find rising queries and seasonal peaks before your competitors do.
- **Market and product research**: compare brands, products or categories across countries.
- **Newsrooms and social media teams**: get a feed of what's trending right now, with news links, every hour.
- **Ecommerce**: track demand for products on Google Shopping by region.
- **Finance and crypto**: use search interest as an alternative-data signal (e.g. `bitcoin`, `gold price`).
- **AI agents and LLM pipelines**: pull clean, structured trend data through the API or Standby.

### How to use it

The input is a simple form, no code needed:

1. Type search terms into **🔎 Keywords or topics** (one per line).
2. Pick a **Country** from the dropdown (or 🌍 Worldwide; you can also type a region code such as `US-CA`), a **Time range** and the **Data to collect**. Turn on **Compare keywords on one 0-100 scale** to compare up to 5 terms like in Google Trends.
3. For daily trending searches, open **🔥 Trending now** and pick one or more countries from **Trending now: countries**, plus the period and category.
4. Optional, in **⚙️ More options**: exact **From date** / **To date** pickers, category ID, region detail, Google Trends URLs, limits and connection settings.
5. Click **Start** and download the results from the *Output* tab, or call it through the API or Standby.

### Input example

Use **Explore** inputs (keywords / URLs) and/or **Trending now** inputs (countries). Example:

```json
{
  "keywords": ["matcha", "coffee"],
  "compareKeywords": false,
  "geo": "US",
  "timeRange": "past_5y",
  "dataTypes": ["interestOverTime", "interestByRegion", "relatedQueries", "relatedTopics"],
  "trendingGeos": ["US", "IT"],
  "trendingHours": "24",
  "maxTrendingPerGeo": 20,
  "includeTrendingNews": true
}
```

| Field | Description |
|---|---|
| `keywords` | Search terms. Each one gives one result row, unless `compareKeywords` is on. |
| `startUrls` | Google Trends Explore or Trending URLs. Their parameters (q, geo, date, cat, gprop) are used. |
| `compareKeywords` | Compares up to 5 keywords together on the same 0–100 scale. |
| `geo` | Country or region code (`US`, `GB`, `US-CA`), or empty for worldwide. |
| `timeRange` | `past_hour`, `past_4h`, `past_day`, `past_7d`, `past_30d`, `past_90d`, `past_12m`, `past_5y` or `all`. For exact dates use `dateFrom` / `dateTo` (`2025-01-01`, `2025-06-30`); the older `customTimeRange` (`2025-01-01 2025-06-30`) still works. |
| `category` | Google Trends category ID (0 = all). |
| `property` | `web`, `images`, `news`, `froogle` (Shopping) or `youtube`. |
| `dataTypes` | Which Explore datasets to fetch. |
| `regionResolution` | `COUNTRY`, `REGION`, `DMA` or `CITY`. |
| `trendingGeos` | Countries to fetch Trending now searches for. |
| `trendingHours` | `4`, `24`, `48` or `168`. |
| `trendingCategory`, `trendingActiveOnly`, `trendingMinVolume`, `maxTrendingPerGeo` | Filters for Trending now. |
| `includeTrendingNews`, `newsPerTrend` | Adds news articles to each trend. |
| `onlyNew`, `stateKey` | Monitoring mode: skips results seen in earlier runs. |
| `maxItems` | Overall cap on results. |
| `proxyConfiguration` | Apify Proxy. Datacenter is the default and works well. |

### Output example

#### Keyword result (`type: "keyword"`)

```json
{
  "type": "keyword",
  "keyword": "matcha",
  "geo": "US",
  "timeRange": "today 5-y",
  "category": 0,
  "property": "web",
  "comparedWith": [],
  "interestOverTime": [
    {"date": "2026-10-18", "timestamp": 1792281600, "formattedTime": "Oct 18 – 24, 2026", "value": 60, "hasData": true, "isPartial": false},
    {"date": "2026-10-25", "timestamp": 1792886400, "formattedTime": "Oct 25 – 31, 2026", "value": 57, "hasData": true, "isPartial": true}
  ],
  "averageInterest": 44.3,
  "peakInterestDate": "2026-06-21",
  "interestByRegion": [
    {"geoCode": "US-HI", "geoName": "Hawaii", "value": 100},
    {"geoCode": "US-CA", "geoName": "California", "value": 81}
  ],
  "relatedQueriesTop": [
    {"query": "matcha tea", "value": 100, "formattedValue": "100", "link": "https://trends.google.com/trends/explore?q=matcha+tea&date=today+5-y&geo=US"}
  ],
  "relatedQueriesRising": [
    {"query": "ryze matcha", "value": 58100, "formattedValue": "Breakout", "link": "https://trends.google.com/trends/explore?q=ryze+matcha&date=today+5-y&geo=US"}
  ],
  "relatedTopicsTop": [],
  "relatedTopicsRising": [],
  "trendsUrl": "https://trends.google.com/trends/explore?q=matcha&date=today+5-y&hl=en-US&geo=US",
  "warnings": ["Google Trends returned no related topics for this search."],
  "error": null,
  "scrapedAt": "2026-10-28T18:39:44Z"
}
```

*(Real output from a cloud test run on 28 Oct 2026. Lists are shortened.)*

#### Trending now result (`type: "trending"`)

```json
{
  "type": "trending",
  "title": "butter",
  "geo": "US",
  "searchVolume": 200000,
  "increasePercent": 1000,
  "startedAt": "2026-10-27T19:30:00Z",
  "endedAt": null,
  "isActive": true,
  "trendBreakdown": [
    "butter",
    "butter recalled",
    "miyoko plant based butter recall",
    "recalled butter",
    "miyoko's creamery",
    "butter recall"
  ],
  "categories": [
    "Food and Drink",
    "Business and Finance"
  ],
  "categoryIds": [
    5,
    3
  ],
  "newsArticleCount": 2,
  "news": [
    {
      "title": "Plant-based butter recalled over yeast, mold and E.coli concerns receives FDA risk classification",
      "url": "https://abcnews.com/Health/plant-based-butter-recalled-yeast-mold-ecoli-concerns/story?id=137635485",
      "source": "ABC News - Breaking News, Latest News and Videos",
      "publishedAt": "2026-10-28T17:09:02Z",
      "imageUrl": "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcQBuQhPqyWC0hSdcy6JD67ARi3z2F8bY7ZTqbcG2v3K0tQkUqSpz1sXFyshWAQ"
    }
  ],
  "pictureUrl": "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcQBuQhPqyWC0hSdcy6JD67ARi3z2F8bY7ZTqbcG2v3K0tQkUqSpz1sXFyshWAQ",
  "pictureSource": "ABC News - Breaking News, Latest News and Videos",
  "hours": 24,
  "exploreUrl": "https://trends.google.com/trends/explore?q=butter&geo=US&date=now+7-d",
  "error": null,
  "scrapedAt": "2026-10-28T18:40:12Z"
}
```

*(Real output from a cloud test run on 28 Oct 2026. Only the first news article is shown.)*

The dataset has ready-made views: **Overview**, **Keywords** and **Trending now**.

### Pricing

Pay per event, with platform usage included. You pay only for:

| Event | Price |
|---|---|
| Run start (one per GB of memory; the default 512 MB run counts as one) | $0.002 |
| Keyword result (all requested Explore data for one keyword) | $0.002, i.e. **$2 per 1,000 keywords** |
| Trending now search | $0.0005, i.e. **$0.50 per 1,000 trends** |

**Error rows are free.** That includes keywords with too little volume, invalid inputs and failed requests. Examples:

- 1,000 keywords cost about **$2**.
- 100 trending searches with news cost about **$0.05**.

### Standby (real-time API)

```
GET https://despottt--google-trends-scraper.apify.actor/?keywords=coffee&geo=IT&timeRange=past_90d
Authorization: Bearer <APIFY_TOKEN>
```

Lists can be comma-separated (`keywords=a,b`, `trendingGeos=US,GB`). A typical response takes 2–7 s.

### FAQ

**Is there an official Google Trends API?** Google has an alpha API with limited access. This actor reads the same public data you see on trends.google.com, and no Google account is needed.

**Why are related topics sometimes empty?** Right now Google often sends empty related topics lists to automated, signed-out visitors, even when the website shows them. Related *queries*, interest over time and interest by region aren't affected. When topics are missing the actor adds a warning to the row. The price is the same, because the rest of the data is still delivered.

**What do the values mean?** Google Trends values are relative (0–100) within the chosen keyword, geo and time range. They are not absolute search counts. Trending now `searchVolume` is Google's approximate volume bucket (e.g. 200000 = "200K+").

**Why did my keyword come back with an error?** Google has too little search volume for that keyword in that place and period. Try a wider geo or a longer time range. You are not charged for these rows.

**Can I monitor trends on a schedule?** Yes. Turn on `onlyNew`, set a `stateKey` and schedule the actor (e.g. hourly). Each run returns only trends that weren't in earlier runs.

**Do I need proxies?** The default Apify datacenter proxy works well. The actor rotates sessions, warms up cookies and retries on rate limits (429) on its own.

### Limitations

- **Related topics are usually empty.** Google currently sends empty related-topics lists to automated, signed-out visitors, even when the website shows them. The fields stay in the output and a warning is added to the row; in our latest test run all 25 keywords came back without related topics. Related *queries*, interest over time and interest by region are not affected.
- Values are **relative (0–100), not absolute search counts**. Trending now volumes are Google's approximate buckets.
- Very low-volume keywords return an error row (free) instead of data.
- Google can rate-limit or change Trends at any time. The Actor retries and rotates sessions, but very large runs may see occasional failed rows.

### Responsible use

This actor collects only public, aggregated and anonymized Google Trends data, and no personal data. Please follow Google's terms of service and the laws that apply to you.

# Actor input Schema

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

One per line, e.g. <code>bitcoin</code>, <code>electric cars</code>. Each keyword returns one result with interest over time, by region and related queries.

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

Pick a country or Worldwide. You can also type a region code such as <code>US-CA</code> or <code>IT-25</code>.

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

Period of the data. For exact dates use "From date" below.

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

Pick only what you need for faster runs. The price per keyword is the same.

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

On: keywords are compared in groups of up to 5, like in Google Trends. Off: each keyword is analysed alone.

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

Which Google search to measure.

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

Pick one or more countries. Empty = skip Trending now.

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

Period of the list.

## `trendingCategory` (type: `string`):

Only trending searches in this category.

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

Skip trends that have already ended.

## `trendingMinVolume` (type: `integer`):

Skip smaller trends, e.g. 10000.

## `maxTrendingPerGeo` (type: `integer`):

0 = all (the US list often has 500+).

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

Adds the news articles Google links to each trend (title, URL, source, time, image).

## `newsPerTrend` (type: `integer`):

How many articles to add to each trend.

## `onlyNew` (type: `boolean`):

For scheduled monitoring: return only trending searches not returned before.

## `stateKey` (type: `string`):

Give each monitor its own name if you run several schedules.

## `dateFrom` (type: `string`):

Optional. Overrides the time range above. Use together with "To date".

## `dateTo` (type: `string`):

Empty = today.

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

0 = all categories. Examples: 7 Finance, 71 Food & Drink, 20 Sports, 958 Mobile Phones. Copy it from the <code>cat=</code> part of a Google Trends URL.

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

Level of detail of interest by region.

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

Optional. Paste Google Trends Explore or Trending now links; their own country, time range and category are used.

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

0 = no limit.

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

Used automatically only when Google Trends rate-limits. Leave as is.

## `useDirectConnection` (type: `boolean`):

Use the Actor's own IP first and switch to proxy only when rate-limited.

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

Lower it if you see many rate limits.

## Actor input object example

```json
{
  "keywords": [
    "bitcoin",
    "ethereum"
  ],
  "geo": "US",
  "timeRange": "past_12m",
  "dataTypes": [
    "interestOverTime",
    "interestByRegion",
    "relatedQueries",
    "relatedTopics"
  ],
  "compareKeywords": false,
  "property": "web",
  "trendingGeos": [],
  "trendingHours": "24",
  "trendingCategory": "all",
  "trendingActiveOnly": false,
  "trendingMinVolume": 0,
  "maxTrendingPerGeo": 100,
  "includeTrendingNews": true,
  "newsPerTrend": 3,
  "onlyNew": false,
  "category": 0,
  "regionResolution": "auto",
  "maxItems": 0,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "useDirectConnection": true,
  "maxConcurrency": 3
}
```

# Actor output Schema

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

All dataset items produced by the run

# 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": [
        "bitcoin",
        "ethereum"
    ],
    "geo": "US",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

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

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

```

## MCP server setup

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