API · GitHub
GET /github/users/{handle}/repos
A GitHub user’s public repositories, sorted and paginated, with stars and languages.
| |
|---|
| Request | GET /v1/github/users/{handle}/repos |
| Operation id | github.user.repos |
| Cost | 1 credit, refunded if the call fails |
| Auth | API key: Authorization: Bearer <key> or x-api-key. |
A GitHub user’s public repositories, sorted and paginated, with stars and languages.
| Name | Type | Required | Description |
|---|
handle | string | yes | GitHub username, with or without the @, or a profile URL. Example: torvalds. |
| Name | Type | Required | Description |
|---|
type | "all" | "owner" | "member" | no | owner (default), member or all. One of all, owner, member. |
sort | "created" | "updated" | "pushed" | "full_name" | no | full_name (default), created, updated or pushed. One of created, updated, pushed, full_name. |
direction | "asc" | "desc" | no | asc for full_name, desc otherwise, by default. One of asc, desc. |
since | string | no | Only items on or after this date (YYYY-MM-DD or ISO 8601). |
until | string | no | Only items on or before this date (that whole UTC day for YYYY-MM-DD). |
per_page | integer | no | Items per page, 1-100 (default 30). |
page | integer | no | 1-indexed page number (default 1). |
after | string | no | Cursor: the previous page’s next_cursor (instead of page). |
| Status | Meaning | Schema |
|---|
200 | A page of repositories. | GitHubReposResponse |
400 | Invalid input. Nothing was charged. | Error |
401 | Missing or invalid API key. | Error |
402 | Not enough credits, a spend cap was reached, or payment is required. | Error |
403 | The target is private, or the account is suspended. | Error |
404 | No public GitHub user, repository or issue by that name. | Error |
429 | Too many requests. Wait for Retry-After seconds. | Error |
503 | GitHub is temporarily unavailable. Retryable; nothing was charged. | Error |
| Field | Type | Description |
|---|
items | GitHubRepo[] | |
page | integer | 1-indexed page this is. |
per_page | integer | |
has_more | boolean | |
next_cursor | string | null | Pass as after for the next page; null at the end. |
Errors use one shape everywhere; see Errors for every code and what to do.