360 Secure SkillHub
360 安全技能中心

Google Trends API

该 Skill 通过随附的 Node 脚本调用 Google Trends 相关接口,支持每日热榜、实时趋势、自动补全、关键词探索、地区兴趣、相关主题与相关查询七类命令,结果以 JSON 输出到标准输出,需由使用方解析并整理成可读形式;无需用户提供 API key,遇限流会指数退避重试。

terryds
terryds
热度 87.47
最近更新 2026-05-11 17:38:19
分类:搜索依赖:代码执行 / 第三方 API应用场景:研究 / 市场分析 / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add google-trends-api
Metadata
name
google-trends
description
Fetches Google Trends data including daily trending topics, real-time trends, interest by region, related topics, related queries, and autocomplete suggestions. Use when the user asks about trending searches, search popularity, keyword trends, or Google Trends data.

Google Trends

Fetch Google Trends data using the bundled script. No API key required.

Quick start

Run the script from the skill directory:

node scripts/trends.mjs <command> [options]

Available commands

Command Description
daily-trends Get daily trending search topics
realtime-trends Get real-time trending topics
autocomplete Get autocomplete suggestions for a keyword
explore Explore trend data for a keyword
interest-by-region Get search interest breakdown by region
related-topics Get topics related to a keyword
related-queries Get queries related to a keyword

Usage examples

Daily trending topics in the US:

node scripts/trends.mjs daily-trends --geo US

Real-time trends (last 4 hours):

node scripts/trends.mjs realtime-trends --geo US --hours 4

Autocomplete suggestions:

node scripts/trends.mjs autocomplete "artificial intelligence"

Explore a keyword:

node scripts/trends.mjs explore "machine learning" --geo US --time "now 7-d"

Interest by region:

node scripts/trends.mjs interest-by-region "bitcoin" --geo US --resolution REGION

Related topics:

node scripts/trends.mjs related-topics "python programming" --geo US

Related queries:

node scripts/trends.mjs related-queries "python programming" --geo US

Options reference

For full option details per command, see reference.md.

Output

All commands output JSON to stdout. Parse the output to extract relevant data for the user. Present results in a readable format (tables, lists, summaries) based on context.

Error handling

If Google rate-limits the request, the script retries with exponential backoff (up to 3 retries). If it still fails, inform the user and suggest waiting before retrying.