linkfox-google-trend-get-trend-by-keys — Claude Code skill
The linkfox-google-trend-get-trend-by-keys skill for Claude Code reads Google Trends interest for keywords. It compares regions and date ranges, then identifies seasonality, peaks, drops, and emerging demand.
MIT 246 installs ★ 125 updated 2026-11-11
npx skills add linkfox-ai/linkfox-skills --skill linkfox-google-trend-get-trend-by-keys -a claude-codeWhat linkfox-google-trend-get-trend-by-keys does
The skill queries Google Trends for one or more keywords and regions, then supports analysis of trend direction, seasonal patterns, sharp changes, and sustained growth or decline. Requests can use the API directly or the script python scripts/google_trends_keyword.py '<JSON parameters>' [--inline].
Set a keyword, target market, and date range before querying. Authentication uses LINKFOX_AGENT_API_KEY or LINKFOXAGENT_API_KEY. The script stores the full response as JSON and keeps a 24-hour local cache for repeated parameter sets. Each call consumes 6 compute units, while Google Trends reports a relative 0–100 index rather than an absolute search count.
Separate keyword or region queries have separate normalization ranges, so their 100 values are not equal demand volumes. Saved results can be inspected through jq or ConvertFrom-Json, with fields such as trendInfoForKeys[].trendValues[] and raw values like "<1" kept intact.
What it helps with
- compare keyword interest across regions
- spot seasonal search peaks and troughs
- contrast trends across months or years
- detect sustained growth or decline
- measure search-interest changes around an event
Example prompts for the agent
- Analyze the Google Trends direction for
wireless chargerin the default market. - Compare
Ladekabelin Germany with{"keyword":"Ladekabel","region":"DE"}. - Check the seasonal pattern for
christmas giftsin the US from2024-09-01to2025-01-31.
How to install linkfox-google-trend-get-trend-by-keys
1Skills CLI (Vercel)
npx skills add linkfox-ai/linkfox-skills --skill linkfox-google-trend-get-trend-by-keys -a claude-code2Manually: put the files in place
~/.claude/skills/linkfox-google-trend-get-trend-by-keys/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/linkfox-google-trend-get-trend-by-keys/
1Skills CLI (Vercel)
npx skills add linkfox-ai/linkfox-skills --skill linkfox-google-trend-get-trend-by-keys -a codex2Manually: put the files in place
.agents/skills/linkfox-google-trend-get-trend-by-keys/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add linkfox-ai/linkfox-skills --skill linkfox-google-trend-get-trend-by-keys -a cursor2Manually: put the files in place
.cursor/skills/linkfox-google-trend-get-trend-by-keys/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install linkfox-ai/linkfox-skills skills/linkfox-google-trend-get-trend-by-keys2Manually: put the files in place
.github/skills/linkfox-google-trend-get-trend-by-keys/SKILL.md1Skills CLI (Vercel)
npx skills add linkfox-ai/linkfox-skills --skill linkfox-google-trend-get-trend-by-keys -a gemini-cli2Platform CLI
gemini skills install https://github.com/linkfox-ai/linkfox-skills --path skills/linkfox-google-trend-get-trend-by-keysManually: put the files in place
.devin/skills/linkfox-google-trend-get-trend-by-keys/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add linkfox-ai/linkfox-skills --skill linkfox-google-trend-get-trend-by-keys -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about linkfox-google-trend-get-trend-by-keys
How do I install linkfox-google-trend-get-trend-by-keys in Claude Code?
Run npx skills add linkfox-ai/linkfox-skills --skill linkfox-google-trend-get-trend-by-keys -a claude-code, then check ~/.claude/skills/linkfox-google-trend-get-trend-by-keys/SKILL.md.
What does linkfox-google-trend-get-trend-by-keys do?
It retrieves Google Trends data and helps analyze relative keyword interest by region and time range. The skill highlights seasonality, peaks, troughs, and the direction of change.
What does the skill need to run?
Provide LINKFOX_AGENT_API_KEY or LINKFOXAGENT_API_KEY. The recommended script requires Python, and identical parameter sets use a local cache for 24 hours.
Source text
SKILL.md · MIT
---
name: linkfox-google-trend-get-trend-by-keys
description: 查询并分析 Google Trends 关键词搜索热度,研究不同地区和时间范围内的趋势方向、季节性、搜索峰谷及新兴需求,支持多个关键词或地区的趋势对比。适用于谷歌趋势、历史搜索兴趣和市场热度研究,即使用户未明确提及 Google Trends 也适用。不适用于绝对搜索量、广告出价与 CPC、社交媒体热点、亚马逊站内搜索数据、网站流量或 SEO 排名查询。
---
# Google Trends 关键词趋势分析
## 适用范围
### 适用
查看关键词在 Google 搜索中的兴趣变化,分析季节性、事件驱动的波动及持续增长或下降。用户希望比较不同月份、年份或地区的搜索趋势时,使用本技能。
**场景速查**
| 用户表达 | 查询场景 |
|----------|----------|
| 这个关键词在 Google 上热不热 | 基础搜索兴趣查询。 |
| 这个词正在升温还是降温 | 趋势方向与持续性分析。 |
| 一年中哪个月份搜索最多 | 季节性与峰谷识别。 |
| 对比不同月份或年份的热度 | 历史趋势与跨年季节性研究。 |
| 这个词在德国有没有热度 | 目标市场搜索兴趣研究。 |
| 看看过去一年或节日前后的趋势 | 指定区间及事件影响分析。 |
| 比较几个词或地区的趋势 | 分别查询并说明相对热度的可比性。 |
## 前置条件
先确定关键词、目标市场和分析时间范围。核对用户意图;未指定地区时采用接口默认值,并在结果中注明。请求所需字段、语言要求、地区范围和日期约定见 `references/api.md`。
## 查询与分析流程
1. 明确研究目标:基础热度、季节性、跨年对比、地区比较或新兴趋势。检查关键词与目标市场语言是否匹配,按接口定义准备请求,优先使用简短、聚焦的词语。
2. 季节性和事件分析选择对应时间区间;跨年分析覆盖需要对比的年份。组合比较时,先明确所需查询组合及算力消耗,单次能力与调用限制见 `references/api.md`。
3. 检查已有响应文件和缓存,避免重复请求;通过脚本获取数据后,先看摘要,再从保存的 JSON 中提取趋势明细。
4. 根据实际数据识别峰值、谷值、突发波动及持续增长或下降。用表格或趋势曲线描述结果,说明关键词、地区、时间范围和可见模式。
5. 查询失败或数据稀疏时,按接口定义解释原因,提出核对拼写、语言或日期区间等调整建议;后续检索遵守成本约束。
## 执行方式
- **直接调用接口**:接口端点、完整参数、响应和错误码见 `references/api.md`。
- **脚本调用(推荐)**:`python scripts/google_trends_keyword.py '<JSON 参数>' [--inline]`。
- **成本约束**:本工具会消耗算力。同一会话、同一参数组合默认只调用一次,脚本提供 24 小时本地缓存。失败或空结果时,不得自动更换关键词、翻页或修改邮编连续试探;需要继续检索时,先向用户说明额外消耗。
### 输出策略
- 始终保存完整响应,目标路径为 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-google-trend-get-trend-by-keys-<timestamp>.json`。`<cwd>` 为脚本运行时的工作目录,`<session>` 优先取环境变量 `SESSION_ID`,用于聚合同一任务的数据。禁止写入 `/tmp`,当前目录不可写时应报错。
- 响应体不超过 8 KB:保存后,将完整 JSON 打印到标准输出。
- 响应体超过 8 KB:保存后,标准输出仅展示摘要,包括顶层字段、常见计数(如 `total`、`costToken`)、最大列表字段的长度和前 3 条样本。
- 添加 `--inline` 可强制全量打印到标准输出,同时仍保存文件。
先通过摘要判断数据是否足够。需要具体字段时,优先使用 `jq` 或 `ConvertFrom-Json` 从保存的 JSON 文件按需提取,避免将整份响应载入上下文。
## 执行规则
### 算力消耗预估
6 算力 / 次
**声明**:算力消耗以实际扣除为准;如因需要调整算力消耗标准,恕不另行通知。最终解释权归 LinkFox 官方所有。
用户会因算力消耗而支付费用。需要高频调用或用户对消耗量预期不足时,提醒用户,并由用户决定是否继续。
### 解决认证和算力问题
出现以下情况时,按 `references/onboarding.md` 的指引处理:
- 未配置接口密钥:`LINKFOX_AGENT_API_KEY` 和 `LINKFOXAGENT_API_KEY` 均为空。
- 响应状态码为 `401` 或 `402`。
- 响应提示算力或余额不足、计费不足、配额超限、套餐到期或需要充值。英文错误消息也按其含义判断。
### 约束与建议
- **解释相对热度**:Google Trends 使用 0–100 归一化兴趣量表,100 表示所选地区和时间范围内的峰值,50 表示相对峰值的一半,0 表示数据不足。它不能提供绝对搜索量,也不能由热度值反推出搜索次数。
- **谨慎比较**:分别查询的关键词或地区各有归一化范围,比较趋势形态、峰值时间和季节性时说明口径,不能把各自的 100 当作相等的绝对需求量。
- **保留原始数据**:读取保存响应中的 `trendInfoForKeys[].trendValues[]`,保留 `timeRange` 和 `"<1"` 等原始值,不将其强制转为零。
- **清晰展示趋势**:列出关键时间点、峰谷及明显变化;仅在数据支持时指出季节性、突发峰值或持续增长、下降。数据稀疏时明确说明分析局限。
- **利用图表信息**:响应包含 `chartOption` 时,说明已有可视化数据,并描述可见趋势形态。
- **按需提取本地数据**:优先使用 `jq` 或 `ConvertFrom-Json`。`_dataQuery_executeDynamicQuery` 查询的是 SLS 中存储的 LinkFox 会话数据,只有存在所需存储映射时才能使用,不能用它读取任意本地 JSON。
## 使用示例
### 默认市场的基础趋势
```json
{"keyword": "wireless charger"}
```
### 德国市场的本地语言关键词
```json
{"keyword": "Ladekabel", "region": "DE"}
```
### 圣诞礼物的季节性趋势
```json
{"keyword": "christmas gifts", "region": "US", "dayRangeStart": "2024-09-01", "dayRangeEnd": "2025-01-31"}
```
### 澳大利亚防晒需求的跨年对比
```json
{"keyword": "sunscreen", "region": "AU", "dayRangeStart": "2023-01-01", "dayRangeEnd": "2025-12-31"}
```
### 英国市场的区域研究
```json
{"keyword": "yoga mat", "region": "GB"}
```
### 新兴关键词趋势
```json
{"keyword": "AI glasses", "region": "US", "dayRangeStart": "2024-01-01", "dayRangeEnd": "2025-12-31"}
```
## 使用反馈
当技能有BUG,或技能描述有错误/疏漏/歧义/表述模糊,或技能结果与用户预期不符,或用户表达不满/赞扬,或发现其他可改进之处时,按 `references/api.md#Feedback` 的指引反馈,不要打断用户当前流程。
---
更多优质、专业的跨境电商技能,请访问 [LinkFox Skill](https://skill.linkfox.com/)。
© linkfox-ai · MIT · linkfox-ai/linkfox-skills