explaingit

pi-infected/trends-surfer

12PythonAudience · developerComplexity · 3/5Setup · moderate

TLDR

A Claude Code plugin that fetches real Google Trends data by driving a live Chrome browser, bypassing API blocks that stopped older libraries, and lets you ask plain-language questions about trending topics and rising search queries.

Mindmap

mindmap
  root((trends-surfer))
    What it does
      Google Trends via Chrome
      Plain-language queries
    Tools
      Fetch fresh data
      Read saved results
      List cached results
      Health check
    Anti-block Design
      Real Chrome browser
      30-90s random delay
      Delay saved to disk
    Built-in Prompt
      find_opportunities
      Business idea ranking
    Setup
      uv package manager
      Chrome browser
      Xvfb on Linux
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Ask Claude Code to compare interest in two topics over the past 90 days using real Google Trends data fetched through a live Chrome session.

USE CASE 2

Use the find_opportunities built-in prompt to turn trending search queries into ranked business or content ideas with competition assessments.

USE CASE 3

Reuse previously fetched trend results without triggering a new Chrome request, by listing and reading saved result files.

Tech stack

PythonChrome

Getting it running

Difficulty · moderate Time to first run · 30min

Requires the uv package manager, a real Chrome installation, and Xvfb on Linux for headless operation, fetches enforce a 30-90 second mandatory delay between requests.

No license information was mentioned in the explanation.

In plain English

Trends Surfer is a plugin for Claude Code that lets the AI assistant answer questions about Google Trends data in plain language. You can ask something like "compare interest in bitcoin versus ethereum over the last three months and show the rising related queries" and the plugin translates that into a data fetch, retrieves the results, and lets Claude read back the specific parts it needs. The reason this plugin exists instead of using the commonly known pytrends library is that pytrends was archived in 2025 and its approach to making requests is now reliably blocked by Google. Trends Surfer works around this by running the actual Google Chrome browser in the background, navigating to trends.google.com, and making requests from within that live browser session. Because the requests come from real Chrome with genuine browser characteristics and active cookies, they are not blocked in the same way. To avoid hammering Google and getting blocked, the plugin enforces a randomized delay of 30 to 90 seconds between data fetches. This delay is enforced inside the server itself and cannot be skipped or configured away, even if Claude tries to call the fetch tool repeatedly, it will wait. The delay timer is saved to disk so restarts do not reset it. The plugin provides four tools: one that fetches fresh data from Google and writes it to a temporary file, one that reads a specific slice from a previously saved result, one that lists saved results so earlier fetches can be reused without a new request, and a health check that reports whether Chrome is available and how long until the next fetch is allowed. There is also a built-in prompt called find_opportunities that gives the AI a structured approach for turning trend data into business or content ideas, including how to assess search competition and rank potential opportunities. Setup requires the uv package manager, a real Chrome browser installation, and on Linux a virtual display tool called Xvfb so Chrome can run in the background without opening a visible window.

Copy-paste prompts

Prompt 1
Using trends-surfer, compare interest in 'AI coding tools' versus 'no-code builders' over the last 90 days and list the top rising related queries for each.
Prompt 2
Run the trends-surfer find_opportunities prompt on the query 'home automation 2025' and rank the top 3 content opportunities by search volume and competition.
Prompt 3
Check the trends-surfer health tool to see when the next fetch is allowed, then list all saved result files and read the most recent one without making a new request.
Prompt 4
Set up trends-surfer on an Ubuntu server using Xvfb so Chrome runs headlessly in the background without a display.
Open on GitHub → Explain another repo

← pi-infected on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.