# Google Trends Scraper (`damilo/google-trends-apify`) Actor

Scrape Google Trends without a browser: interest over time, related and rising queries, related topics, interest by region and real-time Trending Now searches for any keyword, country, category and time range. Reliable, fast, pay per row.

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

## Pricing

from $2.00 / 1,000 google trends data rows

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

Get Google Trends data as clean rows, without a browser and without Google's rate limits: **interest over time**, **related and rising queries**, **related topics**, **interest by region** and real-time **Trending Now** searches for any keyword, country, category and time range. Compare up to 5 terms, run hundreds of keywords per run, export JSON/CSV/Excel, and pay only for the rows you get. A reliable Google Trends API alternative — and the drop-in replacement for the archived `pytrends` library.

### What does the Google Trends Scraper do?

Type keywords (or Google topic IDs such as `/m/0663v`), pick a time range and location, choose the reports you need, and the actor returns the same numbers you see on trends.google.com — as structured data you can chart, join, feed to a model or load into a spreadsheet.

- 📈 **Interest over time** — the 0–100 score per day, week or month (or per minute/hour for intraday ranges), with the average and a partial-data flag for the current period.
- 🔎 **Related queries** — *top* queries with their 0–100 score and *rising* queries with their growth in % or `Breakout`.
- 🧠 **Related topics** — entities related to the term, with Google's topic ID and type.
- 🗺 **Interest by region** — score per country, region/state, US metro area (DMA) or city.
- 🔥 **Trending Now** — Google's live trending searches per country for the past 4 h to 7 days, with search volume, growth %, category and the related searches behind each trend.
- ⚖️ **Compare mode** — up to 5 terms in one chart, scored relative to each other, exactly like the Google Trends "Compare" box.
- 🎯 **Filters** — country/region (`US`, `GB`, `US-CA` …), category (Shopping, Finance, Health …), search type (web, images, news, Google Shopping, YouTube) and custom date ranges back to 2004.
- ✅ **Reliable** — no headless browser and no requests to Google from shared cloud IPs, which is why most Google Trends scrapers fail with HTTP 429. Runs finish in seconds.
- 💸 **Fair pricing** — pay per row; requests that return no data cost nothing; no start fee.

#### What data does the scraper return?

Every row carries `type`, `keyword`, `geo`, `timeRange`, `category`, `searchProperty`, a link to the matching Google Trends page (`exploreUrl`) and `scrapedAt`. Depending on the report:

| `type` | Fields |
| --- | --- |
| `interest_over_time` | `date` (ISO), `dateLabel`, `timestamp`, `value` (0–100), `isPartial`, `averageValue`, `comparedWith` |
| `related_query` | `relation` (`top` / `rising`), `rank`, `query`, `value` (score or growth %), `valueLabel` (e.g. `+2,650%`, `Breakout`), `isBreakout`, `link` |
| `related_topic` | `relation`, `rank`, `topicId`, `topicTitle`, `topicType`, `value`, `valueLabel`, `isBreakout`, `link` |
| `interest_by_region` | `rank`, `location`, `geoCode` (`FI`, `US-CA` …), `value`, `resolution`, `comparedWith` |
| `trending_search` | `rank`, `query`, `searchVolume`, `increasePercentage`, `startedAt`, `endedAt`, `isActive`, `categories`, `trendBreakdown` (related searches), `hours` |
| `error` | `report`, `error` — one uncharged row per request that returned no data |

### How to scrape Google Trends — step by step

1. Click **Try for free** (a free Apify account takes a minute).
2. Enter your **Search terms**, one per line. Topic IDs (`/m/0663v`) work too and disambiguate terms like *apple*.
3. Pick the **Time range** (past hour to 2004–present, or a custom date range), the **Location** (empty = worldwide) and optionally a **Category** and **Search type**.
4. Tick the **Reports** you want. Interest over time and related queries are on by default; add related topics and interest by region when you need them. Turn on **Compare terms** to score up to 5 terms against each other.
5. Optional: add country codes under **Trending Now** to get the live trending searches.
6. Click **Start**. Results appear in the **Dataset** tab; export them as JSON, CSV, Excel or XML, or read them through the API.

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

**$2 per 1,000 rows** ($0.002 per row) for interest over time, related queries, related topics and interest by region, and **$0.50 per 1,000** trending searches. Nothing is charged for requests that return no data, and there is no start fee.

| Example run | Rows | Cost |
| --- | ---: | ---: |
| 1 keyword, past 12 months, interest over time + related queries (defaults) | ≈ 53 + 40 | ≈ $0.19 |
| 1 keyword, all four reports, worldwide | ≈ 150 | ≈ $0.30 |
| 5 keywords compared, past 5 years, interest over time | 5 × 261 | ≈ $2.60 |
| 100 keywords, past 90 days, interest over time only | 100 × 90 | $18.00 |
| Trending Now, 1 country, 100 items | 100 | $0.05 |

