Sample - GitHub REST API
GET/repos/{owner}/{repo}/contributors

List repository contributors

Lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API caches contributor data to improve performance.

GitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

5 parameters
ownerstringrequired
The account owner of the repository. The name is not case sensitive.
repostringrequired
The name of the repository without the `.git` extension. The name is not case sensitive.
anonstringoptional
Set to `1` or `true` to include anonymous contributors in results.
per_pageintegeroptional
The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
Default:30
pageintegeroptional
The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
Default:1

4 status codes
200If repository contains content
loginstringoptional
idintegeroptional
node_idstringoptional
avatar_urlstringoptional
gravatar_idstringoptional
urlstringoptional
html_urlstringoptional
followers_urlstringoptional
following_urlstringoptional
gists_urlstringoptional
starred_urlstringoptional
subscriptions_urlstringoptional
organizations_urlstringoptional
repos_urlstringoptional
events_urlstringoptional
received_events_urlstringoptional
typestringrequired
site_adminbooleanoptional
contributionsintegerrequired
emailstringoptional
namestringoptional
user_view_typestringoptional
204Response if repository is empty
403Forbidden
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 403 is returned: Forbidden. A 404 is returned: Resource not found.