# UK Google Trends Scraper: Interest, Regions & Related Queries (`seaf999ield/uk-google-trends`) Actor

UK Google Trends scraper and API: interest over time, by region (England, Scotland, Wales, NI), related queries and topics, for the UK or any country, by RawTrader | UK Industry & Bills: https://ukindustryandbills.substack.com · X: x.com/ImRawTrader

- **URL**: https://apify.com/seaf999ield/uk-google-trends.md
- **Developed by:** [RustonRoad](https://apify.com/seaf999ield) (community)
- **Categories:** SEO tools, Marketing, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 trends result rows

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

## UK Google Trends Scraper: Interest, Regions & Related Queries

**Get Google Trends interest over time, by region (England, Scotland, Wales, NI) and related queries for the UK or any country.**

### Who it's for

- SEO and content teams choosing UK keywords and topics
- Marketers comparing brand or product interest across UK nations
- Analysts adding search-interest signals to reports

### Sample output

| termsText | geoName | timeframe | status |
|---|---|---|---|
| heating oil prices | United Kingdom | today 12-m | ok |

*Real rows from a test run (shortened; the full output has more fields).*

### Price per 1,000 results

Main event: **`result-row` at $0.002 each**, so **1,000 results = $2.00**. See the Pricing tab for the current prices.

### Input example

```json
{
  "searchTerms": [
    "energy price cap",
    "vinted, ebay, depop"
  ],
  "geos": [
    "GB"
  ]
}
```

**Get Google Trends data for the UK, or for any country, without the failed runs.** This actor returns interest over time, interest by region (England, Scotland, Wales and Northern Ireland, down to cities), and top and rising related queries, including "Breakout" terms. You can compare up to 5 keywords on one 0–100 scale, run as many comparisons as you like in one go, and start from ready-made **UK keyword presets**: energy price cap, fuel and heating oil, redundancies, steel, carmakers, cost of living, Vinted and Black Friday, and more.

Built for UK analysts, journalists, marketers, ecommerce sellers, resellers and researchers who need Google Trends data to arrive every time.

**Free weekly newsletter**, UK Industry & Bills: https://ukindustryandbills.substack.com

### Why this Google Trends scraper?

- 🔁 **Built for reliability.** Google rate-limits Trends traffic hard (HTTP 429). Each comparison gets up to **6 automatic retries** with exponential backoff, and every retry uses a **fresh residential UK proxy session**. Data that was already fetched is kept between retries, so nothing is downloaded twice.
- ✅ **Tested at scale.** In a 545-query cloud load test (10 parallel sessions, 20 Oct 2026), **543 of 545 comparisons completed fully (99.6%)**. The other 2 came back with partial data and a clear reason. There were **0 empty or failed runs**. Google sent 370 rate-limit responses during the test, and the retries absorbed all of them.
- 🇬🇧 **UK first.** The default location is `GB`, on a UK residential proxy, with UK dates (Europe/London). One tick adds **GB + England + Scotland + Wales + Northern Ireland**, and **8 curated UK presets** are included.
- 🌍 **Works anywhere.** Use any country (`IE`, `US`, `DE`…), sub-region (`US-CA`, `GB-SCT`) or `WORLDWIDE`.
- 🧾 **No silent failures.** Every comparison × location ends as a row. If something still fails after all retries, you get an **error row with the reason** in the *Errors* view. You **are never charged** for error, partial or no-data rows.
- 📊 **Analysis-ready.** Each row includes per-term `average`, `latest`, `peak`, `peakDate` and `recentChangePct`, plus a link to open the same query on trends.google.com.
- 💷 **Cheap.** You pay per successful result row. A whole comparison (time series + regions + related queries) is **one row**.

### What data can I get?

| Output | What you get |
|---|---|
| **Interest over time** | 0–100 time series per term: date, formatted time, partial-period flag |
| **Interest by region** | 0–100 per sub-region (for GB: the 4 nations; for a nation: cities), with coordinates for cities |
| **Related queries** | Top and rising related searches per term, with values (`+250%`, `Breakout`) and links |
| **Related topics** | Top and rising related topics (optional; see the limitations below) |
| **Summary** | Average, latest, peak value and date, recent change % per term |

### Use cases

- **SEO and content teams:** find rising UK search terms and seasonal peaks before competitors.
- **Ecommerce sellers and resellers:** time stock and promotions (Black Friday, Vinted, seasonal products) with UK demand data.
- **Journalists and analysts:** chart public interest in the energy price cap, cost of living, redundancies or elections by UK nation.
- **Marketers and agencies:** compare brands or products on one 0–100 scale across England, Scotland, Wales and Northern Ireland.
- **Researchers and data teams:** schedule recurring pulls into Sheets, BigQuery or dashboards via the API.

### UK presets

| Preset | Example comparisons |
|---|---|
| UK energy price cap & Ofgem | `energy price cap, ofgem, energy bills` · `octopus energy, british gas, ovo energy, eon, edf` · `standing charge` |
| Diesel, petrol & heating oil | `diesel prices, petrol prices` · `heating oil prices` · `heating oil, kerosene` · `fuel duty` |
| Redundancies & administration | `redundancy, administration` · `redundancy pay` · `into administration` · `job cuts, factory closure` |
| UK steel | `british steel` · `port talbot, scunthorpe` · `tata steel` · `steel prices` |
| UK carmakers | `nissan sunderland` · `jaguar land rover` · `nissan sunderland, jaguar land rover, mini oxford, toyota burnaston, vauxhall ellesmere port` |
| Cost of living, Vinted & Black Friday | `cost of living` · `cost of living payment` · `vinted, ebay, depop` · `black friday deals, cyber monday` |
| UK motorcycle gear (evergreen) | `motorcycle helmet, motorcycle jacket, motorcycle boots, motorcycle gloves` · `heated motorcycle gloves` |
| UK reselling & side hustles (evergreen) | `vinted, depop, ebay` · `car boot sale` · `vinted fees` · `hmrc side hustle tax` |

Presets are added on top of your own search terms, and you can pick several at once.

### How to use it

1. Enter search terms, **one comparison per line**. Put up to 5 terms on a line, separated by commas, to compare them.
2. Optionally pick one or more **UK presets**.
3. Choose locations (default `GB`) or tick **Add all UK nations**.
4. Pick a timeframe, a category and the search type (web, news, images, Shopping, YouTube).
5. Click **Start**. Results appear in the Overview, Interest over time, Interest by region, Related and Errors views. You can export them as JSON, CSV, Excel or via the API.

#### Example input

```json
{
  "searchTerms": ["energy price cap", "vinted, ebay, depop"],
  "presets": ["uk_diesel_heating_oil"],
  "geos": ["GB"],
  "ukNationsBundle": true,
  "timeframe": "today 3-m",
  "category": "0",
  "searchProperty": "web",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "includeRelatedQueries": true,
  "outputLayout": "combined",
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "GB" },
  "maxRetries": 6,
  "maxConcurrency": 5
}
```

Timeframes: `now 1-H`, `now 4-H`, `now 1-d`, `now 7-d`, `today 1-m`, `today 3-m`, `today 12-m`, `today 5-y`, `all`, or a custom `YYYY-MM-DD YYYY-MM-DD`.

#### Example output (real sample)

| termsText | geoName | term | average | latest | peak | peakDate | recentChangePct |
|---|---|---|---|---|---|---|---|
| energy price cap vs ofgem vs energy bills | Scotland | energy price cap | 13 | 13 | 52 | 2026-09-13 | -38.8 |
| energy price cap vs ofgem vs energy bills | United Kingdom | energy price cap | 24 | 14 | 61 | 2026-05-24 | -48.4 |
| energy price cap | United Kingdom | energy price cap | 40.1 | 24 | 100 | 2026-05-24 | -48.7 |

#### Example output (one combined row, shortened)

```json
{
  "type": "trends",
  "status": "ok",
  "terms": [
    "vinted",
    "ebay",
    "depop"
  ],
  "termsText": "vinted vs ebay vs depop",
  "geo": "GB",
  "geoName": "United Kingdom",
  "timeframe": "today 12-m",
  "timeRange": "2025-10-20 2026-10-20",
  "resolution": "WEEK",
  "categoryName": "All categories",
  "attempts": 2,
  "retryLog": [
    "attempt 1: widgetdata/relatedsearches: HTTP 429"
  ],
  "summary": {
    "vinted": {
      "average": 30,
      "latest": 38,
      "peak": 40,
      "peakDate": "2026-09-06",
      "recentChangePct": -4.2
    },
    "ebay": {
      "average": 89,
      "latest": 87,
      "peak": 100,
      "peakDate": "2025-11-23",
      "recentChangePct": -0.6
    },
    "depop": {
      "average": 2,
      "latest": 1,
      "peak": 2,
      "peakDate": "2025-10-19",
      "recentChangePct": 0
    }
  },
  "risingQueriesPreview": [
    "vinted: vinted france (+550%)",
    "vinted: vinted uk search (+250%)",
    "vinted: vinted usa (+200%)"
  ],
  "interestOverTime": [
    {
      "date": "2025-10-19",
      "timestamp": 1760832000,
      "formattedTime": "19 – 25 Oct 2025",
      "isPartial": false,
      "values": {
        "vinted": 29,
        "ebay": 98,
        "depop": 2
      }
    },
    {
      "date": "2025-10-26",
      "timestamp": 1761436800,
      "formattedTime": "26 Oct – 1 Nov 2025",
      "isPartial": false,
      "values": {
        "vinted": 30,
        "ebay": 97,
        "depop": 2
      }
    },
    {
      "date": "2025-11-02",
      "timestamp": 1762041600,
      "formattedTime": "2 – 8 Nov 2025",
      "isPartial": false,
      "values": {
        "vinted": 31,
        "ebay": 97,
        "depop": 2
      }
    }
  ],
  "interestByRegion": [
    {
      "geoCode": "GB-WLS",
      "geoName": "Wales",
      "hasData": true,
      "values": {
        "vinted": 25,
        "ebay": 75,
        "depop": 0
      }
    },
    {
      "geoCode": "GB-ENG",
      "geoName": "England",
      "hasData": true,
      "values": {
        "vinted": 24,
        "ebay": 75,
        "depop": 1
      }
    },
    {
      "geoCode": "GB-NIR",
      "geoName": "Northern Ireland",
      "hasData": true,
      "values": {
        "vinted": 25,
        "ebay": 74,
        "depop": 1
      }
    }
  ],
  "relatedQueries": {
    "vinted": {
      "top": [
        {
          "query": "vinted uk",
          "value": 100,
          "formattedValue": "100",
          "link": "https://trends.google.com/trends/explore?q=vinted+uk&date=today+12-m&geo=GB"
        },
        {
          "query": "vinted app",
          "value": 8,
          "formattedValue": "8",
          "link": "https://trends.google.com/trends/explore?q=vinted+app&date=today+12-m&geo=GB"
        },
        {
          "query": "vinted login",
          "value": 8,
          "formattedValue": "8",
          "link": "https://trends.google.com/trends/explore?q=vinted+login&date=today+12-m&geo=GB"
        }
      ],
      "rising": [
        {
          "query": "vinted france",
          "value": 550,
          "formattedValue": "+550%",
          "link": "https://trends.google.com/trends/explore?q=vinted+france&date=today+12-m&geo=GB"
        },
        {
          "query": "vinted uk search",
          "value": 250,
          "formattedValue": "+250%",
          "link": "https://trends.google.com/trends/explore?q=vinted+uk+search&date=today+12-m&geo=GB"
        },
        {
          "query": "vinted usa",
          "value": 200,
          "formattedValue": "+200%",
          "link": "https://trends.google.com/trends/explore?q=vinted+usa&date=today+12-m&geo=GB"
        }
      ]
    },
    "ebay": {
      "top": [
        {
          "query": "ebay uk",
          "value": 100,
          "formattedValue": "100",
          "link": "https://trends.google.com/trends/explore?q=ebay+uk&date=today+12-m&geo=GB"
        },
        {
          "query": "my ebay",
          "value": 9,
          "formattedValue": "9",
          "link": "https://trends.google.com/trends/explore?q=my+ebay&date=today+12-m&geo=GB"
        },
        {
          "query": "ebay login",
          "value": 6,
          "formattedValue": "6",
          "link": "https://trends.google.com/trends/explore?q=ebay+login&date=today+12-m&geo=GB"
        }
      ],
      "rising": [
        {
          "query": "beatrix potter 50p coin ebay",
          "value": 1850,
          "formattedValue": "+1,850%",
          "link": "https://trends.google.com/trends/explore?q=beatrix+potter+50p+coin+ebay&date=today+12-m&geo=GB"
        },
        {
          "query": "brexit 50p coin ebay listing price",
          "value": 1800,
          "formattedValue": "+1,800%",
          "link": "https://trends.google.com/trends/explore?q=brexit+50p+coin+ebay+listing+price&date=today+12-m&geo=GB"
        },
        {
          "query": "ebay app not working",
          "value": 300,
          "formattedValue": "+300%",
          "link": "https://trends.google.com/trends/explore?q=ebay+app+not+working&date=today+12-m&geo=GB"
        }
      ]
    },
    "depop": {
      "top": [
        {
          "query": "vinted",
          "value": 100,
          "formattedValue": "100",
          "link": "https://trends.google.com/trends/explore?q=vinted&date=today+12-m&geo=GB"
        },
        {
          "query": "depop uk",
          "value": 97,
          "formattedValue": "97",
          "link": "https://trends.google.com/trends/explore?q=depop+uk&date=today+12-m&geo=GB"
        },
        {
          "query": "ebay",
          "value": 45,
          "formattedValue": "45",
          "link": "https://trends.google.com/trends/explore?q=ebay&date=today+12-m&geo=GB"
        }
      ],
      "rising": [
        {
          "query": "vinted co uk",
          "value": 750,
          "formattedValue": "+750%",
          "link": "https://trends.google.com/trends/explore?q=vinted+co+uk&date=today+12-m&geo=GB"
        },
        {
          "query": "whatnot",
          "value": 250,
          "formattedValue": "+250%",
          "link": "https://trends.google.com/trends/explore?q=whatnot&date=today+12-m&geo=GB"
        },
        {
          "query": "crosslist",
          "value": 250,
          "formattedValue": "+250%",
          "link": "https://trends.google.com/trends/explore?q=crosslist&date=today+12-m&geo=GB"
        }
      ]
    }
  },
  "trendsUrl": "https://trends.google.com/trends/explore?date=today%2012-m&q=vinted%2Cebay%2Cdepop&hl=en-GB&geo=GB"
}
```

An error row looks like this. It is never charged:

```json
{ "type": "error", "status": "error", "termsText": "energy price cap", "geo": "GB-SCT", "attempts": 7,
  "errorMessage": "Failed after 7 attempts: attempt 7: widgetdata/multiline: HTTP 429",
  "retryLog": ["attempt 1: widgetdata/multiline: HTTP 429", "…"] }
```

`status` values: `ok` (charged), `no_data` (Google has too little search volume; free), `partial` (some sections missing after all retries; free, and the data that was fetched is still included), `error` (free).

Each run also writes a **`RUN_SUMMARY`** record to the key-value store. It shows the success rate, the attempts histogram and HTTP status counts, so you can check reliability yourself.

### Output layouts

- **Combined** (default): one row per comparison × location holding every section. This is the cheapest option.
- **Split**: one row per section (time series, regions, related queries). It is easier to filter or export to separate sheets, and each section row counts as a result.

### How much does it cost?

**In plain words:** **$2 per 1,000 successful result rows** ($0.002 each). In the default combined layout one comparison (time series, regions and related queries) is one row, so 1,000 keyword comparisons cost about $2. Error, partial and no-data rows are free.

The actor uses pay-per-event pricing: you pay per successful result row, plus Apify's standard actor-start event. Error, partial and no-data rows are free. A typical run of 100 comparisons in combined layout produces about 100 result rows. Set **Maximum cost per run** in the run options to cap spend; the actor stops cleanly when that cap is reached.

### Limitations (honest list)

- Google Trends values are **relative (0–100)** within each comparison. They are not absolute search volumes.
- **Related topics:** Google currently withholds related topics from automated requests for most queries and returns an empty list. When that happens the row records it in `unavailableSections`, and you are not charged extra. Related queries are unaffected. The option is off by default.
- Very small locations or niche terms can return `no_data`. That is Google's privacy threshold, not a scraping failure.
- Up to 5 terms per comparison, which is a Google limit.

### FAQ

**Is scraping Google Trends legal?** This actor reads publicly available, aggregated Google Trends data and needs no login. It collects no personal data. Check that your use complies with Google's terms and the laws that apply to you.

**Why a residential proxy?** Google rate-limits Trends heavily. In our tests, rotating UK residential sessions with backoff turned 87–90% first-pass success into 100%. You can switch to datacenter or no proxy in the Proxy setting for cheaper small runs.

**Can I schedule it?** Yes. Use Apify Schedules (for example, daily UK presets), and connect the results to Google Sheets, Slack, Make, Zapier or webhooks with Apify integrations.

**Can I use it through the API or with AI agents?** Yes. Call it with the Apify API or SDK, or through the Apify MCP server. The output schema describes every view.

### Related UK data actors

- [Amazon UK Bestsellers Scraper: Movers & New Releases](https://apify.com/seaf999ield/amazon-uk-bestsellers)
- [UK Energy Price Cap Scraper: Ofgem Rates by Region + Forecast](https://apify.com/seaf999ield/uk-ofgem-price-cap)
- [eBay UK Scraper: Live Listings & Price Comps (GBP)](https://apify.com/seaf999ield/ebay-uk-listings-prices)

### About RawTrader | UK Industry & Bills

RawTrader | UK Industry & Bills is a UK newsletter and open data project tracking energy bills, fuel prices, public tenders, company closures and FCA short positions, using official data from Ofgem, DESNZ, ONS, Companies House, Find a Tender and the FCA.

- [RawTrader Data: every UK data tool in one place](https://imrawtrader.beehiiv.com/p/data)
- [UK Industry & Bills newsletter](https://imrawtrader.beehiiv.com)
- [Follow @ImRawTrader on X](https://x.com/ImRawTrader)

# Actor input Schema

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

Each line is one Google Trends comparison. Put up to 5 terms on a line, separated by commas, to compare them on the same 0-100 scale (e.g. <code>vinted, ebay, depop</code>). Add as many lines as you like. Leave empty if you only use presets.

## `presets` (type: `array`):

Ready-made UK keyword sets, added on top of your own search terms. Each preset adds 4-5 comparisons.

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

One or more locations. Every comparison runs once per location. Defaults to <code>GB</code> (United Kingdom). UK nations: <code>GB-ENG</code>, <code>GB-SCT</code>, <code>GB-WLS</code>, <code>GB-NIR</code>. Any country (<code>IE</code>, <code>US</code>, <code>DE</code>…), US states (<code>US-CA</code>) or <code>WORLDWIDE</code>.

## `ukNationsBundle` (type: `boolean`):

Also run every comparison for GB, England, Scotland, Wales and Northern Ireland (5 locations).

## `timeframe` (type: `string`):

Time range for every comparison.

## `customTimeframe` (type: `string`):

Used when Timeframe is 'Custom'. Format <code>YYYY-MM-DD YYYY-MM-DD</code>, e.g. <code>2025-11-01 2025-12-31</code>.

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

Narrow results to a Google Trends category.

## `customCategoryId` (type: `integer`):

Any other numeric Google Trends category ID (overrides the dropdown).

## `searchProperty` (type: `string`):

Which Google search property to measure.

## `includeInterestOverTime` (type: `boolean`):

0-100 time series for every term.

## `includeInterestByRegion` (type: `boolean`):

Breakdown by sub-region (for GB: England, Scotland, Wales, Northern Ireland).

## `includeRelatedQueries` (type: `boolean`):

Top and rising related searches per term, incl. 'Breakout'.

## `includeRelatedTopics` (type: `boolean`):

Top and rising related topics per term. Note: Google currently withholds related topics from automated requests for most queries; when it does, the row says so in 'unavailableSections' (you are not charged extra). Off by default.

## `regionResolution` (type: `string`):

Granularity of 'Interest by region'. Not every resolution exists for every location; if Google refuses it you get a clear note.

## `includeLowVolumeRegions` (type: `boolean`):

Also return regions with low search volume.

## `outputLayout` (type: `string`):

Combined is cheapest (one result row per comparison x location). Split gives one row per section, which is easier to filter, and each section row counts as a result.

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

Default: Apify residential proxy in the UK. Every retry uses a new proxy session (new IP).

## `maxRetries` (type: `integer`):

Google rate-limits (HTTP 429). Each retry waits with exponential backoff (2 s, 4 s, 8 s… capped at 60 s) and switches to a fresh proxy session (new IP). Data already fetched is kept between retries.

## `backoffBaseSecs` (type: `integer`):

First retry waits about this long; each further retry doubles it (capped at 60 s).

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

How many comparisons run in parallel, each on its own proxy session.

## `requestDelaySecs` (type: `string`):

Average pause between Google requests within one session (jittered).

## `maxComparisons` (type: `integer`):

Optional cap on comparisons x locations (handy for testing). Empty = no cap.

## `timezone` (type: `string`):

IANA time zone used for dates in the time series.

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

Google Trends interface language (affects topic names).

## Actor input object example

```json
{
  "searchTerms": [
    "energy price cap",
    "vinted, ebay, depop"
  ],
  "geos": [
    "GB"
  ],
  "ukNationsBundle": false,
  "timeframe": "today 12-m",
  "category": "0",
  "searchProperty": "web",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "includeRelatedQueries": true,
  "includeRelatedTopics": false,
  "regionResolution": "AUTO",
  "includeLowVolumeRegions": false,
  "outputLayout": "combined",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "GB"
  },
  "maxRetries": 6,
  "backoffBaseSecs": 2,
  "maxConcurrency": 5,
  "requestDelaySecs": "0.6",
  "timezone": "Europe/London",
  "language": "en-GB"
}
```

# Actor output Schema

## `overview` (type: `string`):

All result rows, Overview view (status, terms, location, summary, rising queries).

## `timeseries` (type: `string`):

0-100 time series per term.

## `regions` (type: `string`):

No description

## `related` (type: `string`):

No description

## `errors` (type: `string`):

Failed or partial rows with the reason. Error rows are never charged.

## `runSummary` (type: `string`):

JSON: success rate, attempts histogram, HTTP status counts.

# 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": [
        "energy price cap",
        "vinted, ebay, depop"
    ],
    "geos": [
        "GB"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "GB"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("seaf999ield/uk-google-trends").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": [
        "energy price cap",
        "vinted, ebay, depop",
    ],
    "geos": ["GB"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "GB",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("seaf999ield/uk-google-trends").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": [
    "energy price cap",
    "vinted, ebay, depop"
  ],
  "geos": [
    "GB"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "GB"
  }
}' |
apify call seaf999ield/uk-google-trends --silent --output-dataset

```

## MCP server setup

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

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/w8WdxJMGTMVveqR32/builds/mReKW5Dj0iqFFPcNo/openapi.json
