# TrendSnap: Fast Google Trends Scraper & API (`spidyshivam/google-trends-scraper`) Actor

TrendSnap is a fast Google Trends API alternative. Bulk keywords, compare up to 5 terms, interest over time, by region and city, related queries (top + rising), and trending searches by country. No browser, so lookups take seconds.

- **URL**: https://apify.com/spidyshivam/google-trends-scraper.md
- **Developed by:** [TrendSnap](https://apify.com/spidyshivam) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

## TrendSnap: Fast Google Trends Scraper & API

TrendSnap gets you Google Trends data as clean JSON, CSV or Excel, without a browser, so a lookup takes seconds instead of minutes. A fast, pay-per-result **Google Trends API alternative** (Google's official API is still a limited alpha, by application) and a **pytrends alternative** (the pytrends library is archived and no longer maintained), including **trending searches by country**.

### What you get

- **Interest over time**: the Trends chart as data points, for any time range from the past hour to 2004-present, or exact dates.
- **Keyword comparison**: up to 5 terms on one chart, just like the Trends website, e.g. `chatgpt, claude, gemini`.
- **Interest by region**: countries, states, cities or US metro areas, side by side for every compared term.
- **Related queries**: top and rising searches for each term, including "Breakout" terms.
- **Trending now**: the full Google Trends "Trending now" list, hundreds or thousands of trends per country or region (e.g. 3,000+ for the US over 7 days), with search volume, growth %, start and end time, categories, related searches and news links. Filter by time window (4 h, 24 h, 48 h, 7 days), category and active status.
- **Bulk**: hundreds of keywords in one run, processed in parallel.
- **Search types**: web, image, news, Google Shopping and YouTube search.

### Why this scraper

- **Finishes.** No browser and no page rendering: hundreds of keywords in minutes, and every run ends with a status line saying what was charged, what had no data and what failed.
- **No per-run fee, nothing for failures.** You pay per keyword or comparison that returns data, or per trending country. When Google throttles heavily a few lookups can still fail after retries from new IPs; those, and terms without data, cost nothing.
- **The full Trending Now list.** Hundreds to thousands of trends per country or region, with search volume, growth, categories and related searches, filterable by time window and category.
- **Compare like the website.** Up to five terms on one chart, interest by region, top and rising related queries, or paste a trends.google.com URL as-is.
- **Safe to automate.** If Apify restarts a run, it resumes without duplicate rows or double charges, and every row carries its position in your input (`jobId`).

### How to use it

1. Add your keywords under **Search terms**, one per line. Put several terms on one line, separated by commas, to compare them.
2. Optionally pick a **Region**, **Time range**, **Category** and **Search type**.
3. Click **Start**. Download results as JSON, CSV, Excel or HTML, or fetch them through the Apify API.

#### Example input

```json
{
    "searchTerms": ["chatgpt, claude, gemini", "bitcoin"],
    "geo": "US",
    "timeRange": "today 3-m",
    "trendingNowCountries": ["US", "IN", "US-CA"],
    "trendingHours": "24",
    "trendingCategories": ["Sports", "Technology"],
    "trendingActiveOnly": true
}
```

#### Example output (one comparison)

```json
{
    "jobId": 197,
    "type": "keywords",
    "searchTerms": [
        "nike",
        "adidas"
    ],
    "geo": "US",
    "timeRange": "today 12-m",
    "category": 0,
    "searchType": "web",
    "trendsUrl": "https://trends.google.com/trends/explore?date=today+12-m&q=nike%2Cadidas&geo=US",
    "interestOverTime": [
        {
            "date": "2026-10-18T00:00:00.000Z",
            "label": "Oct 18 – 24, 2026",
            "values": {
                "nike": 40,
                "adidas": 14
            },
            "isPartial": false
        }
    ],
    "averages": {
        "nike": 53,
        "adidas": 23
    },
    "regionResolution": "REGION",
    "interestByRegion": [
        {
            "geoCode": "US-WY",
            "geoName": "Wyoming",
            "values": {
                "nike": 58,
                "adidas": 42
            }
        }
    ],
    "relatedQueries": {
        "nike": {
            "top": [
                {
                    "query": "shoes",
                    "value": 100,
                    "formattedValue": "100",
                    "link": "https://trends.google.com/trends/explore?q=shoes&date=today+12-m&geo=US"
                }
            ],
            "rising": [
                {
                    "query": "nike mind slides",
                    "value": 12300,
                    "formattedValue": "Breakout",
                    "link": "https://trends.google.com/trends/explore?q=nike+mind+slides&date=today+12-m&geo=US"
                }
            ]
        }
    },
    "hasData": true,
    "scrapedAt": "2026-10-28T16:16:04.411Z"
}
```

The real output has every weekly point, up to 51 US regions (the 50 states and DC) and up to 25 top and 25 rising queries per term; it is shortened here. `jobId` is the position of the lookup in your input.

#### Example output (trending now)

```json
{
    "type": "trendingNow",
    "geo": "US",
    "timeWindow": "Past 24 hours",
    "hours": 24,
    "filters": { "categories": ["Sports"], "activeOnly": true, "sortBy": "searchVolume", "maxItems": 0 },
    "source": "trendingNow",
    "totalAvailable": 537,
    "count": 35,
    "trendingSearches": [
        {
            "rank": 1,
            "term": "dallas cowboys vs philadelphia eagles",
            "searchVolume": 1000000,
            "searchVolumeFormatted": "1M+",
            "increasePercentage": 500,
            "startedAt": "2026-10-26T23:50:00.000Z",
            "endedAt": null,
            "isActive": true,
            "categories": ["Sports"],
            "relatedQueries": ["dallas cowboys vs philadelphia eagles", "dallas cowboys", "cooper dejean", "cowboys"],
            "trendsUrl": "https://trends.google.com/trends/explore?q=dallas+cowboys+vs+philadelphia+eagles&geo=US&date=now+1-d"
        }
    ]
}
```

Each country or region is **one trending result**, however many trends it contains. For one row per trend (best for CSV/Excel), open the **Trending (one row per trend)** table on the Output tab and export it, or add `unwind=trendingSearches` to the dataset items API URL. There is no extra charge from TrendSnap: each country is still one result. The biggest trends also include `news` (title, URL, source).

The full trending list comes from an undocumented Google endpoint. If Google changes it, TrendSnap falls back to Google's short RSS list (about 10–20 trends, `"source": "rss"`), does **not** charge for it, and says so in the run's status message.

### Good to know

- **Values are relative**, as on the Trends website: 100 is the peak popularity for the chosen terms, region and period. Compare terms in one entry to get them on the same scale.
- **Rising queries** show percentage growth; "Breakout" means growth above 5000%.
- **Region detail**: cities and metro areas are only available within a country (set a Region).
- **Low-volume terms** may return no data; the result then has `"hasData": false` and is not charged.
- **Partial data**: if Google withholds region or related-query data for a term, the result keeps the chart data and lists what is missing in `warnings`.
- **Same term, different regions**: when a Trends URL compares one term across regions (e.g. `q=bitcoin,bitcoin&geo=US,IN`), values are keyed as `"bitcoin (US)"` and `"bitcoin (IN)"`, listed in `seriesLabels`.
- **Safe restarts**: every row carries a `jobId`. If Apify restarts a run (for example when moving it to another server), lookups that were already saved are skipped, so they are not duplicated or charged twice.
- **Trending now regions**: besides countries, many sub-regions work too (e.g. `US-CA`, `IN-MH`). News links come from Google's country feeds and may be missing for sub-regions.
- **Related topics** are not included: Google returns them empty to automated requests.

### Pricing

You pay per result, with lower prices on higher Apify plans. Platform usage is included.

| Result | Free plan | Starter | Scale | Business+ |
|---|---|---|---|---|
| Keyword or comparison lookup | $0.0025 | $0.002 | $0.0015 | $0.001 |
| Trending now, per country or region (up to thousands of trends) | $0.01 | $0.008 | $0.006 | $0.005 |

Failed lookups, terms without data and trending lookups that fell back to the short RSS list are not charged.

### Use it from your code

Run TrendSnap through the [Apify API](https://docs.apify.com/api/v2) with the official clients. Get your API token from your Apify account settings.

**Python** (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("spidyshivam/google-trends-scraper").call(run_input={
    "searchTerms": ["chatgpt, claude, gemini", "bitcoin"],
    "geo": "US",
    "timeRange": "today 3-m",
})
if run is None:
    raise RuntimeError("Actor run was not found.")
for item in client.dataset(run.default_dataset_id).iterate_items():
    if not item.get("error"):
        print(item["searchTerms"], item["averages"])
```

**JavaScript** (`npm install apify-client`):

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

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('spidyshivam/google-trends-scraper').call({
    trendingNowCountries: ['US', 'IN'],
    trendingHours: '24',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const country of items.filter((i) => !i.error)) {
    console.log(country.geo, country.trendingSearches.slice(0, 5).map((t) => t.term));
}
```

### Integrations and scheduling

- **Track keywords every week in Google Sheets**: save your keyword list as a Task and add a weekly Schedule. On the Integrations tab, add an Actor integration with the Store Actor **Google Sheets Import & Export** to send each run's results to your sheet. Keyword rows contain every weekly data point, so import only `searchTerms` and `averages` if you want one compact row per keyword.
- Works with **Make, Zapier and n8n**, with webhooks, and with any scheduler or orchestrator through the API.
- **AI agents** can call TrendSnap through Apify's MCP server: `https://mcp.apify.com?tools=spidyshivam/google-trends-scraper`.

If TrendSnap saves you time, a short review on this page helps others find it.

### Is scraping Google Trends legal?

This Actor collects aggregated, anonymous search-interest statistics and Google's public list of trending searches. Trending terms can include the names of public figures; no data about individual searchers or users is collected. Automated access may conflict with Google's terms of service: check that your use complies with them and with your local laws.

# Actor input Schema

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

Keywords to look up. Each line is one chart. Put up to 5 terms on one line separated by commas to compare them against each other, e.g. "chatgpt, claude, gemini".

## `startUrls` (type: `array`):

Optional. Paste explore URLs straight from trends.google.com; their own terms, region, dates, category and search type are used.

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

Country or region code, e.g. US, IN, GB, or US-CA for California. Leave empty for worldwide.

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

Period to look at. Ignored when a custom time range is set.

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

Optional. Exact dates as "YYYY-MM-DD YYYY-MM-DD", e.g. "2025-01-01 2025-12-31". Overrides the time range above.

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

Google Trends category ID, e.g. 0 = all, 7 = Finance, 13 = Computers & Electronics, 71 = Food & Drink. Find IDs in the cat= part of a Trends URL.

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

Which Google property to measure.

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

Where the terms are most popular.

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

Granularity of interest by region. Leave on default to match the Trends website.

## `includeLowSearchVolume` (type: `boolean`):

Also return regions with little search volume.

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

Top and rising searches related to each term.

## `trendingNowCountries` (type: `array`):

Get what is trending in Google Search right now: hundreds of trends per country with search volume, growth, categories, related searches and news links. Use two-letter codes (US, IN, GB) or regions (US-CA, IN-MH).

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

How far back to look for trending searches.

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

Only keep trends in these categories. Leave empty for all categories.

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

Skip trends that have already ended.

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

Order of the trending searches.

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

Limit the number of trends returned per country. 0 means all.

## `trendingIncludeNews` (type: `boolean`):

Attach news articles to the top trends (Google publishes them only for the biggest trends).

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

How many requests to run at once. Higher is faster for long keyword lists.

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

How many times to retry a request from a fresh IP when Google blocks it.

## `failOnNoResults` (type: `boolean`):

Mark the run as failed when no lookup returns data. Useful for scheduled monitoring runs with a keyword that always has data.

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

Residential proxies give the most reliable results with Google. US IPs avoid cookie-consent pages; the region you query is set by the Region field, not by the proxy country.

## Actor input object example

```json
{
  "searchTerms": [
    "chatgpt, claude, gemini",
    "bitcoin"
  ],
  "geo": "",
  "timeRange": "today 12-m",
  "category": 0,
  "searchType": "",
  "includeInterestByRegion": true,
  "regionResolution": "",
  "includeLowSearchVolume": false,
  "includeRelatedQueries": true,
  "trendingNowCountries": [
    "US"
  ],
  "trendingHours": "24",
  "trendingActiveOnly": false,
  "trendingSortBy": "relevance",
  "trendingMaxItems": 0,
  "trendingIncludeNews": true,
  "maxConcurrency": 3,
  "maxRetries": 6,
  "failOnNoResults": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

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

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

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

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchTerms": [
        "chatgpt, claude, gemini",
        "bitcoin"
    ],
    "trendingNowCountries": [
        "US"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("spidyshivam/google-trends-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchTerms": [
        "chatgpt, claude, gemini",
        "bitcoin",
    ],
    "trendingNowCountries": ["US"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

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

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchTerms": [
    "chatgpt, claude, gemini",
    "bitcoin"
  ],
  "trendingNowCountries": [
    "US"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call spidyshivam/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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