Skip to main content

We've recently moved some of the REST API documentation. If you can't find what you're looking for, you might try the new Branches, Collaborators, Commits, Deploy Keys, Deployments, GitHub Pages, Releases, Metrics, Webhooks REST API pages.

Repository traffic

The Repository traffic API provides access to the information provided in your repository graph.

About the Repository traffic API

For repositories that you have push access to, the Repository traffic API provides access to the information provided in your repository graph. For more information, see "Viewing traffic to a repository."

Get repository clones

Works with GitHub Apps

Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday.

Parameters

Headers
Name, Type, Description
acceptstring

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
ownerstringRequired

The account owner of the repository. The name is not case sensitive.

repostringRequired

The name of the repository. The name is not case sensitive.

Query parameters
Name, Type, Description
perstring

The time frame to display results for.

Default: day

Can be one of: , day, week

HTTP response status codes

<
Status codeDescription
200