# Repository Briefing: meka-im/google-trends-for-agent
> Source: https://repoforai.com/repo/meka-im/google-trends-for-agent (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/meka-im/google-trends-for-agent
- **Official Docs / Website**: https://meka.im/google-trends-for-agent
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: TypeScript
- **License**: MIT
- **Engineering Health**: A (79/100 · Maintenance 35/35 · Adoption 4/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v0.2.60 (2026-12-04) — https://github.com/meka-im/google-trends-for-agent/releases
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: MCP, CLI
- **Momentum**: 201 ★ total (+26 24h / +197 7d) · 3 forks
- **Topics**: `ai-agents`, `apify`, `cli`, `deepseek-harness`, `deepseek-harness-plugin`, `dsh-plugin`, `google-trends`, `mcp`, `mcp-server`, `model-context-protocol`, `npm`, `pytrends`
- **When to Use**: Best for: Interactive keyword research in Claude Code or other MCP clients, short-term momentum checks, and pytrends migrations that can adopt a new JSON contract. Skip if: You need bulk scheduled collection, exact search counts, offline operation, or a supported feed with contractual uptime.

## Overview
```text
### Architecture & 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.
```

## Key Capabilities
```text
- Interfaces: `gtfa` for CLI workflows; `gtfa-mcp` for four direct tools over stdio or loopback Streamable HTTP.
- Calibration: 59 Google Ads Keyword Planner anchors across seven regions; estimates apply only to category-0 web search.
- Comparison: One shared 0–100 scale for up to five distinct terms; optional calibration adds `batchVolume` estimates.
- Partial results: Snapshot returns warnings and null traffic where appropriate; cancellation and the overall deadline propagate instead of becoming fallback values.
- Execution routes: Local networking or one-off public/self-deployed Apify Actor runs; the hosted gateway has a distinct tool and Dataset contract.
- Testing: Local fixtures and mocked transports exercise behavior without calling Google, but cannot verify live endpoint compatibility.
```

## Quick Start / Clone
```bash
npx -y -p google-trends-for-agent gtfa snapshot Sora --geo US --json --pretty
```
