GET/users/{username}/repos

List repositories for a user

Lists public repositories for the specified user.

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

6 parameters
usernamestringrequired
The handle for the GitHub user account.
typestringoptional
Limit results to repositories of the specified type.
Allowed:allownermemberDefault:owner
sortstringoptional
The property to sort the results by.
Allowed:createdupdatedpushedfull_nameDefault:full_name
directionstringoptional
The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`.
Allowed:ascdesc
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

1 status code
200Response
idintegerrequired
node_idstringrequired
namestringrequired
full_namestringrequired
ownerobjectrequired
A GitHub user.
privatebooleanrequired
html_urlstringrequired
descriptionstringrequired
forkbooleanrequired
urlstringrequired
archive_urlstringrequired
assignees_urlstringrequired
blobs_urlstringrequired
branches_urlstringrequired
collaborators_urlstringrequired
comments_urlstringrequired
commits_urlstringrequired
compare_urlstringrequired
contents_urlstringrequired
contributors_urlstringrequired
deployments_urlstringrequired
downloads_urlstringrequired
events_urlstringrequired
forks_urlstringrequired
git_commits_urlstringrequired
git_refs_urlstringrequired
git_tags_urlstringrequired
git_urlstringoptional
issue_comment_urlstringrequired
issue_events_urlstringrequired
issues_urlstringrequired
keys_urlstringrequired
labels_urlstringrequired
languages_urlstringrequired
merges_urlstringrequired
milestones_urlstringrequired
notifications_urlstringrequired
pulls_urlstringrequired
releases_urlstringrequired
ssh_urlstringoptional
stargazers_urlstringrequired
statuses_urlstringrequired
subscribers_urlstringrequired
subscription_urlstringrequired
tags_urlstringrequired
teams_urlstringrequired
trees_urlstringrequired
clone_urlstringoptional
mirror_urlstringoptional
hooks_urlstringrequired
svn_urlstringoptional
homepagestringoptional
languagestringoptional
forks_countintegeroptional
stargazers_countintegeroptional
watchers_countintegeroptional
sizeintegeroptional
The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0.
default_branchstringoptional
open_issues_countintegeroptional
is_templatebooleanoptional
topicsarray<string>optional
has_issuesbooleanoptional
has_projectsbooleanoptional
has_wikibooleanoptional
has_pagesbooleanoptional
has_downloadsbooleanoptional
has_discussionsbooleanoptional
has_pull_requestsbooleanoptional
pull_request_creation_policystringoptional
The policy controlling who can create pull requests: all or collaborators_only.
Allowed:allcollaborators_only
archivedbooleanoptional
disabledbooleanoptional
visibilitystringoptional
pushed_atstringoptional
created_atstringoptional
updated_atstringoptional
permissionsobjectoptional
role_namestringoptional
temp_clone_tokenstringoptional
delete_branch_on_mergebooleanoptional
subscribers_countintegeroptional
network_countintegeroptional
code_of_conductobjectoptional
Code Of Conduct
licenseobjectoptional
forksintegeroptional
open_issuesintegeroptional
watchersintegeroptional
allow_forkingbooleanoptional
web_commit_signoff_requiredbooleanoptional
security_and_analysisobjectoptional
custom_propertiesobjectoptional
The custom properties that were defined for the repository. The keys are the custom property names, and the values are the corresponding custom property values.

Was this helpful?