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

Google Trends data with retries for 429 errors: interest over time, interest by region, top and rising related queries for up to 5 compared terms, and Trending Now by country with search volume. CSV export, new-trend alerts. $2 per 1,000 term reports, no start fee.

- **URL**: https://apify.com/tidytools/google-trends-scraper.md
- **Developed by:** [Yukai Lin](https://apify.com/tidytools) (community)
- **Categories:** SEO tools, Marketing, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 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

### What does Google Trends Scraper do?

**Enter search terms (up to 5 per line to compare them), countries and a time range, and get Google's interest over time, interest by region and rising related queries as clean rows; or enter a country and get its Trending Now list. $2 per 1,000 term reports and $0.50 per 1,000 trending searches, with no start fee.** Searches without enough Google data and failed requests are free.

It returns **Google Trends data as clean rows** for any search terms, countries and time ranges, and the **Trending Now** list of any country:

- 📈 **Interest over time**: Google's 0-100 search interest for every point in the chart (hours, days, weeks or months), with the **average, peak and latest** value per term.
- ⚖️ **Comparisons**: up to 5 terms on one line (`chatgpt, claude, gemini`) are measured on one scale, exactly like the trends.google.com chart. Up to 25 terms on a line also work: they run in batches of 5 that share the first term (the anchor) and are put on one approximate scale through it (see the FAQ).
- 🗺️ **Interest by region**: countries (worldwide) or states, regions, metro areas and cities of a country.
- 🔎 **Related queries**: the top and **rising** searches for each term, with the increase in percent or "Breakout".
- 🔥 **Trending Now**: what a country searches for right now (past 4 hours to 7 days), with **search volume**, increase, start time, category, the related searches of each trend and news articles for the top ones.
- 🔔 **Only new** for schedules: trending searches seen in earlier runs are skipped (free) and every report lists the rising queries that are new since the last run.
- 📄 **CSV files** of everything in long format (one row per term and date), ready for Sheets, Excel or a BI tool.
- Web, image, news, Google Shopping and YouTube search; any category; any time range from 2004.

#### Why another Google Trends scraper?

Google Trends answers bursts of requests with **HTTP 429 (Too Many Requests)**, so many scrapers fail often (the most used one completed 60% of its runs in the last 30 days, Apify Store, 3 October 2026). This Actor paces its requests, retries 429s with backoff and a fresh session, and reads the chart data from our own servers in the US, Singapore and Europe when Apify's network is rate-limited. **Searches that still fail, or that Google has too little data for, are free.**

#### Real results (3 October 2026)

- The default input (2 searches in the US, one a 3-term comparison, plus 25 US trending searches): 27 rows in **8.4 seconds, $0.0205**.
- 20 worldwide 5-year searches in one run: **20 of 20 complete, 0 rate-limit errors, 45 seconds**, $0.042.
- `chatgpt, claude, gemini` in the US, past 12 months: averages 78 / 19 / 28; latest week 69 / 20 / 34; rising for claude: "claude cowork" (Breakout); for gemini: "gemini 3.5 pro" (+950%).
- Trending Now US, past 24 hours: "penn state vs northwestern" 500K+ searches, +1,000%, Sports, with 28 related searches.
- Scheduled twice with "Only new": the second run returned only the 2 reports and skipped the 16 trending searches already seen (free).

### Use cases

- **SEO and content planning**: find rising queries before they peak, compare topics, pick the region to target.
- **Product and market research**: seasonality and demand by state or country for a product category.
- **Trend alerts**: schedule Trending Now (or a set of terms) every hour and get only what is new, e.g. into Slack via an Apify integration.
- **Data journalism and reports**: interest-over-time CSV for charts.
- **AI agents**: "Is interest in X growing?" answered with real numbers.

### How much does it cost?

| Event | Price | When |
|---|---|---|
| Term report | **$2.00 / 1,000** ($0.002 each) | one term's report for one region and time range: interest over time and the sections you selected (by region, related queries, related topics). A 3-term comparison is 3 reports. |
| Trending search | **$0.50 / 1,000** ($0.0005 each) | one Trending Now search with its volume, increase, start time, categories and related searches |

**Free:** searches without enough Google data, incomplete or failed reports (rate limits that outlast the retries), trending searches filtered out or already seen in "Only new" mode, invalid lines. **No start fee.** Larger Apify plans get the usual volume discount (Silver 10%, Gold and above 20%).

**Example:** 100 keywords every week in 3 countries = 300 reports = $0.60 per week. Trending Now for one country every hour with "Only new" ≈ 20-40 new trends a day ≈ $0.01-0.02 a day.

For comparison (Apify Store, 3 October 2026): apify/google-trends-scraper charges $0.003 per result (1,794 users in the last 30 days, 60% of runs succeeded); data_xplorer/google-trends-fast-scraper $0.002 per result plus $0.02 per run; agenscrape/google-trends-scraper $0.025 per result plus $0.025 per run; data_xplorer/google-trends-trending-now $0.001 per trend plus $0.02 per run.

#### Control your cost

- Each search line costs at most (terms × $0.002) per region; the run logs this worst case at the start and compares it with your **maximum charge per run**. When the next search could pass it, no new search starts (`SUMMARY.status: LIMIT_REACHED`, `SUMMARY.notProcessed`).
- `maxTrendingPerGeo` caps trending searches per country.
- Every row has `charged: true` or `false`; free rows say "(not charged)". If Apify restarts the run, finished searches are not charged again.

### How to use it

1. **Search terms**: one search per line; comma-separated terms on a line are compared (up to 5 exactly, up to 25 approximately through the first term).
2. **Country or region**: empty = worldwide, or `US`, `GB`, `US-CA` ... (several codes, comma-separated, repeat every search in each).
3. **Time range**, **Search type** (web, images, news, shopping, YouTube) and optional **Category id**.
4. Choose the sections: interest over time, by region (and its level), related queries, related topics.
5. Optional: **Countries for Trending now**, the period and categories.
6. Optional: **Only new** with a **Monitor name**, then schedule the task (Apify Console → Schedules).

#### Input example

```json
{
    "searchTerms": ["chatgpt, claude, gemini", "sourdough"],
    "geo": "US",
    "timeRange": "today 12-m",
    "interestByRegion": true,
    "relatedQueries": true,
    "trendingGeos": ["US", "GB"],
    "trendingHours": "24",
    "maxTrendingPerGeo": 50
}
```

#### Output example

Real result (3 October 2026), shortened to the last 2 weeks, 2 regions and 2 related queries per list:

```json
{
    "type": "interest",
    "search": "sourdough",
    "terms": ["sourdough"],
    "keyword": "sourdough",
    "geo": "US",
    "timeRange": "today 12-m",
    "success": true,
    "interestOverTime": [
        { "date": "2026-09-20T00:00:00.000Z", "time": 1789862400, "formattedTime": "Sep 20 – 26, 2026", "values": { "sourdough": 60 } },
        { "date": "2026-09-27T00:00:00.000Z", "time": 1790467200, "formattedTime": "Sep 27 – Oct 3, 2026", "values": { "sourdough": 59 }, "partial": true }
    ],
    "averages": { "sourdough": 69 },
    "peak": { "sourdough": { "date": "2026-01-18T00:00:00.000Z", "value": 100 } },
    "latest": { "date": "2026-09-20T00:00:00.000Z", "values": { "sourdough": 60 } },
    "interestByRegion": [
        { "geoCode": "US-AK", "geoName": "Alaska", "values": { "sourdough": 100 } },
        { "geoCode": "US-WY", "geoName": "Wyoming", "values": { "sourdough": 90 } }
    ],
    "regionValues": "index (0-100, 100 = the region where the term is most popular)",
    "regionResolution": "REGION",
    "relatedQueries": {
        "sourdough": {
            "top": [ { "query": "sourdough bread", "value": 100 }, { "query": "sourdough starter", "value": 74 } ],
            "rising": [
                { "query": "costco authentic sourdough bread debate", "increasePercent": null, "breakout": true, "formattedValue": "Breakout" },
                { "query": "costco sourdough bread bowls", "increasePercent": 3950, "breakout": false, "formattedValue": "+3,950%" }
            ]
        }
    },
    "trendsUrl": "https://trends.google.com/trends/explore?q=sourdough&geo=US&date=today+12-m",
    "via": "direct",
    "charged": true
}
```

A Trending Now row (shortened):

```json
{
    "type": "trending",
    "geo": "US",
    "rank": 1,
    "title": "penn state vs northwestern",
    "searchVolume": 500000,
    "searchVolumeText": "500K+",
    "increasePercent": 1000,
    "startedAt": "2026-10-02T21:00:00.000Z",
    "active": true,
    "categories": ["Sports"],
    "relatedQueries": ["penn state vs northwestern", "ryan field", "northwestern football", "penn state football"],
    "news": [],
    "exploreUrl": "https://trends.google.com/trends/explore?q=penn+state+vs+northwestern&geo=US&date=now+1-d",
    "charged": true
}
```

#### What the fields mean

- **values**: Google's relative interest, 0-100, where 100 is the highest point of the chart (all terms of a comparison share one scale). Not absolute search counts. `partial: true` marks the current, unfinished period.
- **averages / peak / latest**: per term; `latest` is the last complete period.
- **interestByRegion**: single term: 0-100 index per region; comparison: each term's share (%) of the compared searches in that region (`regionValues` says which).
- **relatedQueries.rising**: `increasePercent` compared with the previous period, or `breakout: true` (more than +5,000%).
- **searchVolume** (Trending Now): Google's rounded volume ("500K+" = 500,000).
- **newRisingQueries** (Only new): rising queries not seen in earlier runs of the monitor.
- **via**: `direct` (Apify's network) or `backend-us` / `backend-sg` / `backend-eu` (our servers).
- **SUMMARY** (key-value store): reports, trending searches, free rows by `errorType`, rate-limit retries and the CSV files written.

### Use it from code

```bash
curl -X POST "https://api.apify.com/v2/acts/tidytools~google-trends-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchTerms":["air fryer, slow cooker"],"geo":"US","timeRange":"today 5-y"}'
```

**With AI agents (MCP):** connect Apify's MCP server (`https://mcp.apify.com?tools=tidytools/google-trends-scraper`) to Claude, Cursor or any MCP client and ask, for example, "Is interest in pickleball still growing in the US, and which states search for it most?". Minimal input: `{"searchTerms": ["pickleball"], "geo": "US"}`. Failed items are not charged and carry an `errorType`.

### Limitations

- **Relative numbers**: Google Trends gives 0-100 indexes, not search counts; Trending Now gives rounded volumes. Values from different searches are on different scales; compare terms on one line to put them on one scale.
- **Rate limits**: Google may still refuse requests in busy periods. Each request is retried (`maxRetries`, waits up to 45 seconds); what still fails is a free row with `errorType: rate_limited` or `incomplete`. The search step needs a session cookie and always runs from Apify's network (or your proxy); the chart data can also come from our servers.
- **Related topics** are often returned empty by Google to callers without a signed-in session; they are then empty lists.
- **Honest access**: requests use our TidyTools user agent and follow trends.google.com/robots.txt; no logins, no CAPTCHA solving.
- **News articles** come from Google's Trending Now feed and exist only for its top items.

### FAQ

**Does the Actor collect usage data?** The Actor sends one anonymous usage counter per run (input type, item count range, outcome) to improve the tool; no URLs, content or account data.

**Are these search counts?** No. Google Trends gives a 0-100 index (100 = the peak of the chart); only Trending Now shows rounded search volumes. To compare terms on one scale, put them on one line, separated by commas.

**Can I compare more than 5 terms?** Yes, up to 25 on one line. Google compares at most 5 at a time, so the line runs in batches of 5 that all include the first term (the anchor): `a, b, c, d, e, f, g` becomes `a, b, c, d, e` and `a, f, g`. Each later batch is scaled by how the anchor reads in it compared with the first batch, and the whole chart is rescaled so its highest point is 100 (values have one decimal). This is an approximation: Google rounds every chart to whole numbers, so terms far less popular than the anchor lose precision. Put a term of middle popularity first; if the anchor has no data next to a batch, that batch cannot be scaled and the report is a free `incomplete` row. The report has an `anchor` field with the batches and their factors. Interest by region is then each term's own 0-100 index (not comparable between terms), and each term is one term report as usual.

**How do I watch a topic over time?** Schedule the Actor (for example weekly), turn on **Only new** and keep the same **Monitor name**: each report then lists the rising queries that are new since the last run, and trending searches already seen are skipped for free.

**Why did a search come back empty or with an error?** Either Google has not enough data for the term in that region (free row, `errorType` says so), or Google rate-limited the request beyond the retries (free row, `rate_limited` or `incomplete`). Run it again later or with a narrower input; free rows are never charged.

**What happens with a mistake in the input?** A search line with more than 25 terms is a free `invalid_input` row and the other lines still run. A bad country code, time range (`customTimeRange` must be `YYYY-MM-DD YYYY-MM-DD`) or Trending Now country (country codes only, not `US-CA`) ends the run normally with one free `invalid_input` row and `SUMMARY.status: NO_RESULTS`, never as a failed run. An unknown country code that looks valid (for example `XX`) is refused by Google (HTTP 400) and also gives a free `invalid_input` row.

**Can I get the data as a spreadsheet?** Yes. Every run also stores CSV files (interest over time, interest by region, related queries) in the key-value store, linked in the run output.

### Related Actors

- [YouTube Channel Scraper](https://apify.com/tidytools/youtube-channel-scraper): video stats for the topics you find here.
- [Website Traffic Rank](https://apify.com/tidytools/website-traffic-rank): how popular the sites behind a trend are.
- [App Store Keyword Rank & Charts](https://apify.com/tidytools/app-store-top-charts): demand signals from the App Store.

# Actor input Schema

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

One search per line. To compare terms on one scale, put them on one line separated by commas, e.g. "chatgpt, claude, gemini" (up to 5 exactly as on trends.google.com; up to 25 in batches of 5 scaled approximately through the first term). A term can be a word, a phrase or a Google topic id such as /m/05z1\_. Each term in a search is one report.

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

Empty = worldwide. A country code (US, GB, DE, JP, TW ...) or a region code (US-CA, GB-ENG, BR-SP). Several codes separated by commas run every search in each of them.

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

The period of the charts (Google picks the resolution: minutes, hours, days, weeks or months).

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

Overrides the time range: "YYYY-MM-DD YYYY-MM-DD", e.g. "2025-01-01 2025-06-30" (from 2004-01-01).

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

Which Google search the interest is measured on.

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

Google Trends category, e.g. 0 = all, 5 = Computers & Electronics, 7 = Finance, 18 = Shopping, 45 = Health, 71 = Food & Drink, 958 = Jobs. The id is the "cat" value in a trends.google.com link.

## `interestOverTime` (type: `boolean`):

The chart: search interest 0-100 per point in time, with averages, the peak and the latest full period.

## `interestByRegion` (type: `boolean`):

Countries (worldwide searches) or regions of the selected country, with their 0-100 interest; for comparisons, each term's share per region.

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

Level of the interest-by-region list. A level Google does not offer for the chosen geo falls back to auto.

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

Also list regions where Google has too little data (value 0, lowVolume: true).

## `relatedQueries` (type: `boolean`):

Up to 25 top and 25 rising related searches per term; rising ones show the increase (%) or "breakout".

## `relatedTopics` (type: `boolean`):

Top and rising related topics per term. Google often returns this list empty to callers without a signed-in session; it is then an empty list.

## `trendingGeos` (type: `array`):

Country codes (US, GB, DE, IN, JP, TW ...), one per line: what people search for right now, as on trends.google.com/trending, with search volume, increase, start time, category, related searches and news articles for the top items.

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

Time window of the Trending Now list (searches trending in the past 4 hours, 24 hours, 48 hours or 7 days).

## `trendingCategories` (type: `array`):

Keep only trending searches in these categories. Empty = all.

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

Skip trends that have already ended.

## `maxTrendingPerGeo` (type: `integer`):

Google lists up to a few hundred per country and period; the top ones come first.

## `onlyNew` (type: `boolean`):

Compare with the previous runs of the same monitor: trending searches seen before are skipped (free), and each report lists the rising related queries that are new since the last run (newRisingQueries). Keys are remembered for 30 days.

## `monitorName` (type: `string`):

Name of the saved state (letters, digits, dashes). Use one name per schedule; empty = derived from the first search.

## `csvExport` (type: `boolean`):

Also save long-format CSV files in the run's key-value store: INTEREST_OVER_TIME.csv (search, term, date, value), INTEREST_BY_REGION.csv, RELATED_QUERIES.csv and TRENDING_NOW.csv. Free.

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

Language code for region names, topic names and formatted dates, e.g. en-US, de, ja, zh-TW.

## `httpVia` (type: `string`):

Google Trends rate-limits busy IP addresses (HTTP 429). The search itself (explore) always runs from Apify's network or your proxy because it needs a session cookie; the chart data can also come from our servers in the US, Singapore and Europe. Every route uses our honest TidyTools user agent and respects robots.txt.

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

Only used for requests sent from Apify's network. Apify proxy usage is billed to your Apify account.

## `maxConcurrency` (type: `integer`):

Google Trends is strict about bursts; 1-2 is the most reliable.

## `maxRetries` (type: `integer`):

How often a rate-limited request is retried (waiting 2, 4, 8 ... up to 45 seconds, with a fresh session).

## Actor input object example

```json
{
  "searchTerms": [
    "chatgpt, claude, gemini",
    "sourdough"
  ],
  "geo": "US",
  "timeRange": "today 12-m",
  "searchProperty": "web",
  "category": 0,
  "interestOverTime": true,
  "interestByRegion": true,
  "regionResolution": "auto",
  "includeLowVolumeRegions": false,
  "relatedQueries": true,
  "relatedTopics": false,
  "trendingGeos": [
    "US"
  ],
  "trendingHours": "24",
  "trendingActiveOnly": false,
  "maxTrendingPerGeo": 25,
  "onlyNew": false,
  "monitorName": "",
  "csvExport": true,
  "language": "en-US",
  "httpVia": "auto",
  "maxConcurrency": 2,
  "maxRetries": 6
}
```

# Actor output Schema

## `interest` (type: `string`):

No description

## `trending` (type: `string`):

No description

## `full` (type: `string`):

No description

## `timelineCsv` (type: `string`):

No description

## `regionsCsv` (type: `string`):

No description

## `relatedCsv` (type: `string`):

No description

## `summary` (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, gemini",
        "sourdough"
    ],
    "geo": "US",
    "trendingGeos": [
        "US"
    ],
    "maxTrendingPerGeo": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("tidytools/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, gemini",
        "sourdough",
    ],
    "geo": "US",
    "trendingGeos": ["US"],
    "maxTrendingPerGeo": 25,
}

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

```

## MCP server setup

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