# Google Trends Scraper - Keyword Research & SEO Analysis (`inexhaustible_glass/google-trends-scraper`) Actor

Analyze Google Trends for keyword research & SEO. Get interest over time, regional breakdowns, related queries, rising topics & trending searches. Compare 100+ keywords, any country, any timeframe. For SEO & content marketers.

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

## Pricing

from $3.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.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Google Trends Scraper - Keyword Research & SEO Analysis Tool

**The most complete Google Trends scraper on Apify.** Analyze keyword trends, compare search interest, discover rising queries, track trending topics, and get regional data. Free Google Trends API alternative for SEO, keyword research, and market analysis.

### 🎯 What this Google Trends scraper does

This **Google Trends API alternative** / **keyword research tool** / **SEO analysis scraper** gives you:

- 📈 **Interest over time** — historical search interest graph data
- 🌍 **Interest by region** — country/state/city breakdown
- 🔍 **Related queries** — top and rising related searches
- 💡 **Related topics** — top and rising topic suggestions
- 🔥 **Trending searches** — today's trending searches by country
- 📊 **Bulk keyword comparison** — compare 100+ keywords
- 🗓️ **Custom timeframes** — past hour to all-time (2004-present)
- 🌐 **100+ countries** — regional trend data
- 🏷️ **Category filtering** — narrow by topic (News, Sports, Tech, etc.)

### 💼 Perfect for

- **SEO specialists** — find trending keywords to target, track seasonal patterns
- **Content marketers** — identify hot topics for blog posts, videos, newsletters
- **Keyword research** — validate keyword demand before creating content
- **Market research** — analyze consumer interest trends over time
- **Product managers** — track product/category demand and seasonality
- **Trend analysts** — spot emerging trends before they peak
- **Brand monitoring** — track brand mention trends vs competitors
- **E-commerce** — seasonal product planning, trending product discovery
- **News & journalism** — find trending topics and stories
- **Academic research** — study consumer behavior and search patterns
- **Stock/crypto trading** — sentiment indicators from search interest
- **YouTube creators** — find trending video topics
- **Agency reporting** — client dashboards with trend data

### 🔑 Features

- ✅ **Bulk keyword analysis** — up to 100+ keywords per run (Google compares 5 at a time internally)
- ✅ **Interest over time** — daily, weekly, or monthly data points
- ✅ **Regional breakdown** — interest by country, state, metro area
- ✅ **Related queries** — top (most searched) and rising (fastest growing)
- ✅ **Related topics** — semantic topic suggestions
- ✅ **Trending now** — today's trending searches by country
- ✅ **Custom timeframes** — 1 hour, 4 hours, 1 day, 7 days, 30 days, 90 days, 12 months, 5 years, all-time, or custom date range
- ✅ **Country targeting** — 100+ countries supported (US, IN, GB, DE, FR, JP, BR, AU, CA, and more)
- ✅ **Category filtering** — 30+ categories (News, Sports, Tech, Food, Finance, etc.)
- ✅ **JSON output** — clean structured data
- ✅ **Free plan compatible** — runs on 512 MB memory

### 📋 Input

| Field | Type | Description |
|---|---|---|
| `keywords` | Array of strings | Keywords to analyze (up to 100+) |
| `timeframe` | String | Time range: `today 1-m`, `today 3-m`, `today 12-m`, `today 5-y`, `all`, or custom `2024-01-01 2024-12-31` |
| `geo` | String | Country code: `US`, `IN`, `GB`, `DE`, `FR`, `JP`, etc. Empty = worldwide |
| `category` | Integer | Category ID. 0 = all. 13 = News, 71 = Food, 174 = Sports |
| `includeTrending` | Boolean | Also fetch today's trending searches |
| `trendingCountry` | String | Country for trending: `united_states`, `india`, `united_kingdom`, etc. |

#### Example input

