GitHub traffic API reference: endpoints, fields and limits
A compact reference for GitHub's repository traffic endpoints: what each returns, who can call it and what the limits are.
Key takeaways
- Four endpoints: views, clones, popular referrers and popular paths.
- All cover the last 14 days; referrers and paths return only the top 10.
- Uniques are deduplicated within the window only and must not be summed across days.
Endpoints
| Endpoint | Returns | Window |
|---|---|---|
/repos/{owner}/{repo}/traffic/views | count, uniques and a list of daily {timestamp, count, uniques} | 14 days |
/repos/{owner}/{repo}/traffic/clones | count, uniques and a list of daily {timestamp, count, uniques} | 14 days |
/repos/{owner}/{repo}/traffic/popular/referrers | list of {referrer, count, uniques} | 14 days, top 10 |
/repos/{owner}/{repo}/traffic/popular/paths | list of {path, title, count, uniques} | 14 days, top 10 |
The views and clones endpoints accept a per parameter to choose daily or weekly buckets. Always read the official GitHub documentation for the current contract.
Access
You need push access to the repository. Send a token in the Authorization: Bearer header and request application/vnd.github+json. Private repositories require a token that can read them; this dashboard never collects private repositories.
Interpreting the numbers
- uniques are deduplicated only inside the returned window, so do not add them across days.
- clones include CI systems, mirrors and crawlers.
- Recent days can still change for 24-48 hours.
- Referrers and paths are a top-10 snapshot, not a complete log.
Limits
Requests count against GitHub's REST rate limit, described in the rate limit documentation. Responses include x-ratelimit-remaining and x-ratelimit-reset; stop when the remaining budget is low. Because a call returns 14 days, fetching a quiet repository every few days loses nothing.