# Google Trends Keyword Scraper Pro | SEO & Market Research (`xtech/google-keyword-scraper-pro`) Actor

Compare Google Trends interest over time, regions, related queries, and trending searches for SEO, content strategy, market research, and competitive analysis. Export structured trend data with flexible timeframes and locations.

- **URL**: https://apify.com/xtech/google-keyword-scraper-pro.md
- **Developed by:** [Xtech](https://apify.com/xtech) (community)
- **Categories:** SEO tools, Developer tools, E-commerce
- **Stats:** 137 total users, 2 monthly users, 97.0% runs succeeded, 8 bookmarks
- **User rating**: 1.00 out of 5 stars

## Pricing

from $9.96 / 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.

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 Keyword Scraper Pro

Compare search interest, discover rising queries, and measure regional demand with structured Google Trends data for SEO, content, and market research.

Google Keyword Scraper Pro provides comprehensive access to Google Trends. Uncover interest over time, discover related queries and topics, identify trending searches, and more. This actor is your go-to tool for market research, SEO analysis, content strategy, and understanding public interest patterns.

### Pricing

The Actor is **$20/month plus Apify platform usage** and includes a two-hour trial. The runnable first example uses one bounded Trends request; Residential Proxy traffic is enabled by default to reduce Google blocking and is billed by Apify as platform usage.

### Features

- **Multiple Search Types**: Access various Google Trends reports:
  - Interest Over Time
  - Interest by Region
  - Related Topics (Top and Rising)
  - Related Queries (Top and Rising)
  - Daily Trending Searches
  - Real-time Trending Searches
  - Trending Now News by Tokens
  - Trending Now Showcase Timeline
  - Category Search
  - Geo Location Search
- **Flexible Input**: Specify multiple keywords/topics, define precise timeframes, target specific geographic locations (countries), and filter by Google Search categories or properties (Web, Images, News, YouTube, Shopping).
- **Structured Output**: Get well-organized JSON results, making it easy to integrate with other tools and workflows.
- **Customizable**: Tailor requests with parameters like host language, proxy setup, and search-specific options.
- **Robust Error Handling**: Includes error catching and logging for reliable scraping.

### Best for

- Comparing search interest for products, brands, or competing topics before a campaign
- Finding rising queries and related topics for an editorial or SEO brief
- Checking regional demand without manually copying charts from Google Trends

### Quick start

The Console form opens with a runnable comparison already filled in. Click **Start**
to compare interest in artificial intelligence and machine learning over the last
12 months in the United States, or replace the keywords with your own topics.

#### Input example

```json
{
  "keywords": ["artificial intelligence", "machine learning"],
  "timeframe": "today 12-m",
  "searchType": "interestOverTime",
  "geoLocation": "US",
  "googleProperty": "",
  "useApifyProxy": true
}
```

#### Output example

```json
{
  "searchType": "interestOverTime",
  "keywords": ["artificial intelligence", "machine learning"],
  "timeframe": "today 12-m",
  "parameters": {"geo": "US", "cat": 0, "gprop": ""},
  "data": [
    {"time [UTC]": "2025-08-03 00:00:00", "artificial intelligence": 32, "machine learning": 29, "isPartial": false}
  ]
}
```

#### Ready-to-run recipes

Compare two topics for SEO or content planning:

```json
{
  "keywords": ["electric vehicles", "hybrid cars"],
  "timeframe": "today 12-m",
  "searchType": "interestOverTime",
  "geoLocation": "US",
  "googleProperty": ""
}
```

Find the queries rising around one topic:

```json
{
  "keywords": ["sustainable packaging"],
  "timeframe": "today 12-m",
  "searchType": "relatedQueries",
  "geoLocation": "GB"
}
```

Compare regional interest for one topic:

```json
{
  "keywords": ["electric vehicles"],
  "timeframe": "today 12-m",
  "searchType": "interestByRegion",
  "geoLocation": "US",
  "googleProperty": ""
}
```

Use `searchType: "trendingSearches"` with `trendingSearchesCountry` for a country-level daily trend list; that endpoint does not need keyword input.

For ad-market research, pair this Actor with [Google Ads Transparency Scraper](https://apify.com/xtech/google-ad-transparency-scraper).
For content monitoring, see [News Source Crawler](https://apify.com/xtech/news-source-crawler).
For public-profile enrichment, see [Social Media Finder Pro](https://apify.com/xtech/social-media-finder-pro).

### Input Parameters

The actor uses a detailed input schema to configure your Google Trends requests. Key parameters include:

- `keywords` (Array of strings): List of keywords or topics to search. E.g., `["Artificial Intelligence", "/m/012345"]`. Max 5. Required for keyword-driven search types (e.g., `interestOverTime`, `relatedQueries`).
- `timeframe` (String): Time range for the data. E.g., `today 5-y`, `2023-01-01 2023-12-31`, `now 1-d`. Default: `today 5-y`.
- `geoLocation` (String): Two-letter country code (e.g., `US`, `DE`). Default: Global.
- `category` (Integer): Category ID to narrow results (e.g., `71` for Real Estate). Default: `0` (all categories).
- `googleProperty` (String): Google property to search (e.g., `images`, `news`, `youtube`). Default: Web search.
- `searchType` (String): The type of Google Trends report to fetch. Default: `interestOverTime`.
  - Available options: `interestOverTime`, `interestByRegion`, `relatedTopics`, `relatedQueries`, `trendingSearches`, `realtimeTrendingSearches`, `trendingNowNews`, `trendingNowShowcaseTimeline`, `categories`, `geo`.
- `trendingSearchesCountry` (String): Country code for Trending Searches. Required if `searchType` is `trendingSearches` or `realtimeTrendingSearches`. E.g., `US`.
- `hostLanguage` (String): Host language (e.g., `en-US`) used for endpoints that support language selection.
- `newsTokens` (Array of strings): Required for `trendingNowNews`.
- `batchPeriod` (String): Used for `trendingNowShowcaseTimeline` (`Past4H`, `Past24H`, `Past48H`, `Past7D`).
- `findText` (String): Used for `categories` and `geo` search types.

For a complete list of input parameters and their descriptions, please refer to the `input_schema.json` file in the actor's definition.

### Output Data

The actor pushes its results to the Apify Dataset. Each item in the dataset corresponds to a successful data retrieval operation and will typically include:

- `searchType`: The type of search performed.
- `keywords` or `keyword`: The keyword(s) used for the search.
- `parameters`: The specific parameters used for that request (e.g., timeframe, geo).
- `data`: An array of objects containing the actual trend data. The structure of these objects varies depending on the `searchType`.
  - For example, `interestOverTime` will include date and value points.
  - `relatedTopics` will include topic titles, types (top/rising), and values.

Refer to the `dataset_schema.json` for the general output structure.

The Output tab links directly to `RUN_SUMMARY`, which records the selected search type, requested
keyword count, result/data row counts, proxy usage, and an `allFailed` flag. Runs
that collect no data are marked failed with a retry-oriented status message so
rate limits, invalid queries, and unavailable trends are visible in monitoring.

Keywords are trimmed and de-duplicated before the request. The Actor accepts at
most five keywords per run and rejects malformed keyword input before making a
Google request. Google block pages, CAPTCHA responses, and transient HTTP errors
use bounded retries; invalid queries are reported as failed instead of being
silently retried.

### How to Use

1. Provide your list of `keywords`.
2. Select the desired `searchType`.
3. Adjust `timeframe`, `geoLocation`, `category`, and other parameters as needed for your specific research.
4. Run the actor and retrieve the results from the dataset.

### Troubleshooting

- **No data returned:** confirm the spelling, use a broader timeframe, and check that the selected `searchType` supports the supplied keywords.
- **Trending searches are empty:** set `trendingSearchesCountry` or use `realtimeTrendingSearches` with a valid two-letter country code.
- **Google blocks a request:** reduce batch size, wait before retrying, or enable the Apify Residential Proxy option. The run summary records whether a proxy was used.
- **A keyword is rejected:** remove blank or duplicate entries and keep the list to five keywords or fewer.

The runtime supports both the current rental model and a future pay-per-result model. In pay-per-result mode, `RUN_SUMMARY` counts only result bundles actually accepted before the user's spending limit; produced-but-unsaved bundles are not reported as delivered results. This compatibility does not change the live Store price.

### Use Cases

- **SEO & Content Strategy**: Identify trending keywords and topics to inform your content creation and optimization efforts.
- **Market Research**: Analyze interest in products, brands, or industries over time and across regions.
- **Competitive Analysis**: Compare search interest for your brand versus competitors.
- **Investment Analysis**: Gauge public sentiment and interest in publicly traded companies or market trends.
- **Academic Research**: Study shifts in public interest and discourse on various subjects.

### Limitations

- **Rate Limits**: Google Trends implements rate limits. If you make too many requests in a short period, you might be temporarily blocked. The actor has some retry mechanisms, but frequent, high-volume requests should be spaced out.
- **Data Granularity**: For very specific or low-volume search terms, Google Trends might not provide detailed data or might aggregate it.
- **Service Adaptability**: To provide continuous and reliable data, this actor is regularly updated to align with Google Trends. As with any tool dependent on external data sources, we recommend verifying results for critical applications.

### Contributing

Feel free to open an issue or submit a pull request if you have suggestions for improvements or find any bugs.

# Changelog

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

# Actor input Schema

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

Enter a list of keywords or Google Trends topic IDs (e.g., \["Python", "Artificial Intelligence", "/m/025rw19"] for Taylor Swift). You can compare up to 5 items. Required for search types that analyze keyword/topic interest (e.g., interestOverTime, relatedQueries).

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

Specify the time period for the trend data. Examples: 'today 5-y' (last 5 years), 'today 12-m' (last 12 months), 'now 7-d' (last 7 days, hourly data), '2020-01-01 2020-12-31' (custom range). Defaults to 'today 5-y'. For hourly data, use 'now 1-d' or 'now 7-d'.

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

Select the Google Trends endpoint to use. (See README for details.)

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

Specify a geographic region for the trends data. Use two-letter ISO 3166-1 alpha-2 country codes (e.g., 'US', 'GB', 'DE'). For subdivisions (e.g., states, regions), use codes like 'US-CA' for California. Leave empty for worldwide data. Not applicable for 'trendingSearches' or 'realtimeTrendingSearches' which use a separate field.

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

Filter trends by a specific category. For example, 71 corresponds to 'Real Estate'. Refer to Google Trends documentation or explore the Google Trends website to find relevant category numbers. Defaults to 0 (all categories).

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

Filter trends by a specific Google property (e.g., Images, News, YouTube, Shopping). Defaults to standard web search.

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

Required ONLY if 'Search Type' is 'Daily Trending Searches' or 'Real-time Trending Searches'. Provide the two-letter ISO 3166-1 alpha-2 country code (e.g., 'US' for United States, 'JP' for Japan) for which you want trending searches. This field overrides the general 'Geo Location' for these specific search types.

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

Interface language code, e.g. 'en-US'. Default is 'en-US'.

## `proxies` (type: `array`):

Optional list of proxy URLs if you don't want to use Apify proxy.

## `useApifyProxy` (type: `boolean`):

Use Apify Residential Proxy for cloud runs. Local runs connect directly unless you provide a custom proxy.

## `newsTokens` (type: `array`):

Required when Search Type = 'trendingNowNews'. Tokens come from trending_now().

## `maxNews` (type: `integer`):

Maximum number of news articles to fetch (trendingNowNews). Default 3.

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

Select timeframe for showcase timeline (trendingNowShowcaseTimeline).

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

Text to look for when using 'categories' or 'geo' search types.

## Actor input object example

```json
{
  "keywords": [
    "artificial intelligence",
    "machine learning"
  ],
  "timeframe": "today 12-m",
  "searchType": "interestOverTime",
  "geoLocation": "US",
  "category": 0,
  "googleProperty": "",
  "trendingSearchesCountry": "US",
  "hostLanguage": "en-US",
  "useApifyProxy": true,
  "maxNews": 3,
  "batchPeriod": "Past24H"
}
```

# Actor output Schema

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

Items stored in the default dataset.

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

Requested keywords, saved result bundles, nested trend rows, proxy use, billing mode, and terminal outcome.

# 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": [
        "artificial intelligence",
        "machine learning"
    ],
    "timeframe": "today 12-m",
    "searchType": "interestOverTime",
    "geoLocation": "US",
    "useApifyProxy": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("xtech/google-keyword-scraper-pro").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": [
        "artificial intelligence",
        "machine learning",
    ],
    "timeframe": "today 12-m",
    "searchType": "interestOverTime",
    "geoLocation": "US",
    "useApifyProxy": True,
}

# Run the Actor and wait for it to finish
run = client.actor("xtech/google-keyword-scraper-pro").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": [
    "artificial intelligence",
    "machine learning"
  ],
  "timeframe": "today 12-m",
  "searchType": "interestOverTime",
  "geoLocation": "US",
  "useApifyProxy": true
}' |
apify call xtech/google-keyword-scraper-pro --silent --output-dataset

```

## MCP server setup

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

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/4OHKMvUDMCTdpnfSk/builds/DbGB5n3KiLrdnRpxs/openapi.json