Apify's free plan includes $5 of usage every month — about 2,500 Google Trends rows at no cost, no credit card needed. Set a **maximum total charge** on the run to cap the spend; the actor stops cleanly when it is reached.

### Input example

```json
{
  "searchTerms": ["chatgpt", "claude ai"],
  "timeRange": "today 12-m",
  "geo": "US",
  "category": 0,
  "searchProperty": "",
  "includeInterestOverTime": true,
  "includeRelatedQueries": true,
  "includeRelatedTopics": false,
  "includeInterestByRegion": true,
  "regionResolution": "REGION",
  "compareTerms": false,
  "trendingGeos": ["US"],
  "trendingHours": "24",
  "trendingMaxItems": 50
}
```

#### Time ranges

| `timeRange` | Meaning | Data points |
| --- | --- | --- |
| `now 1-H`, `now 4-H` | past hour / 4 hours | per minute |
| `now 1-d`, `now 7-d` | past day / 7 days | per 8 minutes / per hour |
| `today 1-m`, `today 3-m` | past 30 / 90 days | daily |
| `today 12-m` | past 12 months | weekly |
| `today 5-y`, `all` | past 5 years / 2004–present | weekly / monthly |
| `custom` + `customTimeRange` | e.g. `2025-01-01 2025-06-30` or hourly `2025-06-01T00 2025-06-03T23` | daily / weekly / hourly |

#### Locations and categories

`geo` takes ISO country codes (`US`, `GB`, `DE`, `IN`, `BR` …) or region codes (`US-CA`, `GB-ENG`, `FR-J`). Leave it empty for worldwide. For interest by region, choose `COUNTRY` (worldwide), `REGION` (states/provinces of the chosen country), `DMA` (US metro areas) or `CITY`.

`category` is Google's category ID: `0` all, `3` Arts & Entertainment, `5` Computers & Electronics, `7` Finance, `12` Business & Industrial, `16` News, `18` Shopping, `19` Games, `20` Sports, `22` Travel (Google ID 67 in some lists), `44` Beauty & Fitness, `45` Health, `47` Autos & Vehicles, `65` Jobs & Education, `71` Food & Drink, `958` Pets & Animals. Any category ID from the Google Trends URL (`cat=`) works.

### Output examples

Interest over time (weekly point, `today 12-m`, United States):

```json
{
  "type": "interest_over_time",
  "keyword": "chatgpt",
  "geo": "US",
  "timeRange": "today 12-m",
  "category": 0,
  "searchProperty": "web",
  "date": "2026-10-04",
  "dateLabel": "Oct 4 – 10, 2026",
  "timestamp": 1791072000,
  "value": 83,
  "isPartial": false,
  "averageValue": 76,
  "comparedWith": null,
  "exploreUrl": "https://trends.google.com/trends/explore?q=chatgpt&date=today+12-m&hl=en&geo=US",
  "scrapedAt": "2026-10-27T00:00:42Z"
}
```

Rising related query:

```json
{
  "type": "related_query",
  "keyword": "pixel 10",
  "geo": "WORLDWIDE",
  "timeRange": "today 1-m",
  "relation": "rising",
  "rank": 1,
  "query": "vivo v80",
  "value": 500,
  "valueLabel": "+500%",
  "isBreakout": false,
  "link": "https://trends.google.com/trends/explore?q=vivo+v80&date=today+1-m",
  "exploreUrl": "https://trends.google.com/trends/explore?q=pixel+10&date=today+1-m&hl=en",
  "scrapedAt": "2026-10-27T00:00:58Z"
}
```

Interest by region in compare mode (3 phones, worldwide):

```json
{
  "type": "interest_by_region",
  "keyword": "pixel 10",
  "geo": "WORLDWIDE",
  "timeRange": "today 1-m",
  "rank": 25,
  "location": "Finland",
  "geoCode": "FI",
  "value": 5,
  "resolution": "COUNTRY",
  "comparedWith": ["iphone 17", "galaxy s26"],
  "exploreUrl": "https://trends.google.com/trends/explore?q=iphone+17%2Cpixel+10%2Cgalaxy+s26&date=today+1-m&hl=en",
  "scrapedAt": "2026-10-27T00:01:07Z"
}
```

Trending Now (United States, past 4 hours):

