GitHub Adds Privacy-Safe Star History REST API Endpoint

What shipped

GitHub shipped a new REST endpoint on September 4, 2026 that returns repository star history — growth over time with timestamps, without exposing any stargazer's identity.

What changed

GET /repos/{owner}/{repo}/stargazers/history (documented under REST API version 2026-03-10) returns weekly buckets, newest first:

[
  {"week": 1788048000, "total": 181, "days": [21,25,39,21,28,20,27]}
]

Week timestamp, count for the week, seven daily counts. Same shape as the commit activity feed, so existing charting code ports over in minutes. A companion GET /repos/{owner}/{repo}/stargazers/count returns {"count": N} for the current total. I pulled both live against vercel/next.js — they work.

Context: earlier this year GitHub restricted stargazer listing endpoints to admins and collaborators to protect user privacy, which broke every star-growth tracker built on that list. This is the sanctioned replacement.

Why a builder cares

If your dashboard tracked competitor repos or your own project's growth by paging through stargazers, that data access is not coming back — this endpoint is the restore path, and the trade is explicit: you get the trend, GitHub keeps the people. Aggregate-only APIs are the new deal on platforms that got burned by scraping. Build your metrics on counts, not identities, because identity-level access can be revoked on any given Tuesday.

FAQ

What is GitHub's star history API?

A REST endpoint, GET /repos/{owner}/{repo}/stargazers/history, that returns weekly star counts per repository with a Unix week timestamp, weekly total, and seven daily counts — newest first. It is documented under GitHub REST API version 2026-03-10 and shipped September 4, 2026.

Why did GitHub restrict stargazer data?

Earlier in 2026 GitHub limited stargazer listing endpoints to admins and collaborators to protect user privacy from scraping. The new star history endpoint restores growth tracking as aggregate counts only, with no individual stargazer identities attached.

Does the star history endpoint expose who starred a repo?

No. The response contains only anonymous counts — weekly totals and daily breakdowns. There is no username, no user ID, and no way to enumerate individual stargazers through this endpoint.

Related posts