One Python script pulls the daily GitHub trending board from the Trends API: ten repos, one request, no keyword needed. The snapshot at 09:01 UTC on November 24 put elementalsouls/Claude-BugHunter first, a Claude Code bug-hunting skill bundle with 20,480 stars and 2,169 forks. A second call fetches the context behind that repo: 9 items from the last 7 days, 8 of them at 0 stars. The board costs one request per call over REST, and a failed call costs nothing.
The board, in one short script
Ten lines of code print the whole board: one POST, one parse, one loop.
import json, os, requests
key = os.environ["TMCP_API_KEY"]
resp = requests.post("https://api.trendsmcp.ai/api",
headers={"Authorization": f"Bearer {key}", "Content-Type": "application/json"},
json={"mode": "get_top_trends", "type": "GitHub", "limit": 10}, timeout=30)
print(resp.status_code)
board = json.loads(resp.json()["body"])
print(board["as_of_ts"])
for rank, repo in board["data"]:
print(rank, repo)
The script above ran in this run and printed:
200
2026-11-24T09:01:34.629018+00:00
1 elementalsouls/Claude-BugHunter
2 obra/superpowers
3 HKUDS/CLI-Anything
4 jingyaogong/minimind
5 cursor/plugins
6 firecrawl/firecrawl
7 nginx/nginx
8 openvinotoolkit/openvino
9 cathrynlavery/diagram-design
10 mvanhorn/last30days-skill
The first line prints 200, the second the snapshot timestamp, and the loop prints rank and repo for all ten rows. limit takes 1 to 200. The board name, GitHub, is the only required field besides the mode.
What the board held on November 24
The snapshot put elementalsouls/Claude-BugHunter first, obra/superpowers second, HKUDS/CLI-Anything third, jingyaogong/minimind fourth and cursor/plugins fifth, with firecrawl/firecrawl, nginx/nginx, openvinotoolkit/openvino, cathrynlavery/diagram-design and mvanhorn/last30days-skill filling ranks six to ten. No keyword goes in: the board call takes a board name and returns the leaders. The reference lists the board as daily, so the same call tomorrow returns a fresh snapshot. Every response stamps the snapshot with as_of_ts, which is how a reader checks it is current.
One climber in seven days
Seven days of rank movement returned a single row. The same snapshot sorted by climbers, limit 5, window 7d, returned one repo: elementalsouls/Claude-BugHunter, climbing 4 places from rank 5 to rank 1 since the November 17 baseline. A thin climbers list is not a stale board: the leaders board above is fresh, and the two calls read the same 09:01 snapshot. Ask for climbers with "sort": "rank_change" and a "window" such as "7d"; the rows carry the previous rank and the rank change. The climbers call costs one request, the same as the leaders call.
The numbers behind the board leader
The leader holds 20,480 stars and 2,169 forks, and the other 8 repos in its context sit at 0 stars. A second script fetches that context:
import json, os, requests
key = os.environ["TMCP_API_KEY"]
resp = requests.post("https://api.trendsmcp.ai/api",
headers={"Authorization": f"Bearer {key}", "Content-Type": "application/json"},
json={"mode": "get_context", "keyword": "Claude-BugHunter", "source": "GitHub"}, timeout=30)
print(resp.status_code)
ctx = json.loads(resp.json()["body"])
print(ctx["count"])
top = ctx["sources"][0]["items"][0]
print(top["title"], top["engagement"]["stars"], top["engagement"]["forks"], top["extra"]["language"])
The output:
200
9
elementalsouls/Claude-BugHunter 20480 2169 Python
The top item is elementalsouls/Claude-BugHunter, a Claude Code skill bundle for bug hunting and red-team work, with 84 skills, 15 slash commands and 681 disclosed-report patterns across 24 vulnerability classes. It is written in Python and was created on 2026-05-05; its latest timestamp reads 2026-11-24T04:26:28Z, hours before the board snapshot. The other 8 items in the 7-day window carry 0 stars each: same-name repos, a cheatsheet, a plugin repo and a spin-off for another model. The board shows what is hot; the context shows how much of the heat belongs to one repo.
Rank measures today, not all time
A repo with about ten times the stars sits sixth on the board. The same context call with "firecrawl" as the keyword returned 10 items. The first, firecrawl/firecrawl, holds 208,330 stars and 10,885 forks, yet it sits sixth on the board. The data suggests rank tracks what moved today, not the all-time star count. The second item, firecrawl/firecrawl-mcp-server, holds 7,897 stars and 946 forks. Change the keyword in the context script and the same code answers for any repo on the board.
Page past the first ten with offset
Ten rows is a starting point, not the whole board. The call takes an offset beside limit: offset 10 with limit 5 returns ranks 11 to 15 from the same 09:01 snapshot, google-labs-code/stitch-skills first among them, then mjmirza/app-store-compliance, Tracer-Cloud/opensre, toeverything/AFFiNE and XiaoYouChR/Ghost-Downloader-3. Paging costs the same as a fresh call, one request, and the rows stay consistent while the snapshot holds: offset 0 and offset 10 read the same as_of_ts. A script that walks a board therefore loops offset in steps of the limit until the rows run out or the count it needs is reached, and it should record as_of_ts with the rows so a later reader knows which snapshot the pages came from.
The body arrives as a string, not a list
The reply wraps the board twice. HTTP 200 delivers a dict; inside it, body is a string holding the board JSON. json.loads on the outer reply gives the envelope, and a second json.loads on body gives the board. Skip the second call and board["data"] raises a TypeError: string indices must be integers, not 'str'. The board script does both parses in a single line: board = json.loads(resp.json()["body"]). The curl cookbook shows the same double parse with jq.
A wrong board name fails inside the envelope
A board name that does not exist fails quietly. The probe in this run sent "type": "GitHub Trending" and still got HTTP 200, with the reason inside the envelope: statusCode 400 and {"error": "invalid_request"}. The message reads "Unknown type 'GitHub Trending'" and then lists every valid board name, so a typo costs one read of the reply, not a search through the docs. The HTTP code alone misleads here: 200 arrived with a 400 inside, and the failed call cost nothing.
Keep the key out of the script
The key lives in the environment, not the script. Load it with os.environ["TMCP_API_KEY"] and keep the value out of the code, the command line and shared files. The setup guide shows how to get a key. One key serves every mode in this piece, boards and context alike. Request limits live on the pricing page.