List repositories for a GitHub user or organization.
Endpoint
/v1/github/profiles/{handle}/repositories
Path
GitHub username whose public repositories should be listed.
Query
Pagination cursor returned by a previous response.
Repository type filter. `owner`: repos owned by the user. `all`: owned repos plus repos from organizations the user belongs to. `member`: only repos the user belongs to via organization membership (not owned by the user). Default: `owner`.
Sort field for repositories.
Sort direction.
const response = await fetch( "https://api.socialfetch.dev/v1/github/profiles/torvalds/repositories", { headers: { "x-api-key": "YOUR_API_KEY" } } ); const data = await response.json(); console.log(data);