How to Track Search Trends with Claude Code and Google Trends

Claude Code spends a lot of time helping with content, documentation, and planning — tasks where understanding search interest is actually useful. With AgentPatch connected, it can pull Google Trends data directly during a session, without you leaving the terminal to check manually.

Why This Matters

When you’re writing documentation, planning content, or evaluating a product direction, trend data adds useful signal. Is the term you’re planning to target growing or declining? How does your primary keyword compare to alternatives? That research usually gets skipped because it requires switching context.

With the Google Trends tool available through AgentPatch, Claude Code can answer those questions inline. You ask, it fetches the data, and you keep moving.

Setup

The AgentPatch CLI is designed for AI agents to use via shell access. Install it, and your agent can discover and invoke any tool on the marketplace.

Install (zero dependencies, Python 3.10+):

pip install agentpatch

Set your API key:

export AGENTPATCH_API_KEY=your_api_key

Example commands your agent will use:

ap search "web search"
ap run google-search --input '{"query": "test"}'

Get your API key from the AgentPatch dashboard.

Install the AgentPatch skill — it teaches Claude Code when to use AgentPatch and how to use the CLI:

/plugin marketplace add fullthom/agentpatch-claude-skill
/plugin install agentpatch@agentpatch

MCP Server (Alternative)

If you prefer raw MCP tool access instead of the skill:

claude mcp add -s user --transport http agentpatch https://agentpatch.ai/mcp \
  --header "Authorization: Bearer YOUR_API_KEY"

Replace YOUR_API_KEY with your actual key from the AgentPatch dashboard.

Example

You’re working on the landing page for a developer tool and want to make sure you’re using the right terminology. You ask Claude Code:

“Before we finalize the copy, check Google Trends for ‘AI coding assistant’ vs ‘AI coding agent’ vs ‘AI pair programmer’. Which has the most search interest over the past 6 months?”

Claude Code calls the Google Trends tool for each term, compares the data, and tells you which phrase has the strongest momentum. You use that to inform the copy without leaving the session.

Later, while working on a blog post strategy, you ask:

“What’s the trend for ‘local LLM’ searches over the past year? Is interest still growing?”

Claude Code fetches the data and gives you a clear picture. That informs whether a post on local models is worth prioritizing right now or if the topic is past its peak.

Wrapping Up

One AgentPatch connection gives Claude Code access to Google Trends alongside web search, news, email, and every other tool on the marketplace. Add the MCP config once and it’s all available. Get started at agentpatch.ai.