# Google Trends Scraper — Interest, Regions, Queries & Trending (`tortuga/google-trends-scraper`) Actor

Scrape Google Trends: interest over time, interest by country, region or metro, related queries (top and rising) for up to 5 compared terms, plus Trending now searches per country.

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

## Pricing

from $2.50 / 1,000 search terms

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 — Interest, Regions, Queries & Trending

Get Google Trends data as clean JSON, CSV or Excel: **interest over time**, **interest by country, state, metro or city**, **related queries (top and rising)** and **related topics** for any search term, compared like on trends.google.com, plus today's **Trending now searches** for any country. No login, no browser, no API key: the actor reads the same JSON endpoints the Google Trends website uses, so a term takes a few seconds, not minutes.

### What can this Google Trends scraper do?

- **Interest over time** for any search term or topic: every point of the chart (0-100), with the average, the peak and the peak date. Hourly, daily, weekly or monthly points depending on the time range.
- **Compare up to 5 terms** on one scale: write them on one line separated by commas (`python, javascript, rust`).
- **Interest by region**: countries (worldwide), states/provinces, US metro areas (DMA) or cities, plus each term's share per region when you compare terms.
- **Related queries**: top 25 and rising 25, with growth percentages and "Breakout" flags.
- **Related topics** (top and rising) when Google provides them (see the FAQ).
- **Any location, time range, category and search type**: worldwide, a country (`US`), a region (`US-CA`), a metro (`US-NY-501`); past hour to 2004-present or custom dates; 1,400 categories by name or ID; web, YouTube, News, Image and Google Shopping search.
- **Trending now** per country: every trending search with search volume (`200K+`), growth, start time, active flag, categories, related searches and optional news articles. Windows: past 4 hours, 24 hours, 48 hours or 7 days.
- **Monitoring mode**: schedule it and get only trends that are new since the last run.
- **Google Trends URLs** work as input: paste an explore or trending URL and the actor keeps its settings.

### How to scrape Google Trends data

1. Add one or more **Search terms** (one per line; put up to 5 on one line, comma-separated, to compare them).
2. Pick a **Location** (empty = worldwide), a **Time range** and, if you want, a **Category** and **Search type**.
3. Optionally add **Trending now: countries** (for example `US`, `GB`, `DE`).
4. Click **Start** and download the dataset as JSON, CSV, Excel or via the API.

#### Input example

```json
{
  "searchTerms": ["web scraping", "python, javascript"],
  "geo": "US",
  "timeRange": "today 12-m",
  "category": "Computers & Electronics",
  "searchProperty": "web",
  "trendingCountries": ["US", "GB"],
  "trendingHours": "24",
  "maxTrendsPerCountry": 50,
  "maxItems": 200
}
```

Custom dates: `"customTimeRange": "2024-01-01 2024-06-30"`. City level: `"regionResolution": "city"`.

#### Output example: search term

```json
{
  "type": "searchTerm",
  "searchTerm": "python",
  "comparedWith": ["javascript"],
  "geo": "US",
  "timeRange": "today 12-m",
  "startDate": "2025-10-09",
  "endDate": "2026-10-09",
  "category": 0,
  "categoryName": "All categories",
  "property": "web",
  "timeResolution": "WEEK",
  "averageInterest": 61,
  "peakInterest": 100,
  "peakDate": "2026-06-14",
  "interestOverTime": [
    {"date": "2025-10-05", "timestamp": 1759622400, "formattedTime": "Oct 5 – 11, 2025", "value": 62, "hasData": true},
    {"date": "2026-10-04", "timestamp": 1791072000, "formattedTime": "Oct 4 – 10, 2026", "value": 40, "hasData": true, "isPartial": true}
  ],
  "regionResolution": "REGION",
  "interestByRegion": [{"geoCode": "US-WY", "geoName": "Wyoming", "value": 100}, {"geoCode": "US-KS", "geoName": "Kansas", "value": 41}],
  "interestByRegionCompared": [{"geoCode": "US-KS", "geoName": "Kansas", "shares": {"python": 84, "javascript": 16}, "topTerm": "python"}],
  "relatedQueriesTop": [{"rank": 1, "query": "what is python", "value": 100, "formattedValue": "100", "url": "https://trends.google.com/trends/explore?q=what+is+python&date=today+12-m&geo=US"}],
  "relatedQueriesRising": [{"rank": 1, "query": "python programming tutorial", "value": 4400, "formattedValue": "+4,400%", "isBreakout": false, "url": "https://trends.google.com/trends/explore?q=python+programming+tutorial&date=today+12-m&geo=US"}],
  "relatedTopicsTop": [],
  "relatedTopicsRising": [],
  "trendsUrl": "https://trends.google.com/trends/explore?date=today%2012-m&geo=US&q=python,javascript&hl=en-US",
  "scrapedAt": "2026-10-09T23:44:17Z"
}
```

#### Output example: trending search

