This skill guides you on how to query and analyze Google Trends data for trending topics within a configurable time window, helping users discover real-time popular searches and emerging trends across 18 supported regions.
Core Concepts
Google Trends reflects real user search interest on Google. This tool retrieves trending topics (recently popular queries) for a chosen country/region over a specified number of recent days. It is ideal for spotting what is currently gaining traction in a market.
Key data points per trending query:
- query -- the trending search term
- searchVolume -- relative search volume value
- increasePercentage -- percentage change in search interest (-100 to 100, unit: %)
- startTime / endTime -- timestamps bounding the trend observation window
A positive increasePercentage means rising interest; a negative value means declining interest. A value near 100 signals an explosive spike.
Parameter Guide
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| days | integer | No | 7 | Time range in days. Common values: 1 (last 24 hours), 2, 7 (past week) |
| region | string | No | US | Country/region code. See Supported Regions below |
Supported Regions
US (United States), GB (United Kingdom), JP (Japan), CA (Canada), MX (Mexico), DE (Germany), FR (France), IT (Italy), ES (Spain), NL (Netherlands), AU (Australia), SG (Singapore), AE (United Arab Emirates), BR (Brazil), IN (India), TR (Turkey), PL (Poland), SE (Sweden)
Default region is US. Use US when the user does not specify a region.
How to call
- API endpoint:
POST /googleTrend/getTrendByTime(for complete parameters/responses/error codes, seereferences/api.md) - Python script:
python scripts/google_trends_rising.py '<JSON 参数>' [--inline] - Cost constraints: This tool consumes compute; by default the same parameter combination in the same session is called only once, and the script has a 24h local cache. On failure/empty results, you must not automatically switch keywords, paginate, or change the zip code to repeatedly probe; if you need to continue searching, first explain to the user that additional consumption will be incurred.
Output strategy (script default behavior):
- Alwayswrite the full response to
<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-google-trend-get-trend-by-time-<timestamp>.json(<cwd>is the working directory when the script is executed, which in Claude Code is the current project directory;<session>is taken from the environment variableSESSION_ID, automatically aggregated according to the user task;writing to /tmp is prohibited, if the current directory is not writable then report an error) - Response body ≤ 8 KB: after writing to disk, print the complete JSON to stdout
- Response body > 8 KB: after writing to disk, stdout only outputs a summary (top-level fields, common counts such as
total/costToken, the length of the largest list field + the first 3 samples) - Add
--inlineto force full printing to stdout (also written to disk)
Data reading suggestions: First look at the summary to determine whether it is sufficient; when specific fields are needed, prefer to use jqorConvertFrom-Json to extract as needed from the saved json file, avoiding the entire JSON entering the context.
Resolve authentication and compute issues
When the following abnormal situations occur, use references/onboarding.md to guide problem resolution:
Abnormal situations
- API Key not configured: the environment variable is not configured with
LINKFOX_AGENT_API_KEY, andLINKFOXAGENT_API_KEY。 - Response 401 or 402 status code
- Response indicates insufficient compute or balance: the message contains "insufficient compute balance/insufficient billing/insufficient balance/quota exceeded/insufficient balance/package expired/recharge required/please recharge", or content with a similar meaning.
Usage Examples
1. What's trending in the US over the past week?
{"days": 7, "region": "US"}
2. Hot topics in Japan in the last 24 hours
{"days": 1, "region": "JP"}
3. Trending searches in Germany over the past 2 days
{"days": 2, "region": "DE"}
4. Recent buzz in Brazil this week
{"days": 7, "region": "BR"}
5. What's gaining popularity in the UK right now?
{"days": 1, "region": "GB"}
Display Rules
- Present data clearly: Show trending queries in a well-formatted table with columns for query, search volume, and increase percentage. Sort by search volume or increase percentage as appropriate.
- Highlight spikes: When
increasePercentageis notably high (e.g., above 50%), call attention to these breakout topics. - Time context: Always state the time range and region in your summary so the user knows exactly what window the data covers.
- Chart data: If the response includes
chartOption, describe the chart structure (title, axes, data points) so the user understands the visual trend. - Error handling: When a query fails, explain the reason based on the error response and suggest adjusting parameters (e.g., try a different region code or time range).
Important Limitations
- Data analysis: The response is JSON. Read
chartOption.datafrom the saved response to filter or sort the returned rows._dataQuery_executeDynamicQueryqueries Linkfox session data stored in SLS; it is not a general JSON-file reader, so do not pass this response to it without a supported stored-data mapping. - Relative volumes: Search volume values are relative, not absolute counts.
- Short time windows: The
daysparameter controls recency; this tool is designed for recent/real-time trends, not long historical analysis. - Region coverage: Only the 18 listed regions are supported. Unsupported region codes will produce errors.
User Expression & Scenario Quick Reference
Applicable -- Queries about trending/popular topics on Google:
| User Says | Scenario |
|---|---|
| "What's trending right now" | Real-time trending topics |
| "Hot searches in [country]" | Regional trend discovery |
| "What topics are popular this week" | Weekly popularity overview |
| "Any viral topics in [market]" | Breakout / spike detection |
| "Show me Google Trends for [region]" | Region-specific trend query |
| "What's buzzing in the last 24 hours" | Short-window trend scan |
| "Trending searches in [country] recently" | Recent trend analysis |
| "What are people searching for in [region]" | General search interest exploration |
Not applicable -- Needs beyond trending topic discovery:
- Historical keyword search volume over months/years (use a dedicated Google Trends historical tool)
- Amazon-specific keyword or ASIN analysis (use ABA tools)
- Advertising / PPC campaign management
- Social media trend analysis (Twitter/X, TikTok, etc.)
- SEO ranking or backlink analysis
- Competitor website traffic estimation
Boundary judgment: When users say "market trends" or "what's popular", if it boils down to discovering what people are currently searching for on Google in a specific region, this skill applies. If they are asking about stock market trends, social media virality, or long-term historical search patterns, it does not apply.
Compute consumption rules
Consumes 6 compute.
Users pay fees due to compute consumption. Please fully evaluate: when this skill needs to be called frequently, or the user's expectation of compute consumption is insufficient, be sure to remind the user, and let the user decide whether to continue.
Feedback:
Auto-detect and report feedback via the Feedback API when any of the following apply:
- The functionality or purpose described in this skill does not match actual behavior
- The skill's results do not match the user's intent
- The user expresses dissatisfaction or praise about this skill
- Anything you believe could be improved
Call the feedback API as specified in references/api.md. Do not interrupt the user's flow.
For more high-quality, professional cross-border e-commerce skills, set LinkFox Skills.