Trends World
This read-only MCP server lets you query current Trends World data on trending topics, cross-border stories, country lookup, and data freshness.
Get ranked trending topics for a country/region by ISO code or name, with optional limit.
List stories that are #1 in multiple countries at once.
Search countries by name or partial name and see each one’s current top topic.
Check snapshot freshness, coverage out of 176 places, source distribution, and failures.
Aggregates Google Trends daily trending-search feeds for 122 countries/regions, including search volume context, related-news links and per-country top-10/20 trend lists exposed as static JSON and through the MCP tools.
🌍 Trends World
Daily trending topics for 176 countries and regions — as a static website and an open dataset. Every topic carries a link to the article that reported it.
Live site: https://trends-world.pages.dev
Dataset: static JSON, no API key, no authentication, refreshed every three hours
MCP server:
mcp/trends-mcp.mjs— zero dependencies, stdio transport, four read-only tools
What it does
Trends World collects the single hottest search topic of the day in each of 176 countries and regions, links every entry to its original source, and groups topics that are trending in more than one country at the same time. The site itself is static: all data is pre-rendered JSON, and GitHub Actions rebuilds it every three hours.
Related MCP server: What Happen MCP
Why it is different
Broadest coverage | 176 countries and regions, most trend sources stop at 30–60 |
Sources are labelled, never blended | Google Trends measures search interest, Bing News measures news interest. Each entry says which one answered, and the documentation repeats the warning so agents do not add them together |
Open by default | Every page is backed by a public JSON file; there is also an MCP server and an |
No dependencies | Node.js ≥ 20 and nothing else — the crawler, the page generator, the MCP server and the image renderer all use the standard library only |
Nothing to keep alive | Static hosting on Cloudflare Pages; there is no server to patch or pay for |
MCP tools
Tool | Arguments | Returns |
|
| Ranked topics with search-volume bucket, source and article URL |
| – | Stories that are #1 in several countries at once |
|
| Matching countries and their current top topic |
| – | Freshness, coverage out of 176, source mix, failures |
{
"mcpServers": {
"trends-world": {
"command": "node",
"args": ["<path-to-repo>/mcp/trends-mcp.mjs"]
}
}
}Data endpoints
/data/countries.json 176 places: ISO codes, names, continent, coordinates
/data/board.json top topic per country
/data/details/<ISO>.json full top-10 for one country
/data/global.json cross-border clusters, each with a slug
/data/meta.json generation time, coverage, source distribution, failuresDocumentation: https://trends-world.pages.dev/api/ · machine-readable summary: https://trends-world.pages.dev/llms.txt
🌍 Trends World · 全球每日热榜
一眼看遍世界:把 176 个国家 / 地区 当天热度最高的话题汇总到一张可点击的世界地图上,每条话题都带着原文链接,点开即达。
快速开始
npm run crawl # 抓取 176 个国家/地区,生成 public/data/
npm run start # 本地预览 http://127.0.0.1:4173crawl 会顺带预渲染国家页 / 话题页 / sitemap / feed / 每日快照图;
只想重新生成页面(不联网)时用 node tools/crawl.mjs --use-cache。
零依赖:只需要 Node.js ≥ 20,不用
npm install。 上线后由 GitHub Actions 定时抓取,这一步不需要在任何机器上常驻。
它做了什么
能力 | 说明 |
世界热度地图 | 本地 GeoJSON 自绘 SVG,按热度分 4 档着色,点国家下钻 |
各国今日热榜 | 每国 10–20 条话题,含搜索量、来源、相关新闻链接 |
全球此刻 | 右侧实时榜单,按热度排序,点击直达原文 |
搜索 / 筛选 | 支持国家名、ISO 代码、话题关键词搜索,按大洲筛选 |
深链接 |
|
自动更新 | 每 25–30 分钟后台静默刷新,页面每 10 分钟自动同步 |
离线可用 | 抓取结果落盘 |
跨国故事 | 同一话题在多个国家登顶时自动聚类,点开看它触及了哪些国家 |
话题页 | 每个跨国故事一个静态页,含各国搜索量与原文链接 |
变化追踪 | 国家页标注 |
每日快照图 | 每次抓取生成一张 1200×630 可分享卡片( |
数据来源(按优先级降级)
Google Trends 每日热搜 RSS — 122 个国家/地区,质量最高,自带 1–6 条相关新闻链接
百度热搜 — 中国大陆(Google Trends 不提供 CN)
维基百科当日浏览量 Top — Google 未覆盖但有统计的国家
Bing 新闻 — 剩余 51 个小国,按国名检索当天新闻
每条记录都会标注实际使用的来源,界面上没有隐藏。
代理说明
Google / 维基 / Bing 在国内直连不通,服务端会自动探测代理,优先级:
命令行参数
--proxy=http://127.0.0.1:7890环境变量
HTTPS_PROXY/HTTP_PROXY/ALL_PROXYWindows 系统代理(注册表
Internet Settings,Clash / v2ray 等客户端会自动写入)
node server/index.mjs --proxy=http://127.0.0.1:7890探测不到代理时会走直连,此时 Google 类数据源会失败并自动降级到 Bing 新闻。
抗限流设计
实测 Google 对突发并发请求会返回 302 → /sorry/ 验证码页,因此:
全局请求节流(≈260–480ms 间隔),3 个 worker 串行排队
单次 302/429 快速重试,连续 5 次失败才冷却该数据源 8 分钟
每国结果缓存 30 分钟并落盘,重启不重复抓取
冷启动先在后台预热,页面读缓存秒开,缺的再轮询补齐
目录结构
trends-world/
├── server/
│ ├── store.mjs 抓取调度(队列 / 节流 / 缓存 / 降级)
│ ├── sources.mjs 各数据源解析器
│ ├── proxy-agent.mjs 代理探测 + 零依赖 HTTPS CONNECT 隧道
│ └── index.mjs 本地预览用的静态服务器(线上不用)
├── mcp/
│ └── trends-mcp.mjs 零依赖 MCP 服务器(stdio,4 个只读工具)
├── SKILL.md agent 技能说明(SKILL.md 标准)
├── tools/
│ ├── crawl.mjs 抓取并导出静态 JSON(CI 与本地共用)
│ ├── cluster.mjs 跨国故事聚类(Global Pulse)+ 话题 slug
│ ├── history.mjs 每日快照历史(7 天,用于变化标记)
│ ├── country-pages.mjs 预渲染国家页 / 话题页 / 索引页 / sitemap / feed
│ ├── daily-image.mjs 每日快照图(headless Chrome 渲染 PNG)
│ ├── report.mjs 每日流量日报(Cloudflare Analytics)
│ └── build-countries.mjs 重新生成 countries.json
├── public/ 部署产物(Pages 直接托管)
│ ├── index.html / app.js / styles.css / world.geo.json
│ ├── about/ privacy/ terms/ security/ 英文说明页
│ ├── countries/ 176 国全量索引页(纯 HTML)
│ ├── country/<iso>/ 20 个预渲染国家详情页
│ ├── topic/<slug>/ 跨国故事详情页
│ ├── topics/ 当前故事的索引页
│ ├── daily/ 每日快照图 + index.json(latest.png 为稳定入口)
│ ├── api/ 端点文档(给人也给 agent)
│ ├── llms.txt 给语言模型的站点摘要
│ ├── feed.xml Atom 订阅
│ ├── sitemap.xml CI 每轮重新生成(当前 37 条 URL)
│ ├── _headers CSP / HSTS 等安全响应头
│ ├── robots.txt .well-known/security.txt
│ └── data/ 抓取生成的快照(gitignore)
├── data/
│ ├── countries.json 176 个国家/地区元数据
│ └── cache/ 抓取中间缓存(gitignore)
│ └── history/ 各国最近 7 天快照(随 Actions 缓存跨运行累积)
└── .github/
├── workflows/sync.yml 每 3 小时抓取 + 部署
├── workflows/daily-report.yml 每天生成流量日报并提交
└── PAGES-SETUP.md Cloudflare 接入步骤页面
界面文案(顶栏、地图、面板、卡片、页脚)全英文;只有国家/地区名仍用中文简称,话题标题保留数据源原语言。
路径 | 内容 |
| World heat map + Global pulse + Today's top trends by country |
| 176 个国家/地区全量索引(纯 HTML,每行带今日 Top1 与来源) |
| 预渲染的国家详情页(20 个重点国家),带变化标记与近期榜首 |
| 跨国故事详情:该故事在哪些国家登顶、各自搜索量与原文链接 |
| 当前跨國故事的索引 |
| Atom 订阅(跨国故事,随快照更新) |
| 当日快照图(1200×630),归档在 |
| Methodology, data sources, coverage gaps, how it's built, limitations |
| No accounts / no cookies, request data, outbound links, GDPR rights |
| Provided as is, third-party rights, acceptable use, liability |
| Attack surface, security headers, vulnerability disclosure |
| RFC 9116 machine-readable contact |
页面里的邮箱(
hello@/privacy@/security@trends-world.example)和security.txt里的域名是占位符,上线前请全局替换成你自己的。 需要中文版说明页的话,可以照同样结构放到/zh/下。
给 AI agent 用
站点同时是一个公开数据源:所有数据都是静态 JSON,无 key、无鉴权、无限流。
/data/countries.json 176 个地方的元数据
/data/board.json 每国 Top1
/data/details/<ISO>.json 单国完整热榜
/data/global.json 跨国故事聚类(带 slug)
/data/meta.json 快照时间、覆盖率、来源分布对外入口:
路径 | 作用 |
| 端点文档 + 字段说明 + 常见误读警告 |
| 给语言模型看的站点摘要(llms.txt 约定) |
| 零依赖 MCP 服务器(stdio) |
| 仓库根目录的 agent 技能说明 |
MCP 服务器
mcp/trends-mcp.mjs 用标准输入输出讲 JSON-RPC,不依赖任何包:
{
"mcpServers": {
"trends-world": {
"command": "node",
"args": ["/path/to/trends-world/mcp/trends-mcp.mjs"]
}
}
}暴露 4 个只读工具:trending_by_country、global_pulse、search_countries、
snapshot_status。数据走公开接口,带 10 分钟内存缓存;TRENDS_BASE 可指向别的部署。
手动测试:
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | node mcp/trends-mcp.mjs为什么在文档里反复强调「来源不统一」
agent 很容易把 google-trends(搜索兴趣)和 bing-news(新闻热度)当成同一个指标
相加或对比,从而写出错误结论。/api/、llms.txt、SKILL.md 三处都写了这条警告——
给机器读的文档,比给人读的更需要写清边界。
内容策略(为什么站点长这样)
这一节记录几次实际踩坑后定下的规则,改动前先读。
国家命名一律用中性短名
站点面向全球公开访问,政治性正式国名会被举报、也会影响收录。所有生成产物
(countries.json、world.geo.json、页面)统一走 tools/build-countries.mjs
里的 NEUTRAL_NAMES 覆盖表:
TW 台湾 CN 中国 KP 朝鲜 KR 韩国 AE 阿联酋
HK 中国香港 MO 中国澳门 US 美国 GB 英国 RU 俄罗斯不要在页面模板里硬编码国名,也不要绕过这张表直接改 JSON——下一轮抓取会覆盖回去。
页面的「可索引价值」靠时间累积
Google 对新站的表现很明确:抓一轮、判定内容太薄、不再回访。所以国家页除了当天的 Top10,还必须有只有时间才能产生的内容:
data/cache/history/<ISO>.json保留每国最近 7 天的 Top10(放在 CI 缓存目录里,不进 git)页面显示
NEW/▲n/▼n变化标记,以及「近期榜首」列表只有存在第 2 天数据时才显示标记,避免首日整屏
NEW的假信号
页面矩阵
层级 | 数量 | 作用 |
国家详情页 | 20(预渲染) | 长尾词 + 内链枢纽 |
国家索引页 | 1(176 行) | 一次给爬虫 176 个入口 |
话题详情页 | 10/天(滚动) | 每条跨国故事一页,天然每天新增 |
话题索引页 | 1 | 串起当天所有话题页 |
跨国故事是按标题相似度聚类,不是按地理
所以会出现反直觉的配对——例如美国某天的 Top1 是板球赛 new zealand vs india,
它就会被归进那个簇。这是数据本身如此,不是 bug。
每日快照图
tools/daily-image.mjs 在每次抓取末尾渲染一张 1200×630 的卡片(TOP3 跨国故事 +
高亮世界地图),输出:
public/daily/<YYYY-MM-DD>.png 按日期归档
public/daily/latest.png 稳定入口,前端不用算日期
public/daily/index.json 最近 30 天索引没有 npm 依赖:脚本直接 spawn 无头 Chrome 截图(--headless=new --screenshot),
findChrome() 依次查找 Playwright 缓存目录 → /usr/bin/google-chrome → /usr/bin/chromium
→ Windows 本地安装路径。
CI 里只需要装浏览器二进制:
- name: Install headless Chromium
continue-on-error: true
run: npx --yes playwright@1 install --with-deps chromiumcontinue-on-error 是刻意的:浏览器装不上不该拖垮部署。脚本找不到浏览器时打印一行
提示后正常退出,站点其余部分照常发布。
部署到 Cloudflare(当前方案:静态站 + GitHub Actions 定时抓取)
站点本身是纯静态的:Cloudflare Pages 只负责发文件,抓取由 GitHub Actions 定时完成。 部署完就不用管了,不需要服务器、不需要保持任何机器在线。
GitHub Actions(每 3 小时)
└─ node tools/crawl.mjs
├─ 抓取 176 国 → public/data/*.json
├─ 记录当日快照 → data/cache/history/<ISO>.json
└─ 调用 country-pages.mjs → 国家页/话题页/索引/feed/sitemap
└─ 调用 daily-image.mjs → public/daily/<date>.png
└─ wrangler pages deploy public → Cloudflare Pages数据契约(前端只认这四个文件)
文件 | 用途 | gzip |
| 176 个国家元数据 | 8 KB |
| 每国 Top1,首屏点亮地图 | 70 KB |
| 单国完整热榜,点开才加载 | ~3 KB |
| Global Pulse:跨国故事聚类,每条带 slug | 3 KB |
| 生成时间、覆盖率、失败清单 | < 1 KB |
一次性配置
详细步骤见 .github/PAGES-SETUP.md,概括:
Cloudflare 建一个 Pages 项目(Upload assets 方式);
建 API Token(Pages:Edit + Account Settings:Read);
仓库 Secrets 配
CLOUDFLARE_API_TOKEN、CLOUDFLARE_ACCOUNT_ID, 可选HTTPS_PROXY(抓 Google 用);Actions 手动跑一次
Sync trends and deploy。
为什么不用 Workers
Workers 的出口是机房 IP,Google Trends 大概率返回 302 验证码;且没有磁盘、单次调用有子请求上限, 需要 KV + 多段 Cron 才能跑完 176 个国家。GitHub Actions 里跑现有 Node 脚本,改动最小、行为与本地一致。
本地预览
npm run crawl # 抓取并生成 public/data/
npm run start # 静态服务 http://127.0.0.1:4173
npm run preview # 小范围先抓 8 个国家,再起服务(调试用)public/data/ 与 data/cache/ 都在 .gitignore 里——数据不进版本库,避免每轮 2 MB 快照撑爆仓库。
抓取脚本参数
node tools/crawl.mjs --jobs=4 # 并发数(默认 4)
node tools/crawl.mjs --only=US,JP,CN # 只抓指定国家
node tools/crawl.mjs --use-cache # 不联网,只用缓存重新导出
node tools/crawl.mjs --proxy=http://127.0.0.1:7890失败不会清空站点:抓不到的国家会沿用上一轮的 details/*.json,并在 meta.json 里记一笔。
已知边界
Google Trends 每日热搜本身不是实时的,一天更新数次,所以「今日」指最近一次榜单
小国(约 51 个)用的 Bing 新闻是「当天新闻热度」,不是搜索量,界面已标注来源区分
部分外链(如 Cricinfo)对非浏览器请求返回 403,正常浏览器打开不受影响
跨国故事按标题相似度聚类,偶尔会把同一天的不同事件合并,页面已注明这一点
数据版权归各来源所有,本工具只做聚合与跳转
Available Tools
4 toolsglobal_pulseA
List the stories that are simultaneously the #1 trending topic in more than one country. Useful for spotting events with international reach.
Inputs: no named parameters.
search_countriesA
Find country ISO codes by name, and see what each one is currently trending on. Use this when you do not know the exact code.
Inputs: query (required).
snapshot_statusA
Check how fresh the data is: generation time, coverage out of 176 places, source distribution and any failures. Call this first if freshness matters.
Inputs: no named parameters.
trending_by_countryA
Return the ranked list of top trending searches for one country or region, newest snapshot first. Each entry carries its rank, the headline, the search-volume bucket the source itself reported (values like "200+" — these are buckets, not exact counts), the source that answered (google-trends, bing-news, wikipedia or baidu) and a URL for the article that ran it. The response also states the snapshot timestamp and which source answered for that place, so two countries measured by different sources are not comparable. If the name you pass is ambiguous the tool returns the matching ISO codes instead of guessing.
Inputs: country (required), limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a mostly distinct role: cross-country #1 stories, country lookup, data freshness, and per-country rankings. The main overlap is that search_countries also shows what a country is trending on, which can be confused with trending_by_country; descriptions mitigate this by framing search_countries as a lookup helper.
Names are readable but follow mixed conventions: adjective_noun (global_pulse), verb_noun (search_countries), noun_noun (snapshot_status), and gerund_preposition_noun (trending_by_country). There is no single predictable pattern, though each name is descriptive.
Four tools is a tight, well-scoped set for a niche trends-browsing server, and each tool covers a distinct need. It is slightly thin, but not inappropriately so for the narrow domain.
The surface covers the core lifecycle: discover country codes, check data freshness, browse per-country trends, and find cross-country #1 stories. Minor gaps include no historical/time-series access or topic-based search, but core workflows are covered.
Maintenance
Related MCP Connectors
Trending searches in 100+ countries, Google News search, and Google/YouTube/Amazon keyword ideas.
Real-time news and trending topics from major sources
Search and follow news from 234 countries: recent articles, publishers and coverage.
Worldwide news in 65+ languages every 15 minutes, with tone and the people, companies and places.
Related MCP Servers
- AlicenseBqualityDmaintenanceObtain real-time news trending lists: Weibo Hot Search, Baidu Hot List, Zhihu Hot List, Jinri Toutiao Hot List, 36Kr Hot List, Tencent News Hot List, Bilibili Hot List, The Paper Hot List, Hupu Walking Street Hot List, TikTok Hot List, IT News Hot List, Huoxiu Hot List, Baidu Tieba Hot List, Juejin172Apache 2.0
- FlicenseNot gradedqualityNot gradedmaintenanceAggregates news from 70+ platforms across categories like tech, finance, social, entertainment, and sports. Provides access to trending topics from popular Chinese platforms including Weibo, GitHub, Zhihu, Baidu, and Bilibili.12 npm2-
- AlicenseNot gradedqualityBmaintenanceEnables users to retrieve current daily trending Google searches for any ISO country, including approximate traffic floors and associated news coverage.57 npmMIT
- AlicenseAqualityBmaintenanceProvides real-time trending topics, news headlines, article summaries, and full-text extraction for AI assistants across 250+ countries and categories.61ISC