This skill guides you on how to query and analyze Google Trends keyword search interest data, helping users understand how keyword popularity changes over time across different regions.
Core Concepts
Google Trends provides normalized search interest data (0-100 scale) reflecting how popular a given search term is relative to its peak popularity in the selected region and time range. A value of 100 represents peak popularity, 50 means the term is half as popular as its peak, and 0 means insufficient data.
Important language rule: Keywords must be in the language of the target country. For example, use English keywords for the US, German keywords for Germany, Japanese keywords for Japan. If the user provides keywords in the wrong language, translate them before querying.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| keyword | string | Yes | The search keyword to analyze (max 100 characters). Must be in the target country's language. |
| region | string | No | Country/region code. Defaults to US. |
| dayRangeStart | string | No | Start date for the time range (format: YYYY-MM-DD, from 2004 onward). |
| dayRangeEnd | string | No | End date for the time range (format: YYYY-MM-DD, from 2004 onward). |
When both dayRangeStart and dayRangeEnd are provided, the custom time range takes priority.
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 doesn't specify a region.
How to call
- API endpoint:
POST /googleTrend/getTrendByKeys(For complete parameters/responses/error codes, seereferences/api.md) - Python script:
python scripts/google_trends_keyword.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, do not automatically switch keywords, paginate, or change zip codes to probe continuously; if continued retrieval is needed, first explain to the user that it will incur additional consumption.
Output strategy (script default behavior):
- Alwayswrite the complete response to
<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-google-trend-get-trend-by-keys-<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's task;Writing to /tmp is prohibited, if the current directory is not writable, 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 outputs only 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 on demand 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
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.
How to Build Queries
Principles for Effective Queries
- Use the correct language: Always ensure keywords match the target region's language. Translate first if needed.
- Specify a region: Default is US, but always confirm the user's intended market.
- Use date ranges for focused analysis: For seasonal trends or specific event analysis, provide
dayRangeStartanddayRangeEnd. - Keep keywords concise: Google Trends works best with short, focused search terms.
Usage Examples
1. Basic Keyword Trend (Default Region & Time)
{"keyword": "wireless charger"}
Query the overall search interest trend for "wireless charger" in the US.
2. Keyword Trend in a Specific Region
{"keyword": "Ladekabel", "region": "DE"}
Query the search interest for "Ladekabel" (charging cable) in Germany.
3. Custom Date Range Analysis
{"keyword": "christmas gifts", "region": "US", "dayRangeStart": "2024-09-01", "dayRangeEnd": "2025-01-31"}
Analyze the seasonal trend of "christmas gifts" in the US from September 2024 through January 2025.
4. Year-over-Year Comparison
{"keyword": "sunscreen", "region": "AU", "dayRangeStart": "2023-01-01", "dayRangeEnd": "2025-12-31"}
Compare multi-year seasonality of "sunscreen" in Australia.
5. Regional Market Research
{"keyword": "yoga mat", "region": "GB"}
Check the popularity trend of "yoga mat" in the United Kingdom.
6. Emerging Trend Detection
{"keyword": "AI glasses", "region": "US", "dayRangeStart": "2024-01-01", "dayRangeEnd": "2025-12-31"}
Track the rise of "AI glasses" search interest over the past two years in the US.
Display Rules
- Present data clearly: Show trend data in well-formatted tables or describe the trend curve. Include key data points such as peak values, troughs, and notable changes.
- Explain the scale: Remind users that Google Trends values are on a 0-100 normalized scale, where 100 = peak popularity in the selected scope.
- Highlight patterns: Point out seasonal patterns, sudden spikes, or sustained growth/decline when visible in the data.
- Chart data availability: When the response includes
chartOption, mention that visualization data is available and describe the trend shape. - Error handling: When a query fails, explain the reason and suggest adjustments (e.g., check keyword spelling, try a different date range, ensure the keyword is in the correct language).
Important Limitations
- Data analysis: The response is JSON. Read
trendInfoForKeys[].trendValues[]from the saved response; preservetimeRangeand values such as"<1"without converting them to zero._dataQuery_executeDynamicQueryqueries Linkfox session data stored in SLS, not arbitrary JSON files; use it only when the required stored-data mapping exists. - Normalized values: Trend values are relative (0-100), not absolute search volumes.
- Data availability: Data is available from 2004 onward, but very niche terms may have sparse data.
- Single keyword per call: Each API call handles one keyword. For multi-keyword comparisons, make separate calls and compare results.
- Language requirement: Keywords must match the target region's language for accurate results.
User Expression & Scenario Quick Reference
Applicable -- Queries about keyword search popularity trends:
| User Says | Scenario |
|---|---|
| "How popular is XX keyword on Google" | Basic trend lookup |
| "Is XX trending up or down" | Trend direction analysis |
| "When does XX peak in searches" | Seasonal peak detection |
| "Compare popularity of XX across months" | Seasonal pattern analysis |
| "Is XX gaining traction in Germany" | Regional trend check |
| "What's the search trend for XX over the past year" | Historical trend analysis |
| "Holiday search trends for XX" | Seasonal / event-driven analysis |
Not applicable -- Needs beyond Google Trends search interest data:
- Google Ads keyword planner or bid/CPC data
- Absolute search volume numbers (Google Trends provides relative, not absolute data)
- Social media trending topics (Twitter/X, TikTok, etc.)
- Amazon-specific search term data (use ABA Data Explorer instead)
- Website traffic analytics (Google Analytics, SimilarWeb, etc.)
- Keyword ranking on search engine result pages (SEO rank tracking)
Boundary judgment: When users say "keyword research" or "market trend analysis", if it specifically relates to search interest popularity over time from Google's perspective, this skill applies. If they want absolute traffic numbers, advertising metrics, or e-commerce-platform-specific data, it does not apply.
Compute consumption rules
Consumes 6 compute.
Users will pay fees due to compute consumption. Please fully evaluate: when this skill needs to be called frequently, or when 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.