# Google Trends API: Trending Searches Now by Country (`loamy_barista/google-trends-api`) Actor

Get what people are searching on Google right now, by country or US state: trending query, approximate search volume, start time and the top news articles behind each trend. Monitor mode returns only new trends. No login, no proxy.

- **URL**: https://apify.com/loamy_barista/google-trends-api.md
- **Developed by:** [Keel Data](https://apify.com/loamy_barista) (community)
- **Categories:** SEO tools, Developer tools, AI
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 trending search results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 API: Trending Searches Now by Country

Get **what people are searching on Google right now** in any country or US state: the trending query, its approximate search volume, when it started trending, and the news articles behind it. One call covers several countries. Reads the public Google Trends "Trending Now" feed, so runs take seconds and need no login and no proxy.

### What it returns

One row per trending search per geo. The same 19 fields on every run, in the same order; missing values are `null`.

| Field | Example | Notes |
|---|---|---|
| geo | `US` | Country code or US state (`US-CA`) |
| rank | `1` | Position in that geo's trending list |
| query | `galatasaray vs aston villa` | The search people are typing |
| approxTraffic / approxTrafficMin | `2000+` / `2000` | Google's approximate searches; the number is the lower bound |
| startedAt | `2026-11-24T16:50:00Z` | When the trend started (UTC) |
| newsCount | `3` | News articles Google links to the trend |
| topNewsTitle / topNewsUrl / topNewsSource | `Emery insists no change of plan...` / `https://www.theguardian.com/...` / `The Guardian` | Lead article |
| newsItems | `[{"title": ..., "url": ..., "source": ...}]` | JSON string, up to `maxNewsPerTrend` articles |
| pictureUrl / pictureSource | `https://encrypted-tbn0.gstatic.com/...` / `The Guardian` | Thumbnail Google shows |
| exploreUrl | `https://trends.google.com/trends/explore?q=...&geo=US&date=now%201-d` | Open the trend chart |
| googleSearchUrl | `https://www.google.com/search?q=...` | |
| changeType | `new` | Set in monitor mode, otherwise `null` |
| language / source / scrapedAt | `en-US` / `google-trends-trending-now-rss` / ISO 8601 | |

Sample from the health run on 2026-11-24 (US): `galatasaray vs aston villa`, 2000+ searches, started 16:50 UTC, lead article from The Guardian.

### Use cases

- **Content and newsrooms:** see which stories are breaking in search, per market, every hour.
- **SEO and marketing:** catch rising queries early and brief writers before competitors do.
- **Trading and research signals:** log trending topics per country over time.
- **AI agents:** "what is trending in Germany right now and why?" answered in one call with sources.

### Pricing

Pay per result: **$0.004 per trending search row**. 1,000 rows = $4.00. A default run (5 countries) returns about 50 rows, about $0.20, plus a $0.00005 start fee per run. Geos that fail and trends already seen in monitor mode are free. Set `maxItems` to cap spend.

### Input

Runs with zero configuration (US, GB, CA, AU and IN are prefilled).

- `geos`: country codes (`US`, `DE`, `JP`, `BR`) or US states (`US-CA`). Invalid codes are listed in `RUN_SUMMARY`.
- `keywords`: optional filter on the query and headlines, e.g. `["bitcoin", "election"]`.
- `includeNews`, `maxNewsPerTrend`: control the news fields.
- `onlyNew` + `monitorId`: monitor mode, below.
- `maxItems`, `language`, `proxyConfiguration` (off by default).

### Monitor mode (scheduled runs)

Set `onlyNew: true` and schedule the Actor hourly or daily. Each run returns only trends that the same `monitorId` has not returned in the last 7 days, and you pay only for those. Ideal for alerts into Slack, a sheet or a webhook.

### Switching from apify/google-trends-scraper

Field names you already use are accepted: `geo` is read as `geos`, `searchTerms` is read as the keyword filter, `maxItems` works as before. Fields that only apply to interest-over-time charts (`timeRange`, `category`, `isMultiple`) are ignored and listed in `RUN_SUMMARY`.

| Their input | This Actor |
|---|---|
| `{"geo": "US", "searchTerms": ["bitcoin"], "maxItems": 50}` | same input works, or `{"geos": ["US"], "keywords": ["bitcoin"], "maxItems": 50}` |

Note the difference: this Actor returns the **trending-now list** for each geo. It does not yet return interest-over-time charts for a keyword you choose.

### For AI agents (Apify MCP)

- Minimal call: `{"geos": ["US"], "maxItems": 20}`. Finishes in a few seconds.
- Output is a flat JSON array; the field list above is exhaustive and stable.
- `RUN_SUMMARY` in the key-value store lists failed geos, invalid codes and how many rows were filtered or already seen.

### Limits

- Google publishes about 10 to 25 trending searches per geo at a time; volume is approximate ("2000+").
- Interest over time, related queries and categories are not included in this version.
- Some small countries have no trending feed; they are reported as failed and not charged.

### FAQ

**Is it legal?** It reads a public feed Google publishes to every anonymous visitor (robots.txt allows it), uses no login, and returns no personal data: only search topics and public news links.
**Does it need a login or proxies?** No login. Proxy is optional and off by default.
**What if it breaks?** It is health-tested every day and fixed the same day. Open an issue on the Issues tab and it is answered within 24 hours.

### More from Keel Data

Tested daily; failures are fixed the same day.

- [Greenhouse Jobs API: Lever and Ashby Job Board Scraper](https://apify.com/loamy_barista/ats-job-board-scraper)
- [Remote Jobs Aggregator: Himalayas, Jobicy, Arbeitnow, Remote OK](https://apify.com/loamy_barista/remote-jobs-aggregator)
- [Shopify Products JSON Scraper](https://apify.com/loamy_barista/shopify-store-products)
- [PDF Text Extractor for AI and RAG](https://apify.com/loamy_barista/pdf-text-extractor)
- [Website Tech Stack Detector: CMS, Analytics, Hosting, Pixels](https://apify.com/loamy_barista/website-tech-stack-detector)

If this Actor saved you time, a short review on the Store page helps other builders find it.

# Actor input Schema

## `geos` (type: `array`):

Google Trends geo codes, one per line: 2-letter country codes (US, GB, DE, IN, JP, BR) or US states (US-CA, US-NY). About 10 to 25 trending searches per geo. Also accepted as 'geo' (leader field name) or 'countries'.

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

Return only trends whose query or news headlines contain one of these words (case-insensitive). Empty returns every trend. Also accepted as 'searchTerms'.

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

Stop after this many trend rows (caps spend).

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

Add the top news headline, URL and source for each trend, plus up to maxNewsPerTrend articles as JSON in newsItems.

## `maxNewsPerTrend` (type: `integer`):

How many news articles to keep in newsItems (0-10).

## `onlyNew` (type: `boolean`):

Return only trends not returned by an earlier run with the same monitorId (remembered for 7 days). Already-seen trends are skipped and not charged. Use with an hourly or daily schedule.

## `monitorId` (type: `string`):

Name for the monitor memory (keeps separate watch lists apart). Only used when onlyNew is true.

## `language` (type: `string`):

Interface language code sent to Google Trends, e.g. en-US. Trend queries stay in the language people searched in.

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

Optional. The feed answers without a proxy; turn on Apify Proxy only if you see HTTP 429 errors.

## Actor input object example

```json
{
  "geos": [
    "US",
    "GB",
    "CA",
    "AU",
    "IN"
  ],
  "keywords": [],
  "maxItems": 200,
  "includeNews": true,
  "maxNewsPerTrend": 3,
  "onlyNew": false,
  "monitorId": "default",
  "language": "en-US",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Dataset rows: one record per trending search per geo, with approximate volume, start time and top news.

# 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 = {
    "geos": [
        "US",
        "GB",
        "CA",
        "AU",
        "IN"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("loamy_barista/google-trends-api").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 = { "geos": [
        "US",
        "GB",
        "CA",
        "AU",
        "IN",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("loamy_barista/google-trends-api").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 '{
  "geos": [
    "US",
    "GB",
    "CA",
    "AU",
    "IN"
  ]
}' |
apify call loamy_barista/google-trends-api --silent --output-dataset

```

## MCP server setup

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

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/aJZC2jx29CAPnJCSq/builds/esfduVzQ0GIjhbW4X/openapi.json
