# Google Trends Scraper — Interest, Related & Rising (`haketa/google-trends-scraper`) Actor

Scrape Google Trends for any keyword, country and timeframe: interest over time, related & rising queries and topics, regional interest, and trending-now searches. Keyless, with 429 retry and proxy rotation. Export JSON/CSV/Excel.

- **URL**: https://apify.com/haketa/google-trends-scraper.md
- **Developed by:** [Haketa](https://apify.com/haketa) (community)
- **Categories:** SEO tools, Marketing
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $7.00 / 1,000 results

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 — Interest Over Time, Related & Rising Queries

[![Apify Actor](https://img.shields.io/badge/Apify%20Actor-Ready-blue?logo=apify)](https://apify.com/haketa/google-trends-scraper)
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://apify.com/haketa/google-trends-scraper)
[![Data Format](https://img.shields.io/badge/Data-JSON%20%7C%20CSV%20%7C%20Excel-orange)](https://apify.com/haketa/google-trends-scraper)
[![Keyless](https://img.shields.io/badge/API%20Key-Not%20Required-blueviolet)](#)
[![Pagination](https://img.shields.io/badge/Pagination-1%2C000%2B%20Keywords-success)](#)

**Extract Google Trends data at scale — no API key, no login, no fragile Python libraries that break.** This high-throughput **Google Trends scraper** extracts **interest over time** (the complete 0–100 historical timeline plus latest, average, and peak metrics), **top and rising related search queries**, **regional geographic interest**, and real-time **trending-now daily searches** with traffic estimates, news headlines, and direct publisher citations.

Whether analyzing single keywords or batch-auditing 1,000+ queries across countries and timeframes, everything exports cleanly into **JSON, CSV, Excel, or programmatic API**.

***

### ⚡ At a glance

| Feature | Specification |
|---|---|
| **Target Website** | Google Trends (`trends.google.com`) |
| **Data Scope** | Interest timeline, top queries, rising queries, regional breakdown, daily trending |
| **Authentication** | **Keyless** (no Google account or paid API key required) |
| **Search Properties** | Web Search, News Search, Image Search, YouTube Search, Google Shopping |
| **Time Horizons** | Past day (`now 1-d`), past 7 days, past month, past 3/12 months, past 5 years, all time (2004–present) |
| **Geographic Scope** | Global (worldwide) or any ISO-2 country (`US`, `GB`, `DE`, `FR`, `TR`) / sub-region (`US-CA`) |
| **Concurrency & Scale** | 1 to 10 parallel workers with sticky IP sessions & automatic 429 backoff |
| **Bulk Capacity** | Fully unlocked for 1,000+ keywords per run with zero truncation |
| **Export Formats** | Dataset JSON, tabular CSV, spreadsheet Excel, XML, HTML, webhook integrations |

***

### 🔎 Why scrape Google Trends?

**Google Trends** represents the most comprehensive public pulse of global search demand, consumer sentiment, brand awareness, and breaking cultural shifts. Because Google captures over 90% of global search queries, Trends data provides an unparalleled leading indicator for commercial intent, investment themes, and viral trends.

However, extracting Google Trends programmatically comes with steep obstacles:

1. **No official public API**: Google does not offer a free or commercial public API for Trends.
2. **Aggressive 429 rate limits**: Unofficial scrapers and legacy Python packages (`pytrends`) frequently trigger HTTP 429 rate limits and broken cookie sessions.
3. **Data normalization complexity**: Interest values are dynamically indexed (0–100) relative to peak volume within the selected geography and timeframe.
4. **Widget fragmentation**: Timeline, related queries, and regional maps are split across separate internal API tokens.

This **Google Trends data extractor** completely eliminates these headaches. By bundling automated session bootstrapping, isolated proxy cookies, automatic JSON guard stripping, and multi-endpoint aggregation, it delivers structured, analytics-ready records for thousands of keywords reliably.

***

### ⚖️ Feature comparison: Why choose this Actor?

| Capability | Google Trends Web UI | Python `pytrends` | This Apify Actor |
|---|---|---|---|
| **Bulk Keywords** | Manual 5-term compare | Blocked after ~10 terms | **1,000+ keywords automated** |
| **Anti-Bot Resilience** | Interactive only | Frequent HTTP 429 fails | **Sticky residential rotation** |
| **Daily Trending Searches** | Manual copy-paste | Incomplete / fragile | **Automated RSS & news links** |
| **Automated Export** | Manual CSV download | Python code required | **One-click JSON / CSV / Excel** |
| **Cloud Scheduling** | Not supported | Requires custom server | **Native Apify cron scheduler** |
| **Webhook Integrations** | Not supported | Custom engineering | **Direct to Zapier / Make / Slack** |
| **Maintenance** | N/A | Abandoned / broke | **Continuously maintained** |

***

### ✨ Core capabilities

- 📈 **Complete interest timeline**: Retrieves the full indexed 0–100 search series for any keyword, calculating the **latest value**, **arithmetic average**, **peak score**, and **peak date**.
- 🔍 **Top related queries**: Uncovers the top 25 high-volume search queries frequently searched alongside your primary target.
- 🚀 **Rising & breakout queries**: Discovers explosive search terms with surging growth rates (including 5,000%+ "Breakout" surges) before competitors notice them.
- 🌍 **Geographic & regional breakdown**: Maps interest concentration across top countries, provinces, or states with normalized density metrics.
- 📰 **Daily trending searches**: Scrapes today's viral trending searches including approximate traffic counts, primary news headlines, news source names, and article links.
- 🎯 **Multi-surface coverage**: Switch effortlessly between Google Web Search, Google News, Google Images, YouTube Search, and Google Shopping (`froogle`).
- 🛡️ **Anti-blocking architecture**: Employs per-keyword sticky session cookies and residential IP rotation to prevent rate limiting even on large-scale research batches.
- 📦 **Bulk 1,000+ keywords**: Optimized queue architecture handles hundreds or thousands of seed keywords with steady throughput and zero dropouts.

***

### 🎯 Use cases & industry applications

#### 1. High-ROI SEO & content marketing

- **Content calendar ideation**: Uncover surging seasonal topics 4–8 weeks before search interest peaks.
- **Breakout keyword discovery**: Mine rising queries to write authoritative articles on emergent subtopics before keyword difficulty scores spike.
- **Search intent mapping**: Identify whether commercial terms perform better on Web Search versus YouTube or Google Shopping.

#### 2. Market research & consumer intelligence

- **Brand sentiment & share of search**: Compare your company against direct competitors to measure brand salience over 12 months or 5 years.
- **Product category validation**: Test consumer demand for new product categories or startup concepts before investing engineering capital.
- **Geographic expansion**: Identify which cities, states, or overseas markets exhibit the highest organic interest for your service.

#### 3. Financial analysis & quantitative trading

- **Alternative data signals**: Track search volume spikes for public ticker symbols, commodities, cryptocurrencies, or macroeconomic terms.
- **Retail demand forecasting**: Gauge holiday shopping interest for consumer discretionary brands ahead of quarterly earnings reports.

#### 4. PR, journalism & newsroom monitoring

- **Daily news agenda tracking**: Automatically monitor Google's daily trending searches to identify breaking viral events and cultural moments.
- **Source attribution**: Capture the primary news outlets and articles currently ranking for surging stories.

***

### 📥 Input parameters

The actor is designed to run instantly with zero configuration (using built-in popular market terms), while offering granular filters for deep market analysis.

| Parameter | Type | Default | Description |
|---|---|---|---|
| `keywords` | `array` | `["bitcoin", ...]` | List of search terms or phrases (one per line). Supports single terms, multi-word queries, and product names. |
| `geo` | `string` | `""` | ISO-2 country code (`US`, `GB`, `DE`, `CA`, `AU`, `TR`) or sub-region (`US-NY`). Leave empty for worldwide data. |
| `timeRange` | `select` | `"today 12-m"` | Historical window: `now 1-d` (hourly), `now 7-d`, `today 1-m`, `today 3-m`, `today 12-m`, `today 5-y`, or `all` (2004–present). |
| `category` | `integer` | `0` | Google category ID (e.g., `7` Finance, `5` Computers & Tech, `71` Food & Drink, `20` Sports, `18` Shopping). `0` = all. |
| `searchProperty` | `select` | `""` | Search property: `""` (Web), `news` (News), `images` (Images), `youtube` (YouTube), or `froogle` (Google Shopping). |
| `includeRelatedQueries` | `boolean` | `true` | When enabled, pulls top and rising queries for each seed term. |
| `includeRegionalInterest` | `boolean` | `false` | When enabled, fetches geographic interest distribution across provinces/countries. |
| `includeTimeline` | `boolean` | `true` | When enabled, serializes the complete date-value time series array as a clean JSON string. |
| `trendingNow` | `boolean` | `false` | When enabled, fetches daily trending search stories with estimated traffic and news headlines. |
| `maxItems` | `integer` | `0` | Maximum keywords or trending items to process. `0` = unlimited (processes all input keywords). |
| `maxConcurrency` | `integer` | `4` | Number of simultaneous keyword sessions (1–10). Recommended 3–5 for steady throughput. |
| `proxyConfiguration` | `object` | `RESIDENTIAL` | Apify proxy configuration. Residential proxies are enabled by default for maximum reliability. |

#### Sample JSON configuration

```json
{
  "keywords": [
    "artificial intelligence",
    "electric vehicles",
    "renewable energy",
    "quantum computing"
  ],
  "geo": "US",
  "timeRange": "today 12-m",
  "category": 0,
  "searchProperty": "",
  "includeRelatedQueries": true,
  "includeRegionalInterest": true,
  "includeTimeline": true,
  "trendingNow": false,
  "maxItems": 100,
  "maxConcurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

***

### 📊 Output data fields

Every record pushed to the Apify dataset represents either a comprehensive keyword evaluation or a daily trending search event. All fields use normalized string formats for seamless compatibility with BigQuery, Snowflake, PostgreSQL, and pandas.

#### 🏷️ Keyword trend fields

| Field | Coverage | Type | Description |
|---|---|---|---|
| `type` | 🟢 High (100%) | String | Record classification (`"keyword"` or `"trending"`). |
| `keyword` | 🟢 High (100%) | String | The exact search term or entity queried. |
| `geo` | 🟢 High (100%) | String | Geographic territory (`"US"`, `"GB"`, or `"worldwide"`). |
| `timeRange` | 🟢 High (100%) | String | The evaluated time window (`"today 12-m"`, `"all"`, etc.). |
| `category` | 🟢 High (100%) | String | Numeric Google category ID (`"0"` for all). |
| `searchProperty` | 🟢 High (100%) | String | Search surface queried (`"web"`, `"youtube"`, `"news"`, etc.). |
| `latestValue` | 🟢 High (98%) | String | The most recent search interest score (0–100). |
| `averageValue` | 🟢 High (98%) | String | Arithmetic mean interest across the entire timeframe. |
| `peakValue` | 🟢 High (98%) | String | Maximum relative search interest recorded (usually 100). |
| `peakDate` | 🟢 High (98%) | String | Formatted date or week when the peak score occurred. |
| `dataPoints` | 🟢 High (98%) | String | Total count of temporal data observations collected. |
| `relatedTopQueries` | 🟢 High (95%) | String | Semicolon-separated list of top associated searches. |
| `relatedRisingQueries` | 🟡 Conditional (75%) | String | Semicolon-separated list of fastest-growing breakout terms. |
| `topRegions` | 🟡 Conditional (65%) | String | Top sub-regions formatted as `GeoName:Score; GeoName:Score`. |
| `timeline` | 🟢 High (98%) | String | Full serialized JSON array of `{ "t": "Date", "v": Score }`. |
| `scrapedAt` | 🟢 High (100%) | String | ISO 8601 UTC execution timestamp. |

#### 📰 Daily trending search fields

| Field | Coverage | Type | Description |
|---|---|---|---|
| `type` | 🟢 High (100%) | String | Always `"trending"` for daily news spikes. |
| `rank` | 🟢 High (100%) | String | Daily leaderboard position (1, 2, 3...). |
| `keyword` | 🟢 High (100%) | String | Trending search topic name or celebrity/brand entity. |
| `approxTraffic` | 🟢 High (95%) | String | Search volume threshold (e.g., `"500K+"`, `"100K+"`, `"50K+"`). |
| `relatedNews` | 🟢 High (95%) | String | Semicolon-delimited primary headline summaries. |
| `newsSources` | 🟢 High (95%) | String | Names of reporting publishers (e.g., `"The Wall Street Journal; Reuters"`). |
| `newsUrls` | 🟢 High (95%) | String | Direct external URLs to ranking news articles. |
| `publishedAt` | 🟢 High (100%) | String | RFC 822 publication timestamp from Google's trend feed. |

***

### 📋 Example JSON outputs

#### 1. Keyword analysis record

```json
{
  "type": "keyword",
  "keyword": "artificial intelligence",
  "geo": "US",
  "timeRange": "today 12-m",
  "category": "0",
  "searchProperty": "web",
  "latestValue": "87",
  "averageValue": "82",
  "peakValue": "100",
  "peakDate": "Feb 18, 2026",
  "dataPoints": "52",
  "relatedTopQueries": "ai; open ai; chat gpt; what is artificial intelligence; ai tools; ai image generator; bing ai",
  "relatedRisingQueries": "deepseek; chat gpt 5; claude 3.7; local llm benchmark; grok 3",
  "topRegions": "California:100; Washington:94; Massachusetts:91; New York:85; Texas:79",
  "timeline": "[{\"t\":\"Nov 12, 2025\",\"v\":74},{\"t\":\"Nov 19, 2025\",\"v\":78},{\"t\":\"Feb 18, 2026\",\"v\":100}]",
  "rank": "",
  "approxTraffic": "",
  "relatedNews": "",
  "newsSources": "",
  "newsUrls": "",
  "publishedAt": "",
  "error": "",
  "scrapedAt": "2026-11-10T14:15:22.184Z"
}
```

#### 2. Daily trending record

```json
{
  "type": "trending",
  "keyword": "Champions League Draw",
  "geo": "US",
  "timeRange": "now",
  "category": "",
  "searchProperty": "",
  "latestValue": "",
  "averageValue": "",
  "peakValue": "",
  "peakDate": "",
  "dataPoints": "",
  "relatedTopQueries": "",
  "relatedRisingQueries": "",
  "topRegions": "",
  "timeline": "",
  "rank": "1",
  "approxTraffic": "500K+",
  "relatedNews": "Champions League Quarterfinal Matchups Confirmed; Real Madrid Drawn Against Arsenal",
  "newsSources": "ESPN; UEFA Official; BBC Sport",
  "newsUrls": "https://www.espn.com/soccer/story/... | https://www.bbc.com/sport/football/...",
  "publishedAt": "Tue, 10 Nov 2026 12:00:00 GMT",
  "error": "",
  "scrapedAt": "2026-11-10T14:15:24.012Z"
}
```

***

### 💻 Programmatic usage examples

Integrate Google Trends data directly into your Python scripts or Node.js applications using the official Apify Client SDKs.

#### Python integration

```python
from apify_client import ApifyClient

## Initialize the ApifyClient with your API token
client = ApifyClient("YOUR_APIFY_TOKEN")

## Prepare actor input
run_input = {
    "keywords": ["openai", "anthropic", "mistral ai"],
    "geo": "US",
    "timeRange": "today 3-m",
    "includeRelatedQueries": True,
    "includeTimeline": True,
    "maxConcurrency": 3
}

## Run the actor and wait for it to finish
run = client.actor("haketa/google-trends-scraper").call(run_input=run_input)

## Fetch and print dataset results
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"{item['keyword']} -> Latest: {item['latestValue']}, Peak: {item['peakValue']}")
```

#### Node.js integration

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({
    token: 'YOUR_APIFY_TOKEN',
});

const input = {
    keywords: ['solana', 'ethereum', 'bitcoin'],
    geo: '',
    timeRange: 'today 12-m',
    includeRegionalInterest: true,
};

const run = await client.actor('haketa/google-trends-scraper').call(input);
const { items } = await client.dataset(run.defaultDatasetId).listItems();

console.log(`Retrieved ${items.length} Google Trends records:`);
items.forEach(item => {
    console.log(`- ${item.keyword}: Avg=${item.averageValue}, Rising: ${item.relatedRisingQueries}`);
});
```

***

### 🚀 How to use this actor

1. **Paste your keywords**: In the Apify Console input form, enter one or more keywords into the **Keywords** field.
2. **Select geographic territory**: Choose worldwide (leave blank) or select target countries like `US`, `GB`, `DE`, or `JP`.
3. **Choose timeframe & surface**: Select your preferred historical range (`today 12-m` is recommended for annual trends) and search surface.
4. **Configure optional enrichment**: Enable **Include related & rising queries** for keyword research and **Include regional interest** for geographic expansion mapping.
5. **Execute & monitor**: Hit **Start**. The actor displays live status updates showing processed keyword counts and queue throughput.
6. **Export dataset**: Download your clean results immediately as CSV, Excel, or JSON, or stream directly via the Apify REST API.

***

### 💡 Best practices & optimization tips

- **Relative vs. absolute metrics**: Remember that Google Trends reports relative index values (0–100) indexed to the peak volume within the selected query, region, and timeframe. A score of 100 represents the highest search interest point for that term, not an absolute search volume.
- **Maintain residential proxy settings**: Google aggressively rate-limits datacenter IP ranges on its exploration endpoints. Keep the default Apify residential proxy enabled for smooth execution across large keyword lists.
- **Disambiguate broad nouns with categories**: If your query could mean multiple distinct entities (e.g., "Apple" the company vs. apple the fruit), specify the appropriate Google Category ID to isolate commercial search data.
- **Inspect rising vs. top queries**: Top queries demonstrate steady, high-volume search baseline demand. Rising queries reflect sudden velocity shifts—ideal for trend-jacking and early content publication.
- **Automate weekly/monthly monitoring**: Set up an Apify schedule (e.g., every Monday at 08:00 UTC) to continuously track brand velocity and log historical trend shifts into your data warehouse.

***

### ❓ Frequently Asked Questions (FAQ)

##### Do I need a Google Cloud account or API key?

No. This scraper functions completely keyless through Google's public endpoints. No credentials, billing setups, or OAuth authorizations are required.

##### How many keywords can I scrape in a single run?

There is no hard ceiling. The Actor easily handles batches from 1 to 1,000+ keywords. The built-in worker pool rotates sessions and throttles requests to ensure steady, uninterrupted processing.

##### Can I scrape YouTube or Google Shopping search interest?

Yes. Simply change the **Search property** dropdown to `youtube` or `froogle` (Google Shopping) to inspect vertical-specific search behavior.

##### Why do some low-volume terms lack rising queries?

If a search query has low baseline interest or steady historical volume with no sudden acceleration, Google's algorithm does not calculate rising queries. In such cases, top queries and interest timeline remain fully populated.

##### How do I integrate this Actor with Zapier, Make, or Google Sheets?

You can query the dataset via the Apify API (`GET /v2/datasets/{datasetId}/items?format=csv`) or configure an Apify Webhook to trigger an external HTTP workflow whenever a run finishes.

##### What happens if Google triggers a temporary 429 rate limit?

The Actor implements an intelligent exponential backoff and proxy session re-cycling engine. When a rate limit is detected, it automatically instantiates a new session with fresh cookie jars and resumes without losing previously scraped rows.

***

### 🔗 Related scrapers & data tools

Complement your market research stack with these specialized Apify actors:

- [Academic Paper & Author Resolver](https://apify.com/haketa/academic-resolver) — Resolve DOI, PubMed, and ArXiv papers with full citation metrics.
- [Substack Scraper](https://apify.com/haketa/substack-scraper) — Extract newsletter posts, subscriber metrics, and author profiles.
- [Article Content Extractor](https://apify.com/haketa/article-content-extractor) — Clean, ad-free article text and metadata extractor.
- [Wikidata Entity Resolver](https://apify.com/haketa/wikidata-resolver) — High-speed entity grounding and cross-database linking for AI agents.

***

### 📋 Changelog

#### Version 1.2 (2026-11)

- **Unlocked 1,000+ deep keyword processing**: Removed batch size restrictions, enabling seamless execution across 1,000+ search terms with sticky proxy session persistence.
- **Added explicit `maxItems` support**: Added configurable item capping with automatic validation and zero-limit bypass.
- **Accelerated prefill execution**: Streamlined session bootstrapping to complete standard test runs in under 30 seconds.
- **Enhanced data normalization**: Improved URL delimiter consistency and standardized news source extraction on daily trending feeds.
- **Schema & UX compliance**: Verified 100% schema alignment with Apify CLI 2026 standards and added comprehensive dataset view components.

#### Version 1.1 (2026-10)

- Added daily trending RSS parser with news headline, publisher, and external article link extraction.
- Introduced per-keyword isolated cookie jars to prevent session cross-contamination and HTTP 429 errors.
- Enhanced regional geographic mapping with automatic score pairing.

#### Version 1.0 (2026-10)

- Initial release featuring interest over time, top & rising queries, and multi-surface support.

# Changelog

This Actor's version history is a separate document: https://apify.com/haketa/google-trends-scraper/changelog.md

# Actor input Schema

## `keywords` (type: `array`):

One keyword or phrase per line — e.g. `bitcoin`, `electric cars`, `taylor swift`. Each is looked up on Google Trends for interest over time plus related & rising queries. Leave empty (and turn on **Trending now**, or just run) to see a demo.

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

Two-letter country code (e.g. `US`, `GB`, `DE`, `TR`) or a region like `US-CA`. Leave empty for worldwide.

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

How far back to pull interest over time.

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

Google Trends category ID to narrow results. 0 = all categories. Examples: 7 = Finance, 5 = Computers & Electronics, 71 = Food & Drink, 20 = Sports.

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

Which Google surface to measure interest on.

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

Pull the top and rising related search queries for each keyword — great for SEO and content ideas.

## `includeRegionalInterest` (type: `boolean`):

Also pull interest broken down by country/region (top locations searching for the keyword).

## `includeTimeline` (type: `boolean`):

Include the full interest-over-time series (every data point) as JSON, not just the summary (latest / average / peak).

## `trendingNow` (type: `boolean`):

Also fetch the current trending searches for the selected country — with approximate traffic and related news headlines. Works with or without keywords.

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

Maximum number of keywords or trending items to process. Set to 0 for unlimited (governed by your keywords list). Default 0.

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

How many keywords to process at once. Google Trends rate-limits aggressively — keep this low (3–5) to avoid 429s.

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

Apify Proxy. Strongly recommended and ON by default — Google Trends rate-limits by IP, so rotation is what keeps runs reliable.

## Actor input object example

```json
{
  "keywords": [
    "bitcoin",
    "artificial intelligence",
    "electric cars"
  ],
  "geo": "",
  "timeRange": "today 12-m",
  "category": 0,
  "searchProperty": "",
  "includeRelatedQueries": true,
  "includeRegionalInterest": false,
  "includeTimeline": true,
  "trendingNow": false,
  "maxItems": 0,
  "maxConcurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

keyword / trending

## `keyword` (type: `string`):

The keyword or trending term

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

Country/region

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

Timeframe

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

Category ID

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

Web/news/images/youtube/shopping

## `latestValue` (type: `string`):

Latest interest value (0-100)

## `averageValue` (type: `string`):

Average interest over the period

## `peakValue` (type: `string`):

Peak interest value

## `peakDate` (type: `string`):

When interest peaked

## `relatedTopQueries` (type: `string`):

Top related search queries

## `relatedRisingQueries` (type: `string`):

Rising related search queries

## `topRegions` (type: `string`):

Top regions by interest

## `dataPoints` (type: `string`):

Number of timeline points

## `timeline` (type: `string`):

Full interest-over-time series (JSON)

## `rank` (type: `string`):

Trending rank

## `approxTraffic` (type: `string`):

Approximate searches (trending)

## `relatedNews` (type: `string`):

Related news headlines (trending)

## `newsSources` (type: `string`):

Publishers behind the related news, e.g. BBC; Reuters (trending)

## `newsUrls` (type: `string`):

Links to the related news articles (trending)

## `publishedAt` (type: `string`):

When the trend was published (RSS pubDate, trending)

## `error` (type: `string`):

Error note if any

## `scrapedAt` (type: `string`):

Timestamp

# 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 = {
    "keywords": [
        "bitcoin",
        "artificial intelligence",
        "electric cars"
    ],
    "maxConcurrency": 4
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/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 = {
    "keywords": [
        "bitcoin",
        "artificial intelligence",
        "electric cars",
    ],
    "maxConcurrency": 4,
}

# Run the Actor and wait for it to finish
run = client.actor("haketa/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 '{
  "keywords": [
    "bitcoin",
    "artificial intelligence",
    "electric cars"
  ],
  "maxConcurrency": 4
}' |
apify call haketa/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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