# Google Trends API: Reliable pytrends Alternative

**Use case:** 

Replace pytrends with a hosted Google Trends API. Call it from Python, JavaScript or any HTTP client and get clean JSON for each keyword: interest over time, interest by region, related queries and related topics. Google's rate limits, proxies and retries are handled for you, for thousands of keywords per call. All four parts, $4.00 per 1,000 keywords.

## Input

```json
{
  "keywords": [
    "air fryer",
    "pickleball",
    "ai agents"
  ],
  "preset": "complete",
  "geo": "US",
  "timeRange": "today 12-m",
  "property": "web",
  "category": 0,
  "outputFormat": "perKeyword",
  "language": "en-US",
  "maxTopicsWaitMinutes": 15
}
```

## Output

```json
{
  "keyword": {
    "label": "Keyword",
    "format": "text"
  },
  "location": {
    "label": "Location",
    "format": "text"
  },
  "timeRangeLabel": {
    "label": "Time range",
    "format": "text"
  },
  "status": {
    "label": "Status",
    "format": "text"
  },
  "statusMessage": {
    "label": "Result",
    "format": "text"
  },
  "interestOverTime": {
    "label": "Interest over time (every point)",
    "format": "array"
  },
  "interestByRegion": {
    "label": "Interest by region (every region)",
    "format": "array"
  },
  "interestByMetro": {
    "label": "Interest by metro area",
    "format": "array"
  },
  "interestByCity": {
    "label": "Interest by city",
    "format": "array"
  },
  "relatedQueries": {
    "label": "Related queries (top and rising)",
    "format": "object"
  },
  "relatedTopics": {
    "label": "Related topics (top and rising)",
    "format": "object"
  },
  "googleTrendsUrl": {
    "label": "Open in Google Trends",
    "format": "link"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Google Trends API & Scraper: Regions, Related Queries & Topics Actor is ready to run with the inputs already set for "Google Trends API: Reliable pytrends Alternative". [Sign up or log in](https://console.apify.com/create-task-from-example/nK6df3qRNsa9a5VoT) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Google Trends API: Reliable pytrends Alternative" task

The Google Trends API & Scraper: Regions, Related Queries & Topics Actor will start running based on the input automatically. You can also change all the input fields, like keywords, what to get, and more, to match your specific use case.

### 3. Receive the "Google Trends API: Reliable pytrends Alternative" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as keyword, location, time range, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Google Trends API: Reliable pytrends Alternative" task via API](https://apify.com/clean-fetch/google-trends-scraper.md).

## FAQ

### Why does pytrends return 429 errors?

pytrends sends requests straight from your own IP, and Google answers too many of them with 429 Too Many Requests. The Google Trends API on Apify handles rate limits with proxies included, so your code only reads results.

### How do I call the Google Trends API from Python?

Install apify-client, call client.actor('clean-fetch/google-trends-scraper').call(run_input=...) and read the run's dataset. The Google Trends API returns one JSON item per keyword.

### Can I reuse my existing Google Trends inputs?

The Google Trends API accepts searchTerms in the format of Apify's Google Trends Scraper and pasted trends.google.com explore links, so you can switch without rewriting your input.

### How much does the Google Trends API cost?

The Google Trends API costs $4.00 per 1,000 keywords for all four parts, or less if you pick only the parts you need. Keywords Google has no data for are free.

## About this Actor

This example demonstrates how to use [Google Trends API & Scraper: Regions, Related Queries & Topics](https://apify.com/clean-fetch/google-trends-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/clean-fetch/google-trends-scraper.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/clean-fetch/google-trends-scraper.md

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`).