```json
{
  "type": "trending_search",
  "geo": "US",
  "rank": 1,
  "query": "ballon d'or",
  "searchVolume": 200000,
  "increasePercentage": 1000,
  "startedAt": "2026-10-26T21:30:00Z",
  "endedAt": null,
  "isActive": true,
  "categories": ["Sports"],
  "trendBreakdown": ["harry kane ballon d'or", "who won the ballon d or 2026", "lamine yamal", "ballon d'or top 10"],
  "hours": 4,
  "exploreUrl": "https://trends.google.com/trending?geo=US&hours=4",
  "scrapedAt": "2026-10-27T00:02:21Z"
}
```

### What can you build with Google Trends data?

- **SEO and content planning** — find rising queries and breakout topics before the competition writes about them; track seasonality of your keywords; pick the right month to publish.
- **Market and product research** — validate demand for a product idea by country before you launch; compare your brand against competitors over time.
- **E-commerce and dropshipping** — spot products whose interest is climbing (`relation: rising`), check regional demand, time your ads.
- **Finance and alternative data** — build time series of consumer interest for tickers, brands or sectors; detect spikes.
- **Journalism and trend reports** — daily Trending Now feeds per country with volume and related searches, ready for a newsletter or dashboard.
- **Academic research** — reproducible pulls of interest over time by region and category, exported to CSV.
- **AI agents and LLM apps** — give an agent live "what are people searching for" context through Apify's MCP server or the API.

### A Google Trends API alternative that keeps working

Google's official Trends API is an invite-only alpha and returns scaled values, and the popular `pytrends` library was archived in 2025. Scrapers that hit Google Trends from shared cloud IPs get rate-limited (HTTP 429) within minutes. This actor avoids that path entirely: it retrieves the data through a maintained pipeline with its own Google access, retries transient errors with backoff, fails fast with a clear message when something is really wrong, and never charges you for a request that produced nothing.

Coming from `pytrends`? `interest_over_time()` → **Interest over time**, `related_queries()` → **Related queries**, `related_topics()` → **Related topics**, `interest_by_region()` → **Interest by region** (set `regionResolution`), `trending_searches()` → **Trending Now**. Compare mode reproduces the 5-keyword `build_payload` behaviour.

### Use it as a tool for AI agents

