Package statistics API
Public, read-only endpoints used by this portfolio. No account, token, or agent registration is required.
Requests depend on GitHub, npm, and Cloudflare availability and rate limits. These are convenience endpoints, with no availability guarantee. Validate upstream responses before using their values.
Fetch a GitHub repository
GET /api/package/{id}/repoExample: /api/package/sampotts%2Fplyr/repo
Fetch repository metadata, including its star count (legacy alias of repo)
GET /api/package/{id}/starsExample: /api/package/sampotts%2Fplyr/stars
Fetch the cumulative npm download count since January 2015
GET /api/package/{id}/downloadsExample: /api/package/plyr/downloads
Fetch recent CDN requests per second for plyr or rangetouch
GET /api/package/{id}/trafficExample: /api/package/plyr/traffic
Encode the entire id as one URL path segment, including slashes in repository and scoped package names. The repo and stars endpoints return GitHub repository JSON; downloads and traffic return numbers.
Application liveness checks this application only, without querying upstream services.