```json
{
  "keywords": ["AI", "ChatGPT", "Claude", "Gemini"],
  "timeframe": "today 3-m",
  "geo": "US",
  "category": 0,
  "includeTrending": true,
  "trendingCountry": "united_states"
}
````

### 📤 Output (per keyword)

```json
{
  "keyword": "ChatGPT",
  "success": true,
  "timeframe": "today 3-m",
  "geo": "US",
  "interest_over_time": {
    "dates": ["2026-01-05", "2026-01-12", "..."],
    "values": [90, 85, 78, "..."]
  },
  "interest_by_region": [
    { "region": "California", "value": 100 },
    { "region": "New York", "value": 92 }
  ],
  "related_queries": {
    "top": [{ "query": "chatgpt login", "value": 100 }],
    "rising": [{ "query": "chatgpt 5", "value": "Breakout" }]
  },
  "related_topics": {
    "top": [...],
    "rising": [...]
  },
  "summary": {
    "avg_interest": 72,
    "peak_interest": 100,
    "trend_direction": "rising"
  }
}
```

### 💡 Use cases

#### 1. SEO keyword research

Find keywords with rising search interest before your competitors target them. Spot seasonal patterns to plan content calendar.

#### 2. Content topic generation

Get `related_queries.rising` for your niche — these are the exact questions people are newly searching for.

#### 3. Product trend analysis

Track product category demand over time. "Air fryer" trending up? "Kombucha" declining? Plan inventory and marketing accordingly.

#### 4. Competitive brand tracking

Compare your brand name vs competitors in Google Trends to measure share of search over time.

#### 5. Seasonal planning

See exactly when "Halloween costumes" or "Christmas gifts" start trending each year to time your campaigns.

#### 6. Geographic targeting

Find which states/countries search for your keywords most to prioritize ad spend and localization.

#### 7. Stock and crypto sentiment

Search interest often leads price movement — track "Bitcoin", "Tesla", etc. as a sentiment indicator.

### ❓ FAQ

**Q: Is this a Google Trends API?**
A: Google doesn't offer an official public API. This scraper provides equivalent data by scraping Google Trends directly.

**Q: How is this different from pytrends?**
A: pytrends is a Python library that often breaks due to IP blocks and rate limits. This hosted Apify scraper handles infrastructure for you — no setup.

**Q: Can I compare 10+ keywords at once?**
A: Yes. Google internally compares 5 at a time, but this scraper automatically handles batching so you can input 100+ keywords.

**Q: What timeframes are supported?**
A: Past hour (`now 1-H`), past 4 hours (`now 4-H`), past day (`now 1-d`), 7 days, 30 days (`today 1-m`), 90 days (`today 3-m`), 12 months (`today 12-m`), 5 years (`today 5-y`), all-time (`all`), or custom range.

**Q: Does it include trending searches?**
A: Yes, set `includeTrending: true` and specify `trendingCountry`.

**Q: Can I use this on Apify free plan?**
A: Yes — optimized to run on 512 MB memory, so your $5/month free credits cover many runs.

### 🔖 Keywords

google trends scraper, google trends api, keyword research tool, seo keyword finder, trending keywords, search trends api, google trends data, keyword trend analysis, seo tools, trending topics, rising queries, google trends bulk, keyword comparison tool, search volume api, keyword research api, google trends python alternative, pytrends alternative, trend analysis tool, seo research, keyword discovery, content ideas tool, trending searches, google search trends, search interest tracker, keyword popularity, seasonal trends, market trends analysis, trending topics api, google trends export, google trends csv, related queries finder, rising topics finder, seo analytics tool, content marketing tool, trend forecasting, keyword validation

### 📞 Support

Found a bug or have a feature request? Contact the author on Apify.

# Actor input Schema

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

List of keywords to analyze. Up to 100+ keywords supported. Google compares up to 5 at a time internally.

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

Time range for analysis. Examples: 'today 1-m' (1 month), 'today 3-m' (3 months), 'today 12-m' (1 year), 'today 5-y' (5 years), 'all' (2004-present), '2024-01-01 2024-12-31' (custom range).

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

Country code for regional data. Leave empty for worldwide. Examples: US, IN, GB, DE, FR, JP, BR, AU.

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

Google Trends category ID. 0 = All categories. Examples: 13 = News, 71 = Food & Drink, 174 = Sports, 5 = Computers & Electronics.

## `includeTrending` (type: `boolean`):

Also fetch today's trending searches for a country.

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

Country for trending searches. Examples: united\_states, india, united\_kingdom, germany, japan, brazil.

## Actor input object example

```json
{
  "keywords": [
    "AI",
    "ChatGPT",
    "Claude"
  ],
  "timeframe": "today 3-m",
  "geo": "",
  "category": 0,
  "includeTrending": false,
  "trendingCountry": "united_states"
}
```

# 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": [
        "AI",
        "ChatGPT",
        "Claude"
    ],
    "timeframe": "today 3-m"
};

// Run the Actor and wait for it to finish
const run = await client.actor("inexhaustible_glass/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": [
        "AI",
        "ChatGPT",
        "Claude",
    ],
    "timeframe": "today 3-m",
}

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

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    "AI",
    "ChatGPT",
    "Claude"
  ],
  "timeframe": "today 3-m"
}' |
apify call inexhaustible_glass/google-trends-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=inexhaustible_glass/google-trends-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Google Trends Scraper - Keyword Research & SEO Analysis",
        "description": "Analyze Google Trends for keyword research & SEO. Get interest over time, regional breakdowns, related queries, rising topics & trending searches. Compare 100+ keywords, any country, any timeframe. For SEO & content marketers.",
        "version": "1.0",
        "x-build-id": "A6p7nuJrcvQJqb8Jk"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/inexhaustible_glass~google-trends-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-inexhaustible_glass-google-trends-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/inexhaustible_glass~google-trends-scraper/runs": {
            "post": {
                "operationId": "runs-sync-inexhaustible_glass-google-trends-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/inexhaustible_glass~google-trends-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-inexhaustible_glass-google-trends-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "keywords"
                ],
                "properties": {
                    "keywords": {
                        "title": "Keywords",
                        "type": "array",
                        "description": "List of keywords to analyze. Up to 100+ keywords supported. Google compares up to 5 at a time internally.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "timeframe": {
                        "title": "Time Range",
                        "type": "string",
                        "description": "Time range for analysis. Examples: 'today 1-m' (1 month), 'today 3-m' (3 months), 'today 12-m' (1 year), 'today 5-y' (5 years), 'all' (2004-present), '2024-01-01 2024-12-31' (custom range).",
                        "default": "today 3-m"
                    },
                    "geo": {
                        "title": "Country/Region",
                        "type": "string",
                        "description": "Country code for regional data. Leave empty for worldwide. Examples: US, IN, GB, DE, FR, JP, BR, AU.",
                        "default": ""
                    },
                    "category": {
                        "title": "Category",
                        "type": "integer",
                        "description": "Google Trends category ID. 0 = All categories. Examples: 13 = News, 71 = Food & Drink, 174 = Sports, 5 = Computers & Electronics.",
                        "default": 0
                    },
                    "includeTrending": {
                        "title": "Include Trending Searches",
                        "type": "boolean",
                        "description": "Also fetch today's trending searches for a country.",
                        "default": false
                    },
                    "trendingCountry": {
                        "title": "Trending Country",
                        "type": "string",
                        "description": "Country for trending searches. Examples: united_states, india, united_kingdom, germany, japan, brazil.",
                        "default": "united_states"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
