trendscope
search 19y of HN中文 subscribe github

api clients

Copy-paste starters for the trendscope API — no keys, no signup, plain JSON. Base: https://trendscope.zalize.com.

curl

BASE=https://trendscope.zalize.com
curl -s $BASE/data/latest.json | python3 -m json.tool | head -40
curl -s $BASE/docs/api/new.json      # today's fresh items
curl -s $BASE/docs/api/meteors.json  # biggest 1-day climbers
curl -s $BASE/docs/api/streaks.json  # board veterans
curl -s $BASE/docs/api/meta.json     # machine-readable catalog

python (stdlib only)

import json, urllib.request
BASE = "https://trendscope.zalize.com"
latest = json.load(urllib.request.urlopen(BASE + "/data/latest.json"))
items = [i for v in latest["items"].values() for i in v] if isinstance(latest.get("items"), dict) else latest["items"]
for it in items[:10]:
    print(it["rank"], it["title"], it["url"])

javascript / browser

const BASE = "https://trendscope.zalize.com";
const latest = await (await fetch(BASE + "/data/latest.json")).json();
const items = Object.values(latest.items).flat(); // dict-of-lists or list
console.table(items.slice(0, 10));

web component

<script src="https://trendscope.zalize.com/docs/api/widget.js"></script>
<trend-scope mode="board" n="10"></trend-scope>

MCP server (agents)

# zero-dep stdio MCP server wrapping the API
git clone https://github.com/zalize-com/trendscope
python3 trendscope/scripts/mcp_server.py
# tools: ts_latest ts_new ts_risers ts_search ts_streaks ts_topics ts_sources
# override base: TRENDSCOPE_BASE=http://localhost:8000

iframe embeds

<iframe src="https://trendscope.zalize.com/embed.html?mode=board&n=5"
        style="width:420px;height:300px;border:0"></iframe>
# 26 modes — gallery at embeds.html