```json
{
  "type": "trendingSearch",
  "trendId": "US:mike ditka:2026-10-09",
  "geo": "US",
  "timeWindowHours": 24,
  "rank": 1,
  "title": "mike ditka",
  "searchVolume": 1000000,
  "searchVolumeFormatted": "1M+",
  "increasePercentage": 1000,
  "startedAt": "2026-10-09T14:50:00Z",
  "endedAt": null,
  "isActive": true,
  "categories": ["Sports"],
  "categoryIds": [17],
  "trendBreakdown": ["mike ditka", "ditka", "mike ditka cause of death"],
  "news": [{"title": "Legendary coach, Hall of Fame TE Mike Ditka dies at age 86", "url": "https://www.espn.com/nfl/story/_/id/50140701/...", "source": "ESPN", "publishedAt": "2026-10-09T15:03:00Z", "imageUrl": "https://encrypted-tbn2.gstatic.com/images?q=..."}],
  "trendsUrl": "https://trends.google.com/trends/explore?date=now%201-d&geo=US&q=mike%20ditka&hl=en-US"
}
```

#### Fields

| Field | Description |
|---|---|
| `searchTerm`, `comparedWith` | The term and the terms it was compared with (same scale) |
| `geo`, `timeRange`, `startDate`, `endDate` | Location and the exact window Google used |
| `category`, `categoryName`, `property` | Category filter and search type (web, youtube, news, images, shopping) |
| `timeResolution` | Point spacing: MINUTE, EIGHT_MINUTE, HOUR, DAY, WEEK, MONTH |
| `averageInterest`, `peakInterest`, `peakDate` | Summary of the timeline (Google's own average for compared terms) |
| `interestOverTime[]` | `date`, `timestamp`, `formattedTime`, `value` (0-100), `hasData`, `isPartial` (period still running) |
| `regionResolution`, `interestByRegion[]` | `geoCode`, `geoName`, `value` (0-100); cities also `latitude`/`longitude` |
| `interestByRegionCompared[]` | Compared terms only: each term's share (%) per region and the `topTerm` |
| `interestByRegionUnavailable` | Present (true) when Google refused the requested region level for this search |
| `relatedQueriesTop[]`, `relatedQueriesRising[]` | `rank`, `query`, `value`, `formattedValue`, `isBreakout` (rising), `url` |
| `relatedTopicsTop[]`, `relatedTopicsRising[]` | `rank`, `topic`, `topicType`, `topicId`, `value`, `formattedValue`, `url` |
| `title`, `rank`, `searchVolume`, `searchVolumeFormatted` | Trending search and its volume bucket (e.g. `200K+`) |
| `increasePercentage`, `startedAt`, `endedAt`, `isActive` | Growth and timing of a trending search |
| `categories`, `trendBreakdown`, `news[]` | Trend categories, the searches grouped into the trend, news articles |
| `changeType` | Monitoring mode only: `new` |

### How to get Google Trends trending searches (Trending now)

Add country codes to **Trending now: countries** and choose a window (past 4 h, 24 h, 48 h or 7 days). Each trending search is one result, in Google's order. Filter by **Trending category** (Sports, Entertainment, Politics, ...) or **Active trends only**, cap the list with **Max trends per country**, and switch on **Include news articles** for the stories Google shows next to each trend (one extra request per 20 trends). Regions such as `US-CA` work too. The old "Daily search trends" and "Realtime search trends" pages were replaced by Trending now in 2024; this is the current data.

### Monitor changes on a schedule

Turn on **Only new or changed items** and save the input as a task with a Schedule (Apify Console: **Saved tasks** -> **Schedule**, for example every hour or every morning). Each run remembers which trending searches earlier runs of the same input returned and outputs only trends that are new, so you get a feed of fresh trends per country. Trends already reported are dropped before they are saved, so they are not charged. New items carry `changeType: "new"` (`previousValues` is reserved for changed items and does not occur for trends); use **Monitoring key** to keep several schedules on the same input apart. Search-term results are not affected by this switch.

### How much does it cost to scrape Google Trends?

You pay per result: **$0.0025 per search term** (all requested sections of one term: timeline, regions, related queries and topics) and **$0.0007 per trending search**, plus a small Apify platform usage fee (about $0.03 per 1,000 search terms at the default 256 MB memory). There is no start fee. Comparing 5 terms produces 5 results. Switching off sections you do not need makes runs faster but does not change the price.

### Does it work without login, cookies or a Google API key?

Yes. Google Trends has no official public API; this actor uses the public endpoints of the Google Trends website with no account. Google answers the first request of a new client with HTTP 429 and a cookie, and throttles busy IPs; the actor handles that for you: every Apify Proxy IP gets its own cookie, throttled IPs are replaced automatically, and a search whose data calls fail is redone from scratch. In our tests 124 of 124 terms (612 requests) succeeded on the default datacenter proxy.

### Why are related topics empty?

Google currently returns the related-topics list empty to clients it classifies as automated (its answers mark them `USER_TYPE_SCRAPER`), and it offers no related topics for compared terms at all. We do not use browsers or CAPTCHA solving to get around that. The actor still asks for them, so the fields fill in as soon as Google returns them; switch **Related topics** off to save one request per term. Related queries are not affected.

### Proxy note

The default Apify datacenter proxy is the cheapest and works well. If Google keeps throttling the datacenter IPs during a large run, the actor switches to the RESIDENTIAL proxy group for the rest of that run when your plan includes it (Google Trends answers are small, a few KB each), and switches back if that proxy cannot connect. If you choose a proxy group yourself, it is used as is.

### Is it legal to scrape Google Trends?

The actor collects only aggregated, anonymous search-interest statistics and public trending searches that Google Trends shows to every visitor without an account; it contains no personal data. It does not log in or solve CAPTCHAs. You are responsible for how you use the data and for respecting Google's terms.

### Support

Found a bug or need a field? Open an issue in the **Issues** tab; it is usually answered within a day.

# Actor input Schema

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

One search per line. To compare terms on one scale like on trends.google.com, put up to 5 on one line separated by commas, e.g. 'python, javascript, rust'. Topic IDs such as /m/05z1\_ work too. Each term is one result.

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

Country or region code: US, GB, DE, US-CA (California), GB-SCT, US-NY-501 (New York metro). Leave empty for worldwide.

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

Period to analyze. Short ranges give hourly or minute points, long ranges weekly or monthly points.

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

Overrides Time range. Two dates 'YYYY-MM-DD YYYY-MM-DD', e.g. '2024-01-01 2024-06-30'. For hourly data within 7 days use 'YYYY-MM-DDTHH YYYY-MM-DDTHH'.

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

Limit to a Google Trends category, by name ('Food & Drink', 'Shopping', 'Computers & Electronics') or numeric ID (71). Empty = all categories.

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

Which Google search to measure: web search, image search, news search, Google Shopping or YouTube search.

## `includeInterestOverTime` (type: `boolean`):

Timeline of search interest (0-100) with average and peak.

## `includeInterestByRegion` (type: `boolean`):

Interest (0-100) by country (worldwide searches) or by subregion (country searches). For compared terms also each term's share per region.

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

Breakdown level for interest by region. Automatic = countries for worldwide, subregions (states) for a country. Metro (DMA) exists for the US only; city data is sparse.

## `includeLowVolumeRegions` (type: `boolean`):

Also return regions with little search volume, as the 'Include low search volume regions' switch on Google Trends.

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

Top and rising related searches (rising includes 'Breakout' terms that grew more than 5000%).

## `includeRelatedTopics` (type: `boolean`):

Top and rising related topics (single-term searches only). Google currently often returns this list empty to automated clients; the term is still saved with all other data.

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

Country codes (US, GB, DE, IN, BR...) or regions (US-CA) to get the 'Trending now' searches for. Each trending search is one result. Leave empty to skip.

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

Trends that started in the past 4 hours, 24 hours, 48 hours or 7 days.

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

Only trends in this category.

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

Skip trends that Google marks as no longer active.

## `maxTrendsPerCountry` (type: `integer`):

Take at most this many trends per country, in Google's order. Empty = all (a 7-day window in the US has 2,000+).

## `includeNews` (type: `boolean`):

Add the news articles Google shows for each trend (title, source, URL, time, image). One extra request per 20 trends.

## `maxNewsPerTrend` (type: `integer`):

How many news articles to keep per trend (1-10).

## `onlyNewOrChanged` (type: `boolean`):

Remember what earlier runs of this search returned and output only new items or items whose price/status changed. Use with a Schedule; unchanged items are not charged. Here: each trending search is output once, when it first appears. Search-term results are not affected.

## `monitoringKey` (type: `string`):

Name for this watch, so several schedules on the same search stay separate; defaults to a key derived from the search input.

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

Optional: paste Google Trends URLs. Explore URLs (trends.google.com/trends/explore?q=...) keep their terms, location, dates, category and search type; trending URLs (trends.google.com/trending?geo=GB\&hours=4) add a trending country.

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

Stop after this many results in total (search terms + trending searches). Keeps cost predictable.

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

Apify datacenter proxy works and is the cheapest; each IP gets its own Google cookie and throttled IPs are replaced automatically. If the datacenter IPs keep getting throttled, the run switches to RESIDENTIAL when your plan has it (a few KB per request).

## Actor input object example

```json
{
  "searchTerms": [
    "web scraping",
    "python, javascript"
  ],
  "geo": "US",
  "timeRange": "today 12-m",
  "searchProperty": "web",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "regionResolution": "",
  "includeLowVolumeRegions": false,
  "includeRelatedQueries": true,
  "includeRelatedTopics": true,
  "trendingHours": "24",
  "trendingCategory": "0",
  "trendingActiveOnly": false,
  "maxTrendsPerCountry": 50,
  "includeNews": false,
  "maxNewsPerTrend": 3,
  "onlyNewOrChanged": false,
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": 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": [
        "web scraping",
        "python, javascript"
    ],
    "geo": "US",
    "maxTrendsPerCountry": 50,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("tortuga/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": [
        "web scraping",
        "python, javascript",
    ],
    "geo": "US",
    "maxTrendsPerCountry": 50,
    "proxyConfiguration": { "useApifyProxy": True },
}

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

```

## MCP server setup

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