meka-im/google-trends-for-agent
TypeScript MCP server and CLI for Google Trends and calibrated search-volume estimates
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Tracked from daily D1 telemetry snapshots. Hover any data point for exact daily star counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
This TypeScript package shares a Google Trends client and the MEKA v1 baseline catalog across its library API, gtfa CLI, gtfa-mcp server, native DeepSeek Harness tools, and Apify Actor. Queries run locally by default or are delegated to a one-off Actor run. The dependency set includes @modelcontextprotocol/sdk, undici, tough-cookie, apify, zod, and @deepseek-ai/schemastery, reflecting the package's MCP, HTTP and cookie, cloud execution, and schema concerns.
Transport and query execution are separate choices. Local MCP supports stdio and loopback Streamable HTTP; its four trends_* tools remain available when the local server delegates queries to Apify. Connecting directly to Apify's hosted MCP gateway is different: the gateway exposes an Actor tool rather than guaranteeing the same names, and ordinary Actor queries require reading a returned Dataset.
Key Capabilities & Differentiators
trends_ask checks single-term momentum and returns related queries and regional interest. trends_snapshot packages a trend series, calibrated searches/day, related queries, and seven-day chart and traffic fields. trends_compare aligns up to five distinct terms on one relative scale, and trends_now returns country-level trending searches with rank, growth, categories, and links.
Calibration places the target and an anchor on the same 0–100 scale and computes round(score / anchorLevel × dailySearches). The catalog contains 59 anchors across seven regions. An unpinned snapshot gets one additional calibration round if the first is out of range. Unsupported properties or categories and unreliable anchors leave volume fields null; related queries do not share the primary term's scale and cannot inherit its volume estimate. The JSON contract distinguishes missing estimates from zero searches.
Trade-offs & Limitations
Compared with the archived pytrends library, this is better suited to agent tool calls and structured CLI output, not a drop-in replacement for Python notebooks. Compared with subscription SEO suites, it offers a narrow view of current search interest and anchor-derived daily estimates, not a replacement for their broader datasets. Calibration is limited to category-0 web searches; keep relative interest and estimated volume distinct in dashboards and downstream decisions.
Local execution avoids an Actor run and its associated charges, but upstream throttling and challenges still apply. Cloud execution adds account credentials, run overhead, and possible usage charges without removing the dependency on unofficial Google endpoints. Those endpoints can change without notice, and access may conflict with Google's terms. Offline tests validate client behavior under modeled conditions, not live data availability. Treat it as an interactive research tool rather than a bulk collection pipeline or an SLA-backed feed.
Hardware & Deployment Guide
Run the CLI or local MCP server on Node.js 20+, either via npm installation or npx. For desktop clients that launch subprocesses, stdio is the direct integration path; Streamable HTTP is available on loopback. Direct mode needs Internet access to Google Trends and can use an existing HTTPS_PROXY or HTTP_PROXY. The dsh web path requires Node.js 24.9+ and pnpm 10+. No GPU or model runtime is required.
For cloud execution, configure actor-public or actor-own with APIFY_TOKEN, or use the hosted gateway with client OAuth. A self-deployed Actor is built from the repository in Apify or with apify push and runs on demand with Server/Standby disabled. Releases v0.2.58–v0.2.60 focused on retry budgets, partial results, proxy-tier failover, and regional-origin selection. These changes address transient failures but do not establish an availability guarantee.
gtfa for CLI workflows; gtfa-mcp for four direct tools over stdio or loopback Streamable HTTP.batchVolume estimates.Interactive keyword research in Claude Code or other MCP clients, short-term momentum checks, and pytrends migrations that can adopt a new JSON contract.
You need bulk scheduled collection, exact search counts, offline operation, or a supported feed with contractual uptime.
Quick Start & Installation
npx -y -p google-trends-for-agent gtfa snapshot Sora --geo US --json --pretty
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| google-trends-for-agent ★ | 201 | +197 | TypeScript | MIT | TypeScript MCP server and CLI for Google Trends and calibrated search-volume est |
| rea | 488.8k | +7.6k | TypeScript | MIT | A local CLI and MCP server for evidence-backed app and binary analysis |
| chrome-devtools-mcp | 60.4k | +760 | TypeScript | Apache-2.0 | Chrome DevTools via MCP and CLI for live browser debugging and performance analy |
| context7 | 65.8k | +333 | TypeScript | MIT | A hosted documentation index with MCP and CLI access for coding agents |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/meka-im/google-trends-for-agent.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about google-trends-for-agent
Can I swap local MCP for the hosted Apify gateway without changing my integration?
gtfa-mcp for the four direct trends_* tools. It defaults to local stdio and can also serve Streamable HTTP on 127.0.0.1. The hosted Apify gateway instead exposes an Actor tool: for ordinary tool and terms inputs, the client starts a run and reads the results using the returned Dataset ID. The gateway does not guarantee the four direct tool names.What runtime and hardware do I need?
dsh web plugin path has separate requirements: Node.js 24.9+ and pnpm 10+.Can I self-host it for a commercial workflow?
full_api_access OAuth scope is account-wide.Is it a drop-in replacement for pytrends?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy