mcpField
G
google-trends

google-trends

github.com/ezcat207Data & databases138 installsUpdated 34w ago
Repository

About google-trends

A skill that retrieves current Google Trends searches by country, category, and time range. It runs a script and presents ranked trends with search-volume data.

Key features

  1. 01Fetch trends by country
  2. 02Filter by category
  3. 03Select a time window
  4. 04Set the number of results
  5. 05Return ranked trend data as JSON

Use cases

  1. 01Check what is trending in a country
  2. 02Review trends in a specific topic
  3. 03Compare searches across countries
  4. 04Prepare a ranked trends table

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/ezcat207/google-trends-skill --skill google-trends

After installing, type/google-trendsin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

.security-scan-passed
requirements.txt
scripts/
run.py
trends.py

Details

From the project README

Google Trends Skill

Fetch real-time trending searches from Google Trends for any country and category.

When to Use This Skill

Trigger when the user:

  • Asks "what's trending in [country]?"
  • Asks "popular [games/AI/tech/sports/etc.] in [country]"
  • Says "Google Trends for [country]"
  • Wants to compare trends between countries
  • Invokes /google-trends

Parameters

FlagDefaultOptions
--geoUSAny 2-letter country code: US, BR, ID, GB, JP, IN, DE, FR, AU, MX, ...
--categoryallall, games, technology, sports, entertainment, business, health, science, food, travel, beauty, politics, shopping
--hours244, 24, 48, 168 (7 days)
--top20Any integer
--methodautorss (fast, no category filter), csv (Selenium, supports categories)

Auto method logic: Uses rss when --category all, uses csv when a specific category is given.

Country Code Reference

CountryCodeCountryCode
BrazilBRIndonesiaID
USAUSIndiaIN
UKGBJapanJP
GermanyDEFranceFR
AustraliaAUMexicoMX
CanadaCASouth KoreaKR
ArgentinaARNigeriaNG
PhilippinesPHThailandTH

Script Execution

CRITICAL: Always use the run.py wrapper. It handles venv setup automatically.

Basic Usage (general trends, fast)
python scripts/run.py --geo BR
Category-specific trends (uses Selenium)
python scripts/run.py --geo BR --category games
python scripts/run.py --geo ID --category technology
python scripts/run.py --geo US --category sports --hours 48
Multiple countries (run in parallel)
python scripts/run.py --geo BR --category games &
python scripts/run.py --geo ID --category games &
wait
Top N results with longer period
python scripts/run.py --geo JP --category entertainment --hours 168 --top 30

Workflow

  1. Parse user intent → extract country, category, time period
  2. Map to parameters:
    • "Brazil" → --geo BR
    • "Indonesia" → --geo ID
    • "games" → --category games
    • "AI/tech/technology" → --category technology
    • "past week" / "7 days" → --hours 168
  3. Inform user: "Fetching [category] trends for [country] (past [N] hours)..."
  4. Run script and parse JSON output
  5. Present results as a formatted table with rank, trend name, and search volume

Output Format

Script outputs JSON:

{
  "geo": "BR",
  "category": "games",
  "hours": 24,
  "method": "csv",
  "count": 20,
  "trends": [
    {"rank": 1, "trend": "grêmio x internacional", "volume": "500K+", "started": "..."},
    {"rank": 2, "trend": "arsenal x chelsea", "volume": "500K+", "started": "..."}
  ]
}

Presenting Results

Format output as a clean markdown table:

## 🔥 Trending in Brazil — Games (past 24h)

| # | Trend | Volume |
|---|-------|--------|
| 1 | grêmio x internacional | 500K+ |
| 2 | arsenal x chelsea | 500K+ |
...

Add brief context/insights after the table when relevant (e.g., "Football dominates Brazil's trending games — the Grenal derby between Grêmio and Internacional was the biggest search spike.").

Error Handling

ErrorAction
BrowserError / timeoutRetry with --method rss (drops category filter)
InvalidParameterErrorCheck geo code or category name
venv setup failureCheck Python 3.8+ is available
No trends returnedTry broader category or different time window

Troubleshooting

  • CSS method slow: normal — Selenium launches Chrome headlessly
  • Category filter not working with RSS: RSS doesn't support categories, use --method csv
  • Empty results: try --hours 168 for a wider time window
  • Country not found: run python scripts/run.py --list-countries to see all supported codes

Comments

Markdown supported