
Description
Google Trends only hands you a 0 to 100 curve, so a spike tells you nothing about whether a hundred people or a hundred thousand searched that day. Scraping it with pytrends means a steady stream of 429 errors, and that library was archived in 2025. google-trends-for-agent (the CLI is gtfa) goes after both problems: it turns the relative curve into an estimated daily search volume, returns a fixed-shape JSON envelope with explicit error codes, and is built for AI agents to consume directly.
The trick is anchor calibration. Your keyword is charted on the same 0 to 100 scale as an anchor term whose volume is known, and the ratio gives the estimate. There are 59 anchors taken from Google Ads Keyword Planner across 7 markets: worldwide, the US, Canada, the UK, Germany, France and Japan. The US default is sudoku at about 88,000 searches a day; Japan uses テトリス at about 18,000. If the anchor signal is too weak, the data too sparse, or the country is outside those seven, volume comes back as null instead of a made-up number. MIT licensed, runs with one npx command on Node.js 20+.
Four commands, four tools: snapshot returns the curve, estimated daily volume and related queries in one call; ask checks one term's momentum; compare puts up to five keywords on one scale; now lists real-time trending searches by country.
MCP server: gtfa-mcp drops into the MCP config of Claude Code, Cursor, Codex or Windsurf, and can also serve a Streamable HTTP endpoint bound to localhost.
Second-round calibration: When the first anchor sits too far from your term's range, snapshot retries once against a closer-sized anchor and upgrades the result if that works.
Rate-limit handling: On HTTP 429 it does a bounded retry that honors Retry-After up to 10 seconds, otherwise it returns the wait time to the caller; batches stop sending requests after the first rate limit. Local egress is the default and unmetered, honors HTTPS_PROXY, and can switch to a public or self-hosted Apify Actor when your IP is blocked.
Charts included: snapshot writes a 7-day SVG chart you can drop straight into a report.
Doctor command: gtfa doctor checks Node, Google Trends reachability, proxy settings and one live fetch, so connection problems are easy to pin down.
The trick is anchor calibration. Your keyword is charted on the same 0 to 100 scale as an anchor term whose volume is known, and the ratio gives the estimate. There are 59 anchors taken from Google Ads Keyword Planner across 7 markets: worldwide, the US, Canada, the UK, Germany, France and Japan. The US default is sudoku at about 88,000 searches a day; Japan uses テトリス at about 18,000. If the anchor signal is too weak, the data too sparse, or the country is outside those seven, volume comes back as null instead of a made-up number. MIT licensed, runs with one npx command on Node.js 20+.
Features
Four commands, four tools: snapshot returns the curve, estimated daily volume and related queries in one call; ask checks one term's momentum; compare puts up to five keywords on one scale; now lists real-time trending searches by country.
MCP server: gtfa-mcp drops into the MCP config of Claude Code, Cursor, Codex or Windsurf, and can also serve a Streamable HTTP endpoint bound to localhost.
Second-round calibration: When the first anchor sits too far from your term's range, snapshot retries once against a closer-sized anchor and upgrades the result if that works.
Rate-limit handling: On HTTP 429 it does a bounded retry that honors Retry-After up to 10 seconds, otherwise it returns the wait time to the caller; batches stop sending requests after the first rate limit. Local egress is the default and unmetered, honors HTTPS_PROXY, and can switch to a public or self-hosted Apify Actor when your IP is blocked.
Charts included: snapshot writes a 7-day SVG chart you can drop straight into a report.
Doctor command: gtfa doctor checks Node, Google Trends reachability, proxy settings and one live fetch, so connection problems are easy to pin down.

