---
title: "GitHub API: User Repositories | Perceptlayer"
description: "User Repositories from GitHub as JSON. 1 credit per successful call."
url: https://perceptlayer.com/apis/github/user-repositories
---

[APIs](https://perceptlayer.com/apis) / [GitHub](https://perceptlayer.com/apis/github) / User Repositories

# GitHub: User Repositories

User Repositories from GitHub as JSON. 1 credit per successful call.

GET `/v1/github/user-repositories`

## Parameters

Send parameters in the query string.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `username` | string | Required | Up to 39 characters |
| `page` | integer | Optional | Any |
| `per_page` | integer | Optional | Any |
| `sort` | string | Optional | created, updated, pushed, full\_name |
| `direction` | string | Optional | asc, desc |
| `type` | string | Optional | all, owner, member |

## Example request

GitHub

GET /v1/github/user-repositories?username=torvalds&per\_page=10 

```
{
  "search_parameters": {
    "engine": "github_user_repositories",
    "username": "torvalds",
    "per_page": 10
  },
  "repositories": [
    {
      "id": 940929652,
      "node_id": "R_kgDOOBVydA",
      "name": "1590A",
      "full_name": "torvalds/1590A",
      "private": false,
      "owner": {
        "login": "torvalds",
        "id": 1024025,
        "node_id": "MDQ6VXNlcjEwMjQwMjU=",
        "avatar_url": "https://avatars.githubusercontent.com/u/1024025?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/torvalds",
        "html_url": "https://github.com/torvalds",
        "followers_url": "https://api.github.com/users/torvalds/followers",
        "following_url": "https://api.github.com/users/torvalds/following{/other_user}",
        "gists_url": "https://api.github.com/users/torvalds/gists{/gist_id}",
        "starred_url": "https://api.github.com/users/torvalds/starred{/owner}{/repo}",
        "subscriptions_url": "https://api.github.com/users/torvalds/subscriptions",
        "organizations_url": "https://api.github.com/users/torvalds/orgs",
        "repos_url": "https://api.github.com/users/torvalds/repos",
        "events_url": "https://api.github.com/users/torvalds/events{/privacy}",
        "received_events_url": "https://api.github.com/users/torvalds/received_events",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "html_url": "https://github.com/torvalds/1590A",
      "description": "Random odd guitar pedal design in kicad",
      "fork": false,
      "url": "https://api.github.com/repos/torvalds/1590A",
      "forks_url": "https://api.github.com/repos/torvalds/1590A/forks",
      "keys_url": "https://api.github.com/repos/torvalds/1590A/keys{/key_id}",
      "collaborators_url": "https://api.github.com/repos/torvalds/1590A/collaborators{/collaborator}",
      "teams_url": "https://api.github.com/repos/torvalds/1590A/teams",
      "hooks_url": "https://api.github.com/repos/torvalds/1590A/hooks",
      "issue_events_url": "https://api.github.com/repos/torvalds/1590A/issues/events{/number}",
      "events_url": "https://api.github.com/repos/torvalds/1590A/events",
      "assignees_url": "https://api.github.com/repos/torvalds/1590A/assignees{/user}",
      "branches_url": "https://api.github.com/repos/torvalds/1590A/branches{/branch}",
      "tags_url": "https://api.github.com/repos/torvalds/1590A/tags",
      "blobs_url": "https://api.github.com/repos/torvalds/1590A/git/blobs{/sha}",
      "git_tags_url": "https://api.github.com/repos/torvalds/1590A/git/tags{/sha}",
      "git_refs_url": "https://api.github.com/repos/torvalds/1590A/git/refs{/sha}",
      "trees_url": "https://api.github.com/repos/torvalds/1590A/git/trees{/sha}",
      "statuses_url": "https://api.github.com/repos/torvalds/1590A/statuses/{sha}",
      "languages_url": "https://api.github.com/repos/torvalds/1590A/languages",
      "stargazers_url": "https://api.github.com/repos/torvalds/1590A/stargazers",
      "contributors_url": "https://api.github.com/repos/torvalds/1590A/contributors",
      "subscribers_url": "https://api.github.com/repos/torvalds/1590A/subscribers",
      "subscription_url": "https://api.github.com/repos/torvalds/1590A/subscription",
      "commits_url": "https://api.github.com/repos/torvalds/1590A/commits{/sha}",
      "git_commits_url": "https://api.github.com/repos/torvalds/1590A/git/commits{/sha}",
      "comments_url": "https://api.github.com/repos/torvalds/1590A/comments{/number}",
      "issue_comment_url": "https://api.github.com/repos/torvalds/1590A/issues/comments{/number}",
      "contents_url": "https://api.github.com/repos/torvalds/1590A/contents/{+path}",
      "compare_url": "https://api.github.com/repos/torvalds/1590A/compare/{base}...{head}",
      "merges_url": "https://api.github.com/repos/torvalds/1590A/merges",
      "archive_url": "https://api.github.com/repos/torvalds/1590A/{archive_format}{/ref}",
      "downloads_url": "https://api.github.com/repos/torvalds/1590A/downloads",
      "issues_url": "https://api.github.com/repos/torvalds/1590A/issues{/number}",
      "pulls_url": "https://api.github.com/repos/torvalds/1590A/pulls{/number}",
      "milestones_url": "https://api.github.com/repos/torvalds/1590A/milestones{/number}",
      "notifications_url": "https://api.github.com/repos/torvalds/1590A/notifications{?since,all,participating}",
      "labels_url": "https://api.github.com/repos/torvalds/1590A/labels{/name}",
      "releases_url": "https://api.github.com/repos/torvalds/1590A/releases{/id}",
      "deployments_url": "https://api.github.com/repos/torvalds/1590A/deployments",
      "created_at": "2025-03-01T04:36:29Z",
      "updated_at": "2026-11-05T21:42:22Z",
      "pushed_at": "2025-09-19T02:54:14Z",
      "git_url": "git://github.com/torvalds/1590A.git",
      "ssh_url": "git@github.com:torvalds/1590A.git",
      "clone_url": "https://github.com/torvalds/1590A.git",
      "svn_url": "https://github.com/torvalds/1590A",
      "size": 10882,
      "stargazers_count": 583,
      "watchers_count": 583,
      "language": "OpenSCAD",
      "has_issues": true,
      "has_projects": true,
      "has_downloads": false,
      "has_wiki": true,
      "has_pages": false,
      "has_discussions": false,
      "forks_count": 22,
      "archived": true,
      "disabled": false,
      "open_issues_count": 0,
      "license": {
        "key": "gpl-2.0",
        "name": "GNU General Public License v2.0",
        "spdx_id": "GPL-2.0",
        "url": "https://api.github.com/licenses/gpl-2.0",
        "node_id": "MDc6TGljZW5zZTg="
      },
      "allow_forking": true,
      "is_template": false,
      "web_commit_signoff_required": true,
      "has_pull_requests": true,
      "pull_request_creation_policy": "all",
      "visibility": "public",
      "forks": 22,
      "open_issues": 0,
      "watchers": 583,
      "default_branch": "main"
    },
    {
      "id": 1130786764,
      "node_id": "R_kgDOQ2ZvzA",
      "name": "AudioNoise",
      "full_name": "torvalds/AudioNoise",
      "private": false,
      "owner": {
        "login": "torvalds",
        "id": 1024025,
        "node_id": "MDQ6VXNlcjEwMjQwMjU=",
        "avatar_url": "https://avatars.githubusercontent.com/u/1024025?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/torvalds",
        "html_url": "https://github.com/torvalds",
        "followers_url": "https://api.github.com/users/torvalds/followers",
        "following_url": "https://api.github.com/users/torvalds/following{/other_user}",
        "gists_url": "https://api.github.com/users/torvalds/gists{/gist_id}",
        "starred_url": "https://api.github.com/users/torvalds/starred{/owner}{/repo}",
        "subscriptions_url": "https://api.github.com/users/torvalds/subscriptions",
        "organizations_url": "https://api.github.com/users/torvalds/orgs",
        "repos_url": "https://api.github.com/users/torvalds/repos",
        "events_url": "https://api.github.com/users/torvalds/events{/privacy}",
        "received_events_url": "https://api.github.com/users/torvalds/received_events",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "html_url": "https://github.com/torvalds/AudioNoise",
      "description": "Random digital audio effects",
      "fork": false,
      "url": "https://api.github.com/repos/torvalds/AudioNoise",
      "forks_url": "https://api.github.com/repos/torvalds/AudioNoise/forks",
      "keys_url": "https://api.github.com/repos/torvalds/AudioNoise/keys{/key_id}",
      "collaborators_url": "https://api.github.com/repos/torvalds/AudioNoise/collaborators{/collaborator}",
      "teams_url": "https://api.github.com/repos/torvalds/AudioNoise/teams",
      "hooks_url": "https://api.github.com/repos/torvalds/AudioNoise/hooks",
      "issue_events_url": "https://api.github.com/repos/torvalds/AudioNoise/issues/events{/number}",
      "events_url": "https://api.github.com/repos/torvalds/AudioNoise/events",
      "assignees_url": "https://api.github.com/repos/torvalds/AudioNoise/assignees{/user}",
      "branches_url": "https://api.github.com/repos/torvalds/AudioNoise/branches{/branch}",
      "tags_url": "https://api.github.com/repos/torvalds/AudioNoise/tags",
      "blobs_url": "https://api.github.com/repos/torvalds/AudioNoise/git/blobs{/sha}",
      "git_tags_url": "https://api.github.com/repos/torvalds/AudioNoise/git/tags{/sha}",
      "git_refs_url": "https://api.github.com/repos/torvalds/AudioNoise/git/refs{/sha}",
      "trees_url": "https://api.github.com/repos/torvalds/AudioNoise/git/trees{/sha}",
      "statuses_url": "https://api.github.com/repos/torvalds/AudioNoise/statuses/{sha}",
      "languages_url": "https://api.github.com/repos/torvalds/AudioNoise/languages",
      "stargazers_url": "https://api.github.com/repos/torvalds/AudioNoise/stargazers",
      "contributors_url": "https://api.github.com/repos/torvalds/AudioNoise/contributors",
      "subscribers_url": "https://api.github.com/repos/torvalds/AudioNoise/subscribers",
      "subscription_url": "https://api.github.com/repos/torvalds/AudioNoise/subscription",
      "commits_url": "https://api.github.com/repos/torvalds/AudioNoise/commits{/sha}",
      "git_commits_url": "https://api.github.com/repos/torvalds/AudioNoise/git/commits{/sha}",
      "comments_url": "https://api.github.com/repos/torvalds/AudioNoise/comments{/number}",
      "issue_comment_url": "https://api.github.com/repos/torvalds/AudioNoise/issues/comments{/number}",
      "contents_url": "https://api.github.com/repos/torvalds/AudioNoise/contents/{+path}",
      "compare_url": "https://api.github.com/repos/torvalds/AudioNoise/compare/{base}...{head}",
      "merges_url": "https://api.github.com/repos/torvalds/AudioNoise/merges",
      "archive_url": "https://api.github.com/repos/torvalds/AudioNoise/{archive_format}{/ref}",
      "downloads_url": "https://api.github.com/repos/torvalds/AudioNoise/downloads",
      "issues_url": "https://api.github.com/repos/torvalds/AudioNoise/issues{/number}",
      "pulls_url": "https://api.github.com/repos/torvalds/AudioNoise/pulls{/number}",
      "milestones_url": "https://api.github.com/repos/torvalds/AudioNoise/milestones{/number}",
      "notifications_url": "https://api.github.com/repos/torvalds/AudioNoise/notifications{?since,all,participating}",
      "labels_url": "https://api.github.com/repos/torvalds/AudioNoise/labels{/name}",
      "releases_url": "https://api.github.com/repos/torvalds/AudioNoise/releases{/id}",
      "deployments_url": "https://api.github.com/repos/torvalds/AudioNoise/deployments",
      "created_at": "2026-01-09T02:33:29Z",
      "updated_at": "2026-11-12T08:58:07Z",
      "pushed_at": "2026-05-08T17:20:22Z",
      "git_url": "git://github.com/torvalds/AudioNoise.git",
      "ssh_url": "git@github.com:torvalds/AudioNoise.git",
      "clone_url": "https://github.com/torvalds/AudioNoise.git",
      "svn_url": "https://github.com/torvalds/AudioNoise",
      "size": 1428,
      "stargazers_count": 4532,
      "watchers_count": 4532,
      "language": "C",
      "has_issues": true,
      "has_projects": true,
      "has_downloads": false,
      "has_wiki": true,
      "has_pages": false,
      "has_discussions": false,
      "forks_count": 225,
      "archived": false,
      "disabled": false,
      "open_issues_count": 35,
      "license": {
        "key": "gpl-2.0",
        "name": "GNU General Public License v2.0",
        "spdx_id": "GPL-2.0",
        "url": "https://api.github.com/licenses/gpl-2.0",
        "node_id": "MDc6TGljZW5zZTg="
      },
      "allow_forking": true,
      "is_template": false,
      "web_commit_signoff_required": true,
      "has_pull_requests": true,
      "pull_request_creation_policy": "all",
      "visibility": "public",
      "forks": 225,
      "open_issues": 35,
      "watchers": 4532,
      "default_branch": "main"
    }
  ],
  "result_count": 10,
  "rate_limit": {
    "limit": 60,
    "remaining": 59,
    "used": 1,
    "reset": 1794492557
  }
}
```

200 OK JSON X-Credits-Used: 1

Recorded 12 Nov 2026 and shortened.

[Run this endpoint in the playground](https://perceptlayer.com/apis/github?try=user-repositories#playground) with your own parameters. 1 credit per successful call; failed calls are free.

## Response fields

The response has these 4 fields, read from a recorded call. The recording leaves out fields that were empty, so a live call can return more.

| Field | Type |
| --- | --- |
| `search_parameters` | object |
| `repositories` | object\[\] |
| `result_count` | integer |
| `rate_limit` | object |
