← Back
Marcos66236

Marcos66236/github-stars-history

Track and visualize the stars history of any GitHub repository. Open-source growth analytics and velocity tracking.

View on GitHub ↗https://buygithub.com/blog/how-github-stars-work/?utm_source=github&utm_medium=readme&utm_campaign=github-stars-history ↗
developer-toolsgithub-analyticsgithub-apigithub-starsgithub-trendingopen-sourcerepository-analyticsstar-history
Stars
276
Forks
29
Watchers
276
Open issues
0
Contributors
2
Language
Python
License
MIT License
Default branch
main
Created Sep 16, 2026Updated Sep 18, 2026

Star growth

Today—
This week—
This month—

Star history will appear here once this repo has been tracked for a couple of days.

README

GitHub Stars History — star growth analytics for any repository

buygithub.com services

buygithub.com · How We Deliver Stars · Blog

GitHub stars Forks Release MIT license Python 3.8+ Uses the GitHub star history API No API key required

Track the star history of any public GitHub repository.
Daily and weekly growth, peak detection, multi-repo comparison, CSV and JSON export.

buygithub.com · How GitHub Stars Work


Why star history matters

GitHub uses star velocity as a core signal for its Trending page, Explore feed, and search ranking. A repository gaining 200 stars in 24 hours is more likely to surface than one with 10,000 total stars and flat recent growth.

This tool gives you that data: how many stars a repository gained each day, across its entire life. Compare your project against competitors, measure a launch, verify whether a star spike was earned or delivered, or track your own growth week by week.

What changed in 2026

Until June 2026, tools like this one read the stargazers listing endpoint to reconstruct per-star timestamps. GitHub then restricted stargazer and watcher lists to repository admins and collaborators to protect user privacy — breaking most star-history tools in the ecosystem.

In September 2026, GitHub shipped the fix: a privacy-safe star history endpoint that returns weekly and daily aggregate counts with no stargazer identities. Version 1.1.0 of this tool migrated to that endpoint. It works for any public repository again, with no ownership or special access required.

Features

Feature Description
Complete daily history Daily star counts from the repository's first star to today
Growth windows 7-day, 30-day, 365-day and all-time rates
Peak detection The single best day and its exact count
Multi-repo comparison Pass any number of repositories and compare their curves
Velocity report 30-day view with terminal bar chart (examples/velocity_report.py)
CSV + JSON export Machine-readable daily series for charting or analysis
Rate-limit aware Header-based backoff — no wasted probe requests
No API key needed Public data for public repositories; a token only raises rate limits

Quick start

git clone https://github.com/Marcos66236/github-stars-history.git
cd github-stars-history
pip install -r requirements.txt
python star_history.py sindresorhus/np

Or install it as a command-line tool:

pip install git+https://github.com/Marcos66236/github-stars-history.git
star-history owner/repo

No token, no signup, no configuration. Works with Python 3.8+.

Usage

Single repository

python star_history.py sindresorhus/np
Fetching star history for sindresorhus/np...
  Fetched 2,227 stars so far (page 10)...
  Total: 7,712 stars (20 week pages)

Repository: sindresorhus/np
Total stars: 7,712
Created: 2015-08-16
Age: 11 years, 1 month

Growth summary:
  Last 30 days:   +5 stars (0.2/day)
  Last 365 days:  +117 stars (0.3/day)
  All time:       +7,712 stars (1.9/day)

Peak day: 2016-07-07 (+373 stars)

Compare multiple repositories

python star_history.py facebook/react vuejs/vue sveltejs/svelte

Velocity report

python examples/velocity_report.py sindresorhus/np

Shows the last 30 days of star gains as a terminal bar chart.

Export formats

python star_history.py owner/repo --format csv    # daily series (default)
python star_history.py owner/repo --format json   # history + full analysis
python star_history.py owner/repo --summary       # print only, no files

CSV output is one row per day: date,stars. JSON output adds the full analysis block and metadata.

GitHub token (optional)

Without a token you get 60 requests/hour; with a token, 5,000. Large repositories need a handful of requests per decade of history, so most users never hit the limit.

export GITHUB_TOKEN=ghp_your_token_here
python star_history.py torvalds/linux

Generate one at github.com/settings/tokens — no special scopes are required for public repositories.

How it works

GET /repos/{owner}/{repo}/stargazers/history

The endpoint returns weeks of aggregate daily counts, newest first, paginated backwards to the repository's creation week. The tool reconstructs a single daily series, computes growth windows, and stores nothing.

[
  { "week": 1789257600, "total": 126, "days": [0, 0, 0, 0, 104, 22, 0] },
  ...
]

Two deliberate design decisions:

  • Daily aggregates, not identities. GitHub no longer exposes who starred a repository to third parties — and this tool never needed that to measure growth. Counts are enough for velocity, peaks and comparisons.
  • Header-based rate limiting. Remaining quota is read from every API response instead of probed with extra requests, so a long history costs exactly as many requests as it has pages.

FAQ

Does this work for any repository? Yes — any public repository, whether you own it or not. Private repositories require a token with access.

Why does the output show daily counts instead of usernames? GitHub restricted stargazer identities to repository admins in June 2026. The public star history endpoint returns aggregate counts only, which is what growth analysis actually uses.

How far back does the history go? To the repository's creation week. The tool paginates through every week automatically.

Can I see who starred a repository? Not through this tool. If it is your repository, GitHub's UI and API still give you full stargazer access. For anyone else's, that data is no longer public.

How do I detect a suspicious star spike? Plot the daily series and look for vertical jumps with no external explanation — a launch, a release, a viral post. Our companion guide covers the checks: How to tell if GitHub stars are real.

Do I need Python? For this CLI, yes. The raw endpoint is plain HTTP and works from any language — see How it works above.

Project structure

github-stars-history/
├── star_history.py            Main tool (fetch, analyze, export)
├── setup.py                   Package configuration
├── requirements.txt           Dependencies (requests only)
├── examples/
│   ├── compare_frameworks.py  Compare frontend frameworks
│   └── velocity_report.py     30-day velocity chart
├── tests/
│   └── test_star_history.py   Unit tests
├── sample-output.json         Example JSON export
├── CHANGELOG.md               Version history
├── CONTRIBUTING.md            Contribution guidelines
└── LICENSE                    MIT

Running tests

python -m pytest tests/
# or
python -m unittest tests/test_star_history.py

Requirements

  • Python 3.8+
  • requests

Related tools

  • github-ranking-audit — scores a repository's GitHub search ranking signals
  • github-launch-checklist — the ten checks a repository should pass before launch

Contributing

See CONTRIBUTING.md. Issues and pull requests are welcome.

License

MIT. See LICENSE.


Related resources from buygithub.com

GitHub Stars Service · GitHub Followers · Search Ranking · Aged Accounts · Blog