# Google Trends Scraper (Cheap) — Interest, Regions, Queries (`istmobot/google-trends-scraper-cheap`) Actor

Low-cost Google Trends scraper with the same input and output fields as the most popular one: interest over time, averages, interest by country, subregion, metro and city, related topics and related queries. Compare up to 5 terms. $1.50 per 1,000 results.

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

## Pricing

from $1.20 / 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 (Cheap)

Low-cost Google Trends scraper. It takes the same input and returns the same output fields as the most popular Google Trends scraper on Apify, so you can switch by changing only the Actor ID.

### What you get per search term

- `interestOverTime_timelineData` and `interestOverTime_averages` (averages are only returned when you compare several terms)
- `interestBy` (countries, Worldwide only), `interestBySubregion`, `interestByMetro` (US only), `interestByCity`
- `relatedTopics_top` / `relatedTopics_rising`, `relatedQueries_top` / `relatedQueries_rising`

### Input

- `searchTerms`: one entry per result. With `isMultiple`, a comma separates up to 5 compared terms (`"coffee,tea"`).
- `geo`, `timeRange` or `customTimeRange` (`YYYY-MM-DD YYYY-MM-DD`), `category`
- `startUrls`: Google Trends explore URLs (`q`, `geo`, `date`, `cat`, `gprop` are read from the URL)
- `spreadsheetId`: a public Google Sheet with one column of terms (row 1 is the header)
- `maxItems` (0 = no limit), `maxConcurrency`, `maxRequestRetries`

### Pricing

$1.50 per 1,000 results, plus $0.005 per run start. Failed terms are returned with an `error` field and are not charged.

# Actor input Schema

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

(Required if 'spreadsheetId' is not provided) List of search terms to be scraped.

## `isMultiple` (type: `boolean`):

If checked, a comma is treated as a separator for multiple terms

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

Choose a predefined search's time range (defaults to 'Past 12 months')

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

Get results from a specific geo area (defaults to 'Worldwide'). This maps to different fields in the dataset results: smaller countries like Greece return just 'interestByCity' data, while larger ones like the United States return 'interestBySubregion' data as well. When omitted (Worldwide), 'interestBy' is returned instead, which corresponds to the 'Interest by area' section on Google Trends. Note: When using Google Trends URLs from the '🔗 Use a Google Trends URL instead of search terms' section, the geo parameter from the URL's query string takes precedence over this setting. You can also use start URLs to retrieve 'interestByMetro' data for metropolitan areas by providing URLs with more specific geo regions like California (US) directly copied from Google Trends.

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

Country of the residential proxy used when Google rate-limits datacenter IPs. Leave empty to match the geo area.

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

Copy a Google Trends URL and paste it here.

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

(Optional) ID of the Google Sheet from where search terms will be loaded.
Spreadsheet must have only one column. Row 1 is considered the title of the column so it will not be loaded as a search term. The provided spreadsheet must be publicly available. Check the actor documentation for more info.

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

Choose a category to filter the search for (defaults to 'All categories')

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

Maximum number of items to scrape. Zero means no limit.

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

Provide custom time range. If present, it takes precedence over regular timeRange. Format is: `YYYY-MM-DD YYYY-MM-DD`. See examples in the documentation.

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

How many search terms are scraped in parallel.

## `maxRequestRetries` (type: `integer`):

How many times a failed Google Trends request is retried (each retry uses a new IP).

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

Apify Proxy is used by default (datacenter first, residential only when Google rate-limits).

## Actor input object example

```json
{
  "searchTerms": [
    "webscraping"
  ],
  "isMultiple": false,
  "timeRange": "today 3-m",
  "geo": "",
  "viewedFrom": "",
  "startUrls": [
    {
      "url": "https://trends.google.com/trends/explore?q=web+scraping&geo=US"
    }
  ],
  "spreadsheetId": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms",
  "category": "",
  "maxItems": 0,
  "customTimeRange": "2024-01-01 2024-12-31",
  "maxConcurrency": 10,
  "maxRequestRetries": 7,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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": [
        "webscraping"
    ],
    "timeRange": "",
    "viewedFrom": "",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("istmobot/google-trends-scraper-cheap").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": ["webscraping"],
    "timeRange": "",
    "viewedFrom": "",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("istmobot/google-trends-scraper-cheap").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": [
    "webscraping"
  ],
  "timeRange": "",
  "viewedFrom": "",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call istmobot/google-trends-scraper-cheap --silent --output-dataset

```

## MCP server setup

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

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/0j7BwIOtcwnah1xej/builds/ymshn3oWUFhbJ6gLt/openapi.json
