# Google Trends Scraper (Interest, Regions, Related, Trending) (`ahmad_mahameed/google-trends-scraper`) Actor

Google Trends data for any keyword: interest over time, interest by country or region, related queries and topics (top and rising), keyword comparisons and daily Trending now searches. Reliable with automatic retries. $1.50 per 1,000 keyword reports.

- **URL**: https://apify.com/ahmad_mahameed/google-trends-scraper.md
- **Developed by:** [Ahmad Mahameed](https://apify.com/ahmad_mahameed) (community)
- **Categories:** SEO tools, News
- **Features:** 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 keyword reports

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

### What does Google Trends Scraper do?

It gets [Google Trends](https://trends.google.com/) data for your keywords, the same numbers you see on the website, as clean JSON, CSV or Excel:

- 📈 **Interest over time**: the 0–100 trend line for any period, from the past hour to 2004–today, or your own date range
- 🗺️ **Interest by region**: countries, states, metro areas or cities
- 🔎 **Related queries**: top and **rising** searches (for example "+350%" or "Breakout")
- ⚖️ **Compare** up to 5 keywords on the same scale
- 🔥 **Trending now**: today's trending searches in any country, with traffic and news links
- 🛡️ **Reliable**: automatic retries with fresh sessions when Google rate-limits, and you're not charged for failed keywords
- 💲 **$1.50 per 1,000 keyword reports**, $0.80 per 1,000 trending searches

### Use cases

- **SEO and content planning**: find rising queries before competitors
- **Market and product research**: compare brands, products or categories over time and by region
- **Investing and e-commerce**: track demand for a product, stock or crypto
- **Newsrooms and social media**: catch what is trending today in each country
- **AI agents and dashboards**: feed trend data into reports, Google Sheets or Slack on a schedule

### Input

```json
{
  "searchTerms": ["chatgpt", "claude ai"],
  "geo": "US",
  "timeRange": "today 12-m",
  "compareTerms": false,
  "includeRegions": true,
  "includeRelatedQueries": true,
  "trendingNowGeos": ["US", "GB"]
}
```

- **Country or region**: `US`, `GB`, `DE`, `US-CA`… Leave empty for worldwide.
- **Time range**: past hour, 4 hours, day, 7 days, 30 days, 90 days, 12 months, 5 years or 2004–present. Or set a **custom start and end date**.
- **Category** and **Search type** (web, images, news, Google Shopping, YouTube) work like on the Google Trends website.

### Output

One row per keyword (or per comparison):

```json
{
  "searchTerm": "chatgpt",
  "geo": "US",
  "timeRange": "today 12-m",
  "averageInterest": 76.4,
  "interestOverTime": [
    { "date": "2025-10-12T00:00:00+00:00", "formattedTime": "Oct 12 – 18, 2025", "value": 92, "isPartial": false }
  ],
  "interestByRegion": [
    { "geoCode": "US-CA", "geoName": "California", "value": 100 }
  ],
  "relatedQueriesTop": [
    { "query": "chatgpt login", "value": 59, "link": "https://trends.google.com/trends/explore?q=chatgpt+login..." }
  ],
  "relatedQueriesRising": [
    { "query": "how to cancel chatgpt subscription", "value": "+350%", "link": "https://trends.google.com/..." }
  ],
  "trendsUrl": "https://trends.google.com/trends/explore?q=chatgpt&date=today+12-m&geo=US"
}
```

With **Compare terms** on, `interestOverTime` holds a value for each term (`"values": {"chatgpt": 92, "claude ai": 31}`) and related queries are grouped by term.

**Trending now** rows:

```json
{
  "type": "trendingNow",
  "geo": "US",
  "rank": 1,
  "title": "erin andrews",
  "approxTraffic": "1000+",
  "startedAt": "2026-10-17T22:50:00+00:00",
  "news": [{ "title": "...", "url": "https://...", "source": "Yahoo" }]
}
```

### Pricing

- **$0.0015 per keyword report** (interest over time + regions + related queries), $1.50 per 1,000. A comparison of 3 terms counts as 3 reports.
- **$0.0008 per trending search**.
- Keywords Google doesn't answer after all retries are listed with an `error` and **not charged**.

### Notes

- Google Trends values are relative (0–100), not absolute search counts. That's how Google publishes them.
- Very rare keywords may have no data in small regions or short periods.

### More tools from this developer

- [Google News Scraper](https://apify.com/ahmad_mahameed/google-news-scraper): news articles with real publisher URLs
- [YouTube Scraper](https://apify.com/ahmad_mahameed/youtube-scraper): videos, Shorts, channels and search with views, likes and dates
- [YouTube Transcript Scraper](https://apify.com/ahmad_mahameed/youtube-transcript-scraper): transcripts and subtitles in bulk, $2 per 1,000
- [Website Contact Finder](https://apify.com/ahmad_mahameed/website-contact-finder): emails, phones and socials from any website list

### Feedback

Missing an option? Open an issue on the Issues tab and it will be added quickly.

# Actor input Schema

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

Keywords to look up on Google Trends. Each term gets its own report.

## `compareTerms` (type: `boolean`):

Put up to 5 terms in one report on the same 0-100 scale, like the compare view on Google Trends. Charged per term.

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

Two-letter country code (US, GB, DE, IN) or region code (US-CA, GB-ENG). Empty means worldwide.

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

Period to analyze. Ignored when a custom start date is set.

## `startDate` (type: `string`):

Optional. Use a custom date range instead of the time range above.

## `endDate` (type: `string`):

Optional end of the custom date range. Default is today.

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

Google Trends category number, for example 0 = all, 7 = Finance, 71 = Food and Drink, 958 = Jobs. Find it in the cat= part of a Trends URL.

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

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

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

Add interest by country, region or city.

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

Level of the region breakdown. Automatic gives countries for worldwide and states or regions inside a country.

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

Add related search queries, top and rising.

## `trendingNowGeos` (type: `array`):

Optional. Get today's trending searches for these countries (two-letter codes, for example US, GB, IN), with traffic and news links.

## Actor input object example

```json
{
  "searchTerms": [
    "chatgpt",
    "claude ai"
  ],
  "compareTerms": false,
  "timeRange": "today 12-m",
  "category": 0,
  "property": "",
  "includeRegions": true,
  "regionResolution": "",
  "includeRelatedQueries": true
}
```

# Actor output Schema

## `results` (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": [
        "chatgpt",
        "claude ai"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ahmad_mahameed/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": [
        "chatgpt",
        "claude ai",
    ] }

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

```

## MCP server setup

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