# Google Trends Scraper: Interest, Regions, Trending Now (`solumdata/google-trends`) Actor

Interest over time, interest by region, related queries, and today's trending searches from Google Trends, with retries and fresh sessions so runs finish.

- **URL**: https://apify.com/solumdata/google-trends.md
- **Developed by:** [Solum Data](https://apify.com/solumdata) (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 $3.00 / 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.

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 as clean rows: how interest in up to five keywords changes over time, where in a country people search for them, the queries searched alongside them, and today's trending searches. Built to finish: when Google rate-limits a run, it waits, opens a fresh session, and carries on instead of failing.

### What you get

| Row type | Fields |
|---|---|
| `interest_over_time` | date, a 0 to 100 value per keyword, whether the latest point is partial |
| `interest_by_region` | region, region code, a 0 to 100 value per keyword |
| `related_queries` | keyword, list (top or rising), query, value |
| `related_topics` | keyword, list, topic, topic type (when Google provides them; Google returns these for single-keyword searches only, and sometimes not at all) |
| `trending_now` | title, approximate traffic, published time, linked news stories |

Values are Google's relative scale: 100 is the peak for the terms, place, and time you chose.

### How to use it

**Explore:** pick one to five keywords, a country (or leave it empty for worldwide), a time range, and a search type (web, YouTube, news, images, shopping). Example: `["bitcoin", "ethereum"]`, `US`, past 90 days returns about 90 daily points, 50 states, and the related queries for each.

**Trending now:** pick a country code to get today's trending searches with their news stories.

### Pricing

You pay per row returned, nothing for rows that were not delivered. Set **Max rows** to cap a run's cost.

### Limits

- Google Trends shows relative interest, not search counts.
- Google compares at most five keywords at once.
- Related topics depend on Google; many searches return none.
- This Actor reads the public Google Trends site. It is not affiliated with Google.

# Actor input Schema

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

Explore compares up to five keywords. Trending now returns today's trending searches for a country.

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

One to five search terms to compare (Explore mode).

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

Two-letter country code (US, GB, DE) or a region such as US-CA. Leave empty for worldwide.

## `timeframe` (type: `string`):

How far back to look. Shorter ranges give hourly or daily points; longer ranges give weekly or monthly ones.

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

Which Google search to measure: web, YouTube, news, images, or shopping.

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

Google Trends category number; 0 means all categories.

## `include` (type: `array`):

Leave empty for everything the mode provides.

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

Language for related queries and region names, for example en-US or de-DE.

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

Stop after this many rows. You pay per row.

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

Apify Proxy rotates sessions when Google rate-limits a run.

## Actor input object example

```json
{
  "mode": "explore",
  "keywords": [
    "bitcoin",
    "ethereum"
  ],
  "geo": "US",
  "timeframe": "past_12_months",
  "property": "web",
  "category": 0,
  "language": "en-US",
  "maxItems": 1000,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Every row of the run, as JSON.

# 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"
};

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

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

```

## MCP server setup

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