# Google Trending Searches (`agarwoods/google-trending-searches`) Actor

- **URL**: https://apify.com/agarwoods/google-trending-searches.md
- **Developed by:** [Ishaan Pare](https://apify.com/agarwoods) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.28 / 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 Trending Searches and Top Terms

Get the searches trending right now on Google Trends for many countries in one run, at $1.50 per 1,000 results. Use it for news desks, content planning, market monitoring and AI agents that need to know what people are searching for today.

This Actor reads only Google's public Trending now feed and Google's public BigQuery dataset. It gives you what those sources contain, which is narrower than the Google Trends website. See What this Actor doesn't do before you buy.

### What you get

- One row per trending search, for each country you list
- The search term, Google's approximate traffic label and the time the feed gives
- Related news headlines, snippets and links, and a picture link when the feed lists one
- A free status row for every country or keyword that couldn't be read or matched
- With your own Google Cloud key: the top 25 or rising 25 terms from Google's public BigQuery dataset, with rank, a 0 to 100 score, weekly history for those terms, and optional regional detail

### Sample output

A trending search, in this format:

```json
{
  "recordType": "result",
  "source": "trending_rss",
  "country": "US",
  "countryName": "United States",
  "term": "solar eclipse",
  "matchedKeywords": [],
  "approxTraffic": "2000+",
  "approxTrafficMin": 2000,
  "publishedAt": "2026-11-02T10:20:00.000Z",
  "rank": null,
  "score": null,
  "percentGain": null,
  "week": null,
  "refreshDate": null,
  "regionName": null,
  "regionCode": null,
  "pictureUrl": "https://example.com/picture.jpg",
  "pictureSource": "Example Daily",
  "newsItems": [
    {
      "title": "Crowds gather for the eclipse",
      "snippet": "A short summary of the story.",
      "url": "https://example.com/story",
      "source": "Example Daily",
      "pictureUrl": "https://example.com/story.jpg"
    }
  ],
  "sourceUrl": "https://trends.google.com/trending/rss?geo=US",
  "keyword": null,
  "status": null,
  "reason": null,
  "fetchedAt": "2026-11-02T10:30:00.000Z"
}
```

This example shows the format, and the values are made up.

### How to use it

1. Add country codes, one per line, such as US, GB or IN.
2. Add keywords if you only want terms that contain certain words. Otherwise leave that list empty.
3. Set Maximum results, then press Start.

Check the status rows after each run. If you only want data, filter on recordType equal to result.

### Using BigQuery for top and rising terms

The trending searches source needs no key. The two BigQuery sources read the public Google Trends dataset through your own Google Cloud account:

1. In Google Cloud, create a service account in a project of yours and give it the BigQuery Job User role.
2. Create a JSON key for it, and paste the whole file into Google Cloud key.
3. Set Source to Top terms or Rising terms, then press Start.

Apify stores that field encrypted, and the Actor doesn't write the key to the log or the dataset. The queries run in your project, so Google bills any BigQuery cost to you, separately from this Actor's price. Google's blog says the dataset is covered by BigQuery's free tier up to 1 TB of queries a month. Maximum data per query limits what a single query can read.

The Actor returns only recent data. If a table has nothing from the last 7 days, you get a free stale_data row instead of old results. Google's dataset covers the US and about 50 other countries.

### What this Actor doesn't do

Google's robots.txt asks automated tools not to read the Trends explore pages, so this Actor doesn't read them or the private addresses behind them. That rules out what many Google Trends scrapers offer:

- No interest over time for a keyword you choose. Keywords here only filter terms Google already lists, so a keyword that isn't trending gets a no_match row, not a chart.
- No keyword comparison, related queries, related topics or interest by region for a keyword you choose.
- No category filter or custom date range.

If you need those, this isn't the right Actor. Google has a Trends API for them, but it's a limited alpha that needs your own access from Google, and this Actor doesn't use it.

### Pricing

You pay only for what you get, and Apify platform usage is included.

| Event | Price |
| --- | --- |
| Each result delivered | $0.0015 ($1.50 per 1,000) |
| Each run started | Apify's default, about $0.00005 |

Status rows are free. A run with Maximum results left at 100 costs at most about $0.15.

On the free Apify plan, each run returns up to 100 results, and a status row tells you when you reach that limit. Any paid Apify plan removes it.

With BigQuery, each row is a result, so more weeks of history or regional detail cost more. Region detail can return a row for every term in every region of a country, so set Maximum results to what you're willing to pay for.

### Status rows

The Actor always tells you what happened. Each of these is a free row with recordType set to status:

| Status | Meaning |
| --- | --- |
| no_input | No countries were given, so nothing was read |
| invalid_input | An entry wasn't a two-letter country code |
| blocked | Google refused the run, so it stopped and didn't try another way |
| robots_blocked | Google's robots.txt doesn't allow this feed, so it wasn't requested |
| robots_unavailable | robots.txt couldn't be checked, so no feed was read |
| not_found | Google has no feed for this country |
| failed | This country couldn't be read, and reason says why |
| no_results | The source was read, and it has nothing for this country |
| no_match | A keyword wasn't among the terms read |
| not_read | The run stopped before reaching this country |
| credentials_required | A BigQuery source was chosen with no key |
| credentials_invalid | The pasted key can't be used, and reason says why |
| credentials_rejected | Google didn't accept the key |
| stale_data | The BigQuery table has nothing from the last 7 days |
| query_too_large | A query would read more than Maximum data per query allows |
| query_failed | Google couldn't run the query, and reason says why |
| max_results | The run reached your Maximum results |
| free_limit | The run reached the free plan limit |
| spending_limit | The run reached your maximum cost |

A run that can't read anything still finishes normally with these rows, so check them rather than the run status alone.

### Good to know

- Trending searches change through the day, and the feed decides how many it lists per country. Run the Actor on a schedule if you want a record over time, because the feed doesn't keep a history.
- Traffic is Google's rough label, not a count. approxTrafficMin is that label as a number.
- Countries are read one at a time, about a second apart, or slower if robots.txt asks.
- There's no proxy option. The Actor reads under its own name, and it stops if Google refuses it.
- BigQuery rows have a score only for weeks where the dataset gives one. Other weeks are left out.
- If you run out of budget or results partway, the rows already delivered are kept.

### Using it with AI agents

The main inputs are lists, every field is optional, and the default source needs no credentials. An agent can cover many countries in one call and read status rows to see what went wrong.

### Data and use

The trending searches source reads Google's public Trending now feed and robots.txt. The BigQuery sources read Google's public dataset with your key. The Actor uses no login to Google Trends and collects no personal data. Search terms can name people, so take care with how you use them. News headlines and pictures belong to their publishers, so check their terms before you republish them. You are responsible for how you use the data, including under Google's terms. Google asks anyone reusing this data to credit it, for example "Data source: Google Trends" with a link to trends.google.com. This Actor is not affiliated with or endorsed by Google.

### Support

Open an issue on the Issues tab with your input and what you expected.

# Actor input Schema

## `countries` (type: `array`):

Two-letter country codes, one per line, such as US, GB or IN. Each country is read separately, and one that fails gets its own status row while the others carry on. An empty list gives a free status row and no results.

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

Keep only terms that contain one of these words, ignoring case. Leave empty to get every term. This filters terms Google already lists. It does not look up a keyword that isn't listed, and a keyword with no match gets a free status row.

## `source` (type: `string`):

Where the data comes from. Trending searches uses Google's public feed and needs no key. The two BigQuery sources use the public Google Trends dataset through your own Google Cloud key.

## `maxResults` (type: `integer`):

Stop after this many results. This also caps the cost. Free Apify plans get up to 100 results per run.

## `includeNews` (type: `boolean`):

Trending searches only. Add the news headlines and links that the feed lists with each search.

## `googleServiceAccountJson` (type: `string`):

BigQuery sources only. Paste the whole JSON key of a Google Cloud service account that has the BigQuery Job User role. Apify stores this field encrypted, and the Actor never writes it to the log or dataset. Queries run in that key's project, so any BigQuery cost is billed to you by Google.

## `historyWeeks` (type: `integer`):

BigQuery sources only. How many of the most recent weeks to return for each term, one row per week. Each result is billed, so more weeks cost more.

## `regionDetail` (type: `boolean`):

BigQuery sources only. Off gives one row per term and week for each country, with the highest regional score. On gives a row for every region, which is many more billed results.

## `maxQueryGigabytes` (type: `integer`):

BigQuery sources only. Google refuses to run a query that would read more than this, which protects your Google Cloud bill. A refused query gives a free status row.

## Actor input object example

```json
{
  "countries": [
    "US",
    "GB",
    "DE",
    "IN",
    "BR"
  ],
  "keywords": [],
  "source": "trending_rss",
  "maxResults": 100,
  "includeNews": true,
  "historyWeeks": 1,
  "regionDetail": false,
  "maxQueryGigabytes": 20
}
```

# 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 = {
    "countries": [
        "US",
        "GB",
        "DE",
        "IN",
        "BR"
    ],
    "keywords": [],
    "source": "trending_rss",
    "maxResults": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("agarwoods/google-trending-searches").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 = {
    "countries": [
        "US",
        "GB",
        "DE",
        "IN",
        "BR",
    ],
    "keywords": [],
    "source": "trending_rss",
    "maxResults": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("agarwoods/google-trending-searches").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 '{
  "countries": [
    "US",
    "GB",
    "DE",
    "IN",
    "BR"
  ],
  "keywords": [],
  "source": "trending_rss",
  "maxResults": 100
}' |
apify call agarwoods/google-trending-searches --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,agarwoods/google-trending-searches"
        }
    }
}
```

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/d3BVcefNIVBYNMxBq/builds/z3pzCfxearvKLETr0/openapi.json
