mcpField
M
mcp-google-trends-scraper

mcp-google-trends-scraper

Local
github.com/mambalabsdevData & Analytics0Updated 2d ago

About mcp-google-trends-scraper

An MCP server that retrieves Google Trends summaries and detail rows through an Apify actor. It is for clients that need interest over time, regional data, and related queries without a Google login or key.

Key features

  1. 01Per-term interest summaries
  2. 02Interest over time and by region
  3. 03Related queries and topics
  4. 04Compare terms on a shared scale

Use cases

  1. 01Track a term’s search interest over time
  2. 02Compare terms across regions
  3. 03Find rising related queries

MCP support

Exposes the `get_google_trends` tool to MCP clients. It starts an Apify actor run and returns its dataset rows.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"com-mambabuilt-mcp-google-trends-scraper": {
"command": "npx",
"args": [
"-y",
"@mambalabsdev/mcp-google-trends-scraper"
],
"env": {
"APIFY_TOKEN": "<APIFY_TOKEN>"
}
}
}
}
Run commandnpx -y @mambalabsdev/mcp-google-trends-scraper
Environment variables to set
APIFY_TOKENSecretApify API token from https://console.apify.com/account/integrations

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@mambalabsdev/mcp-google-trends-scraper1.0.2

Tools

1

Saved tool list · updated 2d ago

ParameterTypeRequiredDescription
geostringNoEmpty for worldwide, or a Google geo code such as US, DE, or US-CA.
termsarrayNoSearch terms, up to 200 per run. A Google topic ID such as /m/0j6n6s8 also works.
comparebooleanNotrue: terms are charted together in groups of 5, on one shared scale. false: each term gets its own chart. Each term is charged either way.
outputsarrayNoAny of interest_over_time, interest_by_region, related_queries, related_topics. Default is the first three. See Limitations for related_topics.
categorystringNoGoogle Trends category number. 0 is all categories. The number is in the cat= part of a Trends URL.
propertystringNoWhich Google search to read: web, news, images, youtube, or shopping.
timeframestringNonow 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 two dates as YYYY-MM-DD YYYY-MM-DD.
proxy_modestringNoauto (default): requests go through the Apify proxy pool, and a request the pool cannot get through is retried on residential addresses. residential: every request uses residential addresses. A reliability setting only; it does not change what you pay.
max_charge_usdstringNoOptional. The run stops before a charge that would pass this amount. Summary rows are always returned.
region_resolutionstringNoauto: countries worldwide, regions inside a country. DMA is US metro areas. CITY needs a geo. COUNTRY needs an empty geo.

Details

From the project README

Google Trends Scraper MCP Server

npm version license

An MCP server for the Mamba Labs Google Trends Scraper actor on Apify. Read Google Trends for your search terms and get a summary row per term plus flat detail rows.

What's Inside

What it does

Give search terms, with a geo, timeframe, category, or search property if you want them. For each term you get one summary row (average, latest, and peak interest, recent change, top region, top and rising queries) and flat rows for interest over time, regions, and related queries. Terms can be compared in groups of 5 on one scale. Values are relative to the chart, not search counts.

All of the work runs on Apify. This package is a thin client that starts the actor run, waits for it, and hands back the dataset rows.

Quick start

You need Node.js 18 or newer and an Apify account with an API token.

Add this to your Claude Desktop config (claude_desktop_config.json), Cursor, or any MCP client:

{
  "mcpServers": {
    "mamba-google-trends-scraper": {
      "command": "npx",
      "args": [
        "-y",
        "@mambalabsdev/mcp-google-trends-scraper"
      ],
      "env": {
        "APIFY_TOKEN": "your-apify-token"
      }
    }
  }
}

Restart the client. The get_google_trends tool appears.

Prerequisites

Example prompts

  • "How has interest in matcha changed in the US over the last 12 months?"
  • "Compare coffee and tea by US metro area."
  • "What are the rising search queries around ozempic?"

Tool

get_google_trends. One tool. Example arguments:

{
  "terms": [
    "coffee",
    "matcha"
  ],
  "geo": "US",
  "timeframe": "today 12-m"
}

Inputs

Every buyer facing input of the actor. Omitted inputs take the actor's own defaults.

InputTypeRequiredDescription
termsarraynoSearch terms, up to 200 per run. A Google topic ID such as /m/0j6n6s8 also works.
geostringnoEmpty for worldwide, or a Google geo code such as US, DE, or US-CA.
timeframestringnonow 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 two dates as YYYY-MM-DD YYYY-MM-DD.
categorystringnoGoogle Trends category number. 0 is all categories. The number is in the cat= part of a Trends URL.
propertystringnoWhich Google search to read: web, news, images, youtube, or shopping.
comparebooleannotrue: terms are charted together in groups of 5, on one shared scale. false: each term gets its own chart. Each term is charged either way.
outputsarraynoAny of interest_over_time, interest_by_region, related_queries, related_topics. Default is the first three. See Limitations for related_topics.
region_resolutionstringnoauto: countries worldwide, regions inside a country. DMA is US metro areas. CITY needs a geo. COUNTRY needs an empty geo.
max_charge_usdstringnoOptional. The run stops before a charge that would pass this amount. Summary rows are always returned.
proxy_modestringnoauto (default): requests go through the Apify proxy pool, and a request the pool cannot get through is retried on residential addresses. residential: every request uses residential addresses. A reliability setting only; it does not change what you pay.

Pricing

Pay per event on Apify, billed to your Apify account. Prices in USD.

EventFree planBronzeSilverGold
term-report, one search term with data, summary row plus up to 170 detail rows$0.0065$0.006175$0.00585$0.005525
extra-rows, each further 100 detail rows on one term past the first 170$0.0035$0.003325$0.00315$0.002975
apify-actor-start, per run start$0.002$0.002$0.002$0.002

A term with no data, a term Google refused, and refused input are free. Mamba Labs pays the platform costs of the run, Apify proxy traffic included.

Full actor documentation

apify.com/mambalabs/google-trends-scraper

License

MIT. See LICENSE.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.