# Google Trends Scraper - Interest & Trending Now (`aolmo/google-trends`) Actor

Google Trends data for any keyword: interest over time, interest by region, top and rising related queries and topics, for any country, time range and Google property (web, YouTube, news, shopping). Plus the trending searches of any country with their news. $0.0005 per keyword or trend.

- **URL**: https://apify.com/aolmo/google-trends.md
- **Developed by:** [Antonio del Olmo Tena](https://apify.com/aolmo) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 trend 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

Get Google Trends data for any keyword as clean JSON, and the trending searches of any country. For each keyword the Actor returns the full interest-over-time series, interest by region, and the top and rising related queries and topics, for the country, period and Google property you choose (web, images, news, shopping or YouTube). Add countries to also get what people are searching right now, with approximate traffic and the related news articles.

No browser and no API key: the Actor uses the same data endpoints as trends.google.com. You pay $0.0005 per keyword or trending search returned.

### What you get

One Dataset row per keyword (`rowType: keyword`):

- `interestOverTime`: every point of the chart with `date`, `label`, `value` (0 to 100) and `isPartial`.
- `averageInterest`, `latestInterest` and `peakDate`, ready for sorting and alerts.
- `interestByRegion`: states, provinces or countries with their value, highest first.
- `relatedQueriesTop` and `relatedQueriesRising` (`query`, `value`, `formattedValue` such as `Breakout` or `+250%`).
- `relatedTopicsTop` and `relatedTopicsRising` (`title`, `type`, `value`) when Google provides them.
- `keyword`, `geo`, `timeRange`, `property`, `category`, `url`.

One row per trending search (`rowType: trending`): `title`, `approxTraffic` (for example `200,000+`) and `traffic`, `publishedAt`, `picture`, and `news` with the title, URL and source of the related articles. On scheduled runs, `isNew` flags the searches that started trending since the previous run.

### How to use it

1. Open the **Input** tab.
2. In **Keywords** type one per line, for example `web scraping`, `electric cars`.
3. Set **Location** (`US`, `ES`, `US-CA`... or empty for worldwide), **Time range** and **Google property**.
4. Optionally add **Trending searches of countries** (`US`, `ES`, `MX`...) for what is trending right now.
5. Click **Start** and export the rows as JSON, CSV or Excel.
6. Schedule it daily or weekly to track a market; for trending searches, hourly runs flag new trends with `isNew: true`.

### Input

```json
{
  "keywords": ["web scraping", "data extraction"],
  "geo": "US",
  "timeRange": "past-12-months",
  "property": "web",
  "trendingCountries": ["US", "ES"]
}
```

| Field | Description |
|-------|-------------|
| `keywords` | Keywords, each analyzed separately. |
| `geo` | Country or region code, empty for worldwide. |
| `timeRange` | `past-hour`, `past-4-hours`, `past-day`, `past-7-days`, `past-30-days`, `past-90-days`, `past-12-months` (default), `past-5-years`, `since-2004`. |
| `property` | `web` (default), `images`, `news`, `shopping`, `youtube`. |
| `category` | Google Trends category id, 0 for all. |
| `trendingCountries` | Countries whose trending searches you want. |
| `language` | Language of related queries, default `en-US`. |

Up to 50 keywords and countries per run.

### Output example

```json
{
  "rowType": "keyword",
  "keyword": "web scraping",
  "geo": "US",
  "timeRange": "past-12-months",
  "property": "web",
  "category": 0,
  "averageInterest": 67.4,
  "latestInterest": 23,
  "peakDate": "2026-06-07T00:00:00.000Z",
  "interestOverTime": [{ "date": "2025-10-05T00:00:00.000Z", "label": "Oct 5 – 11, 2025", "value": 68, "isPartial": false }],
  "interestByRegion": [{ "geoCode": "US-MD", "geoName": "Maryland", "value": 100 }],
  "relatedQueriesTop": [{ "query": "ai web scraping", "value": 100, "formattedValue": "100" }],
  "relatedQueriesRising": [{ "query": "scraping with python", "value": 12350, "formattedValue": "Breakout" }],
  "relatedTopicsTop": [],
  "relatedTopicsRising": [],
  "url": "https://trends.google.com/explore?q=web+scraping&date=today+12-m&geo=US",
  "isNew": false,
  "timestamp": "2026-10-07T20:00:00.000Z"
}
```

### Pricing

Pay per event, no subscription:

- **Trend result**: $0.0005 per keyword row (with all its series) or per trending search. 1,000 keywords cost $0.50.
- **New trend**: $0.001 per trending search flagged as new in a scheduled run.

Keywords with too little search volume for Google Trends to show data are free.

### Use it as an API

```bash
curl -X POST "https://api.apify.com/v2/acts/aolmo~google-trends/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"keywords": ["electric cars"], "geo": "ES", "timeRange": "past-90-days"}'
```

You can also call it from AI agents through the Apify MCP server.

### FAQ

**What do the values mean?** Google Trends values are relative: 100 is the peak popularity of the keyword in the chosen place and period, 50 half of it. They are not search counts.

**Can I compare several keywords on one scale?** Each keyword is analyzed on its own scale in this version.

**Why are related topics sometimes empty?** Google only returns them for keywords with enough volume; the rest of the row is still filled.

**Where is the data stored between runs?** In a Key-Value Store of your account named `micro-saas-state-google-trends`, one key per keyword or country. Delete it to start fresh.

# Actor input Schema

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

One per line. Each keyword gets its interest over time, interest by region and related queries and topics.

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

Country code (US, ES, GB...), region code (US-CA, ES-MD...) or empty for worldwide.

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

Period of the interest-over-time series.

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

Where people searched.

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

Optional Google Trends category id (0 = all categories), e.g. 13 for Internet & Telecom.

## `trendingCountries` (type: `array`):

Optional. Country codes (US, ES, MX...) whose current trending searches you want, with traffic and related news.

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

Language of related queries and topics, e.g. en-US or es.

## `product` (type: `string`):

Internal. Leave as is.

## Actor input object example

```json
{
  "keywords": [
    "web scraping"
  ],
  "geo": "US",
  "timeRange": "past-12-months",
  "property": "web",
  "category": 0,
  "language": "en-US",
  "product": "google-trends"
}
```

# Actor output Schema

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

Dataset items: url, changed, events, data, timestamp and error (when the target failed).

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

// Run the Actor and wait for it to finish
const run = await client.actor("aolmo/google-trends").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": ["web scraping"],
    "geo": "US",
}

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,aolmo/google-trends"
        }
    }
}
```

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/UPI1tjaq7iqEDDpqb/builds/oeawDofhnoMwWmEOi/openapi.json