Through [Apify's MCP server](https://apify.com/actors/mcp-server) an agent can ask for the trend of any topic and receive a stable JSON schema with explicit `type`, `value`, `date` and `error` fields — ideal for research assistants, trend-report generators and content-planning agents.

### FAQ

#### Is there an official Google Trends API?

Only a gated alpha. This actor is the practical Google Trends API alternative: real data, every report type, JSON/CSV output, pay per row.

#### Is the value an absolute search volume?

No. Google Trends publishes a relative 0–100 index: 100 is the peak popularity of the term in the chosen range and location. Compare mode scores several terms on one scale, so you can tell which is bigger. Trending Now rows do include an approximate `searchVolume`.

#### How many keywords can I run?

Up to 100 per run; run the actor several times or schedule it for more. Each report for each term is one request. Parallel requests are capped at 5 to stay within Google's limits.

#### What changes with Compare terms?

Off (default): every term gets its own 0–100 scale. On: terms are grouped five at a time into one chart and scored relative to the most popular term in the group — the numbers you see when you add terms to the Google Trends compare box. Related queries and topics are always fetched per term.

#### Why did a term return an error row?

Google Trends has no data for very rare terms, for some combinations of category and region, or for custom ranges in the future. The row explains which report was empty and it is never charged.

#### Why do I get weekly points for the past 12 months?

Google Trends decides the granularity from the range: minutes for the past hours, hourly for 7 days, daily up to 90 days (or a custom range under ~9 months), weekly up to 5 years, monthly for 2004–present. Use a custom range to get daily data for a specific period.

#### Can I schedule it and get the data elsewhere?

Yes. Use Apify **Schedules** to run it hourly or daily, and **Integrations** (webhooks, Google Sheets, Make, Zapier, n8n) or the API to deliver the rows.

#### Is scraping Google Trends legal?

The actor collects aggregated, anonymous public statistics — no personal data. You are responsible for how you use the data; cite Google Trends when you publish it.

### More data tools by damilo

- [Google Search Results Scraper](https://apify.com/damilo/google-search-apify) — organic results, ads and People Also Ask for any keyword, country and language.
- [Google Autocomplete Scraper](https://apify.com/damilo/google-autocomplete-apify) — keyword ideas straight from Google's suggest box; pair it with Trends to size them.
- [Google Shopping Scraper](https://apify.com/damilo/google-shopping-apify) — live product listings and prices for the products that are trending.
- [Google Images Scraper](https://apify.com/damilo/google-images-scraper) and [Google Maps Scraper](https://apify.com/damilo/google-maps-scraper) — visual research and local business data.
- [YouTube Transcript Scraper](https://apify.com/damilo/youtube-transcript-apify) and [YouTube Comments Scraper](https://apify.com/damilo/youtube-comments-apify) — see what people say about the topics that trend (use `searchProperty: "youtube"` here to measure YouTube interest).
- [Amazon Search Scraper](https://apify.com/damilo/amazon-search-scraper), [eBay Search Scraper](https://apify.com/damilo/ebay-search-apify), [Y Combinator Scraper](https://apify.com/damilo/y-combinator-scraper-apify), [FDA Acronyms & Abbreviations Database](https://apify.com/damilo/fda-acronyms-abbreviations).

### Support

Missing a report, a filter or a country? Something looks off compared to trends.google.com? Open an **Issue** on this page — it is answered quickly. If the actor saved you time, a ⭐⭐⭐⭐⭐ review helps other people find it.

# Actor input Schema

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

Keywords or Google Trends topic IDs (e.g. /m/0663v), one per line. Up to 100 per run. Each term gets its own 0–100 scale unless you turn on Compare terms.

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

Score up to 5 terms against each other, exactly like adding them to one Google Trends chart: values are relative to the most popular term. Related queries and topics are always fetched per term.

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

Google Trends time range. Intraday ranges (past hour to past 7 days) return minute/hour points; longer ranges return daily, weekly or monthly points.

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

Only used when Time range is Custom. Format: YYYY-MM-DD YYYY-MM-DD (e.g. 2025-01-01 2025-06-30). For hourly data within 7 days: 2025-06-01T00 2025-06-03T23.

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

Country or region code: US, GB, DE, IN, US-CA, FR-J … Leave empty for Worldwide.

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

Google Trends category ID, 0 = all categories. Common IDs: 3 Arts & Entertainment, 5 Computers & Electronics, 7 Finance, 12 Business & Industrial, 18 Shopping, 22 Sports, 45 Health, 47 Autos & Vehicles, 67 Travel, 71 Food & Drink, 958 Pets. Full list in the README.

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

Which Google property the interest is measured on.

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

One row per date with the 0–100 interest score – the main Google Trends chart.

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

Queries people also searched for: the top ones with a 0–100 score and the rising ones with their growth in % (or Breakout).

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

Topics (entities) related to the term, top and rising, with their Google topic IDs.

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

One row per country, region, metro or city with its 0–100 interest score.

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

Granularity of the interest-by-region report. Region, metro and city require a country in Location.

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

Also return regions with little search volume in the interest-by-region report.

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

Country codes (US, GB, IN, DE …) for Google's real-time Trending Now searches, with search volume, growth and related queries. Leave empty to skip.

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

How far back the trending searches go.

## `trendingCategory` (type: `integer`):

Optional Trending Now category: 1 Autos & Vehicles, 2 Beauty & Fashion, 3 Business & Finance, 20 Climate, 4 Entertainment, 5 Food & Drink, 6 Games, 7 Health, 8 Hobbies & Leisure, 9 Jobs & Education, 10 Law & Government, 11 Other, 13 Pets & Animals, 14 Politics, 15 Science, 16 Shopping, 17 Sports, 18 Technology, 19 Travel & Transportation. 0 = all.

## `trendingMaxItems` (type: `integer`):

Google lists up to a few hundred trending searches per window; keep this small to control cost.

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

Interface language for labels (hl), e.g. en, de, fr, es, pt-BR.

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

How many Google Trends requests run at the same time.

## Actor input object example

```json
{
  "searchTerms": [
    "chatgpt",
    "claude ai"
  ],
  "compareTerms": false,
  "timeRange": "today 12-m",
  "geo": "",
  "category": 0,
  "searchProperty": "",
  "includeInterestOverTime": true,
  "includeRelatedQueries": true,
  "includeRelatedTopics": false,
  "includeInterestByRegion": false,
  "regionResolution": "COUNTRY",
  "includeLowVolumeRegions": false,
  "trendingGeos": [],
  "trendingHours": "24",
  "trendingCategory": 0,
  "trendingMaxItems": 100,
  "language": "en",
  "maxConcurrency": 3
}
```

# Actor output Schema

## `rows` (type: `string`):

Interest scores by date and region, related/rising queries and topics, and Trending Now searches, each tagged with its keyword, location, time range and type.

# 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"
    ],
    "timeRange": "today 12-m",
    "geo": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("damilo/google-trends-apify").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",
    ],
    "timeRange": "today 12-m",
    "geo": "",
}

# Run the Actor and wait for it to finish
run = client.actor("damilo/google-trends-apify").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"
  ],
  "timeRange": "today 12-m",
  "geo": ""
}' |
apify call damilo/google-trends-apify --silent --output-dataset

```

## MCP server setup

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

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/YyhuwGuCYCegwpusF/builds/s6umPvteWNFlJs8sl/openapi.json
