Google Trends (via Apify)

io.github.retracnv1.0.0更新于 Oct 3, 2026

Google Trends data for AI agents: interest over time, regions, rising queries and trending searches.

已验证Streamable HTTP可网页运行Web Search & ScrapingData & Analytics

概览

AI 生成的概览

让助手通过 Apify 托管的 MCP 服务器获取 Google Trends 数据,包括热度走势、地区分布、相关与飙升查询以及热门搜索。

功能
封装了一个 Apify Actor,可按关键词和地区抓取 Google Trends 数据。每个关键词返回一行结果,包含 0–100 的热度时间线、趋势方向、变化百分比、峰值日期、一句话摘要、按国家/州/城市的兴趣分布,以及带有增长百分比的热门与飙升相关查询。还可返回某国家/地区的当前热门搜索,含搜索量、增长、开始时间、相关搜索和新闻文章,并支持把多个词放在同一尺度上比较。
适用场景
适合需要实时搜索热度信号的场景:比较品牌或话题热度、查看地区需求、发现飙升查询,或监控某国家/地区的热门搜索。适用于研究、营销和内容规划类问题,此时实时 Google Trends 数据比模型记忆更可靠。
运行要求
远程 MCP 端点 mcp.apify.com,通过 streamable HTTP 访问。需要 Apify API 令牌,以 Bearer 形式放在 Authorization 请求头中;免费 Apify 账号即可获取。需要能访问 Apify 的网络,并按报告量计费。
安装前请注意
Authorization 请求头携带 Apify API 令牌,应视为机密,避免出现在共享配置或日志中。运行需付费:约每 1,000 份关键词报告 1 美元、每 1,000 次热门搜索 0.50 美元,从 Apify 额度中扣除,重复或定时调用会持续花钱。关键词输入与结果在 Apify 平台上处理,而非本地。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Google Trends (via Apify),将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "google-trends": {
      "type": "http",
      "url": "https://mcp.apify.com/?tools=automationnation/google-trends-scraper"
    }
  }
}

README

Google Trends Scraper & API: keyword trends and Trending now

[Run on Apify]

Google Trends Scraper is an Apify Actor that extracts Google Trends data for any keywords and regions — interest over time, interest by region and city, rising and top related queries, and the trending searches for any country — at $1 per 1,000 keyword reports. It works as a Google Trends API: call it from code, schedule it for trend alerts, or let AI agents use it through Apify's MCP server.

Price: $1 per 1,000 keyword reports ($0.27–$0.90 on paid plans) · $0.50 per 1,000 trending searches · Run it: https://apify.com/automationnation/google-trends-scraper · Guide: https://retracn.github.io/automationnation-actors/google-trends-scraper/

Quick facts

  • One row per keyword: the 0–100 timeline with dates, trend direction and change %, peak date, a one-sentence summary, interest by country / state / city, and top and rising related queries with growth % and Breakout flags.
  • Trending now for any country: search volume, growth %, start time, related searches and news articles; Only new trends mode turns scheduled runs into alerts.
  • Compare up to 5 terms like Google Trends, or any number of terms on one scale (rescaled through a shared anchor term).
  • Every Google Trends option: any country or subregion, past hour to 2004–present or custom dates, category, and web / image / news / YouTube / Shopping search; input as keywords, Google Trends URLs or a Google Sheet.
  • Price: $1 per 1,000 keyword reports and $0.50 per 1,000 trending searches on the Free plan (lower on paid plans); keywords with too little search volume are free. Apify's free $5 monthly credit covers about 5,000 keyword reports.
  • Same input fields as apify/google-trends-scraper, and every row also includes that Actor's output fields.

Example input

json
{  "searchTerms": [    "chatgpt",    "gemini",    "claude ai"  ],  "geo": "US",  "timeRange": "today 12-m"}

Run it from code

REST API

bash
curl -X POST "https://api.apify.com/v2/acts/automationnation~google-trends-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \  -H "Content-Type: application/json" \  -d '{"searchTerms": ["chatgpt", "gemini", "claude ai"], "geo": "US", "timeRange": "today 12-m"}'

Python — see examples/python_example.py

python
# pip install apify-clientfrom apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")run = client.actor("automationnation/google-trends-scraper").call(run_input={  "searchTerms": [    "chatgpt",    "gemini",    "claude ai"  ],  "geo": "US",  "timeRange": "today 12-m"})for item in client.dataset(run["defaultDatasetId"]).iterate_items():    print(item.get("searchTerm"), item.get("trendDirection"), item.get("changePercent"), item.get("summary"))

JavaScript — see examples/node_example.mjs

js
// npm install apify-clientimport { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });const run = await client.actor('automationnation/google-trends-scraper').call({  "searchTerms": [    "chatgpt",    "gemini",    "claude ai"  ],  "geo": "US",  "timeRange": "today 12-m"});const { items } = await client.dataset(run.defaultDatasetId).listItems();for (const item of items) console.log(item.searchTerm, item.trendDirection, item.changePercent, item.summary);

Use it with AI agents (MCP)

Hosted MCP server URL (Claude, ChatGPT, Cursor and other clients with remote MCP support):

https://mcp.apify.com?tools=automationnation/google-trends-scraper

Local config for Claude Desktop / Cursor — mcp/claude_desktop_config.json:

json
{  "mcpServers": {    "google-trends-scraper": {      "command": "npx",      "args": [        "-y",        "@apify/actors-mcp-server",        "--tools",        "automationnation/google-trends-scraper"      ],      "env": {        "APIFY_TOKEN": "YOUR_APIFY_TOKEN"      }    }  }}

FAQ

Is there an official Google Trends API? Google opened an official Google Trends API to a small group of alpha testers in 2025. For everyone else, Google Trends Scraper on Apify provides Google Trends data through Apify's REST API, Python and JavaScript clients, integrations and MCP.

What does Google Trends Scraper return? For each keyword: interest over time (0–100 with dates), trend direction, change %, peak date, a one-sentence summary, interest by region and city, and top and rising related queries. Trending now rows include search volume, growth %, start time, related searches and news articles.

Can it compare more than 5 keywords? Yes. With Compare all search terms on one scale, terms are batched around a shared anchor term and rescaled so any number of terms sit on one 0–100 scale.

How much does it cost? $1 per 1,000 keyword reports and $0.50 per 1,000 trending searches on Apify's Free plan, less on paid plans. Keywords without enough search volume and failed searches are free.

Can I switch from apify/google-trends-scraper? Yes. Keep your input (searchTerms, isMultiple, timeRange, customTimeRange, geo, category, startUrls, spreadsheetId, maxItems) and change the Actor ID; rows keep that Actor's field names next to the cleaner ones.

More from AutomationNation


This repository holds usage examples. The scraper itself runs on the Apify platform; you need a free Apify account and API token. Examples are MIT licensed.

来源:README.md,提交 85ed3fe

工具

0
工具元数据尚未被收录。

版本历史

1
  1. v1.0.0最新Oct 3, 2026