# Google Trends Scraper — Search Trends Data & Trends API (`prestilink/google-trends-fast`) Actor

Google Trends API for search trends data and keyword research: interest over time, by country and region, top and rising related queries and topics, term comparisons and daily trending searches. No browser, about a second per term. Same fields as the classic Google Trends Scraper.

- **URL**: https://apify.com/prestilink/google-trends-fast.md
- **Developed by:** [Prestilink](https://apify.com/prestilink) (community)
- **Categories:** SEO tools, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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

## Google Trends Scraper — Search Trends Data & Trends API

Get **Google Trends data for keyword research and SEO in about a second per search term**: interest over time, interest by country or region, top and rising related queries, term comparisons, and today's **trending searches** in any country. No browser, no page loads, no timeouts.

Uses the **same input fields and output fields as the classic Google Trends Scraper**, so you can switch an existing integration by changing only the Actor ID.

**A pay-as-you-go alternative to SerpApi's Google Trends API**: no monthly plan, you only pay for results.

**You only pay for results you get.** Terms that fail are never charged.

### What you get

| Data | Field |
|---|---|
| Interest over time (0–100) | `interestOverTime_timelineData`, plus a simple `interestOverTime_simple` list of `{date, value}` |
| Averages when comparing terms | `interestOverTime_averages` |
| Interest by country (Worldwide) | `interestBy` |
| Interest by state or region (one country) | `interestBySubregion` |
| Top and rising related queries | `relatedQueries_top`, `relatedQueries_rising` |
| Related queries per term when comparing | `relatedByTerm` |
| Trending searches now, with traffic and news links | `mode: "trending"` |

### Features

- **Fast**: talks to Google Trends' own data endpoints directly. A list of 30 terms finishes in under a minute.
- **Compare up to 5 terms** on the same 0–100 scale (`isMultiple: true`, then `bitcoin, ethereum, solana` on one line).
- **Any time range**: past hour to 2004–present, or a custom range like `2025-01-01 2025-12-31`.
- **Any country**, any category, and web, image, news, Shopping or YouTube search.
- **Paste Google Trends URLs**: terms, region (e.g. `US-CA`), dates and category are read from the URL.
- **Trending now** for one or many countries: title, approximate search volume, publication time, picture and news articles.
- **Resilient**: when Google rate-limits a request, the Actor switches connection and retries automatically.

### Input examples

Keyword analysis:

```json
{
  "searchTerms": ["matcha", "pickleball"],
  "geo": "US",
  "timeRange": "today 3-m"
}
```

Compare terms:

```json
{
  "searchTerms": ["bitcoin, ethereum, solana"],
  "isMultiple": true,
  "timeRange": "today 5-y"
}
```

Trending now:

```json
{
  "mode": "trending",
  "trendingGeo": ["US", "GB", "FR", "DE", "IN", "BR"]
}
```

### Output example

```json
{
  "inputUrlOrTerm": "matcha",
  "searchTerm": "matcha",
  "geo": "US",
  "timeRange": "today 3-m",
  "interestOverTime_simple": [
    { "date": "2026-10-15", "value": 61 },
    { "date": "2026-10-16", "value": 52, "isPartial": true }
  ],
  "interestBySubregion": [
    { "geoCode": "US-HI", "geoName": "Hawaii", "value": [100], "formattedValue": ["100"] }
  ],
  "relatedQueries_top": [
    { "query": "matcha latte", "value": 100, "formattedValue": "100" }
  ],
  "relatedQueries_rising": [
    { "query": "matcha shortage", "value": 3450, "formattedValue": "+3,450%" }
  ],
  "status": "ok"
}
```

Values in this example are illustrative.

### Pricing

Pay per event: a small fee per run plus a fee per result (one term, one comparison, or one trending search). Bigger Apify plans get a lower price per result. See the **Pricing** tab for exact prices on your plan.

Failed terms are never charged. Set a maximum cost per run in the run options and the Actor stops before going over it.

### Good to know

- Google Trends values are relative (0–100), not absolute search counts. 100 is the peak for the selected terms, place and time.
- **Related topics**: Google currently doesn't return related topics to non-browser requests, so `relatedTopics_top` and `relatedTopics_rising` are kept for compatibility but are usually empty. Related **queries** are returned normally.
- For a state, region or city, paste a Google Trends URL with that region in **Google Trends URLs**.
- Very rare terms can return little or no data. That's how Google Trends works.

### Use it with

- **AI agents and MCP**: add this Actor as a tool through the Apify MCP server (Claude, Cursor, ChatGPT and other MCP clients), LangChain, LlamaIndex or CrewAI.
- **No-code automation**: n8n, Make and Zapier, for example a weekly keyword trends report to Google Sheets or Slack.
- **Spreadsheets and dashboards**: Google Sheets, Excel, Looker Studio.
- **Developers**: the Apify API, Python and JavaScript clients, webhooks and scheduled runs.

***

This Actor is not affiliated with, endorsed by, or sponsored by Google. Google Trends is a trademark of Google LLC.

# Actor input Schema

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

Keyword analysis returns interest over time, interest by region, related queries and related topics for each search term. Trending now returns today's trending searches with traffic and news links.

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

One search term per line. Each term is one result.

## `isMultiple` (type: `boolean`):

If checked, a line like 'bitcoin, ethereum' compares up to 5 terms on the same scale, like the Compare feature on Google Trends.

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

Defaults to the past 12 months.

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

Overrides Time range. Format: YYYY-MM-DD YYYY-MM-DD, e.g. 2025-01-01 2025-12-31.

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

Defaults to Worldwide. For a state or region, paste a Google Trends URL in Start URLs.

## `category` (type: `string`):

Defaults to All categories.

## `searchProperty` (type: `string`):

Which Google search to measure.

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

Paste Google Trends explore URLs. Their terms, country or region, dates and category are used as-is.

## `includeRegions` (type: `boolean`):

Countries for Worldwide, states or regions for a country.

## `includeRelated` (type: `boolean`):

Top and rising related queries and topics.

## `trendingGeo` (type: `array`):

Trending now mode only. Two-letter country codes, e.g. US, GB, FR, DE, IN, BR.

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

0 means no limit.

## Actor input object example

```json
{
  "mode": "keywords",
  "searchTerms": [
    "web scraping"
  ],
  "isMultiple": false,
  "timeRange": "",
  "geo": "",
  "category": "",
  "searchProperty": "",
  "startUrls": [
    {
      "url": "https://trends.google.com/trends/explore?q=web+scraping&geo=US"
    }
  ],
  "includeRegions": true,
  "includeRelated": true,
  "trendingGeo": [
    "US"
  ],
  "maxItems": 0
}
```

# Actor output Schema

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

One item per search term, comparison or trending search: interest over time, interest by region, related queries, and status.

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

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

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

```

## MCP server setup

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

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/89iMXPRizwrbFOVv0/builds/3PqWKQ1keKHn2XTav/openapi.json
