Get a repo's traffic clones
Read how many times a repository has been git-cloned over GitHub’s 14-day rolling window, broken down by day.
-
Call
get_repo_traffic_cloneswith the repository’s owner and name:get_repo_traffic_clones { owner: "octocat", repo: "example" } -
Read the totals off the top-level fields, and the day-by-day breakdown off
daily:{"count": 88,"uniques": 19,"daily": [{ "timestamp": "2026-06-22T00:00:00Z", "count": 6, "uniques": 3 }]}countis total clones in the window;uniquesis unique cloners.dailyhas one entry per day GitHub reported; if GitHub’s response omits theclonesarray entirely, this tool returnsdaily: []rather than failing.
If it fails
Section titled “If it fails”missing_scope: no GitHub token was resolvable. SetGITHUB_TOKENor rungh auth login.github_api_errorwith a 403: check whether it’s a genuine permission problem (you need push access to the repository to read its traffic) — a rate-limited 403 is retried automatically up to three times before this error surfaces, so if you see it, it isn’t a rate limit that will clear on its own.
See also
Section titled “See also”- reference/tools.md for the exact response schema.
- get-repo-traffic-views.md for the sibling view-traffic tool.