# Google Trends by State & Country

**Use case:** 

See where each keyword is searched most: Google Trends interest by US state, by region in any other country, or by country when the location is left empty. Works for thousands of keywords per run, and every keyword also gets its 0-100 trend line, so you see where and when demand grows. Trend line plus regions, $2.00 per 1,000 keywords.

## Input

```json
{
  "keywords": [
    "solar panels",
    "pickleball",
    "matcha"
  ],
  "preset": "market",
  "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 by State & Country". [Sign up or log in](https://console.apify.com/create-task-from-example/WCjacl1Z1lsuDWNm2) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Google Trends by State & Country" 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 by State & Country" 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 by State & Country" task via API](https://apify.com/clean-fetch/google-trends-scraper.md).

## FAQ

### How do I get Google Trends by country?

Leave Location empty, and the Google Trends by State & Country task returns interest by country worldwide. Enter a country code such as GB or IN to get that country's regions instead.

### Can I get regions for several countries in one run?

Add country codes under Several locations, and the Google Trends by State & Country task returns the regions of each country for every keyword in the same run.

### What does a regional score of 100 mean?

In the Google Trends by State & Country task, 100 marks the state or country where the keyword takes the largest share of all searches. Other places are scored relative to it.

### How much does regional Google Trends data cost?

The Google Trends by State & Country task costs $2.00 per 1,000 keywords for the trend line plus regions. Keywords with too little search volume 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`).
