GitHub hub

GitHub profile repositories API

Page through public repositories for a GitHub login — full names, stars, forks, language, license, and timestamps — with cursor pagination in the shared Social Fetch envelope.

GET /v1/github/profiles/{handle}/repositories

1 credit per successful request.

About this endpoint

Recruiting enrichment, open-source scouts, and competitive research often need every public repo under a login, not one `owner/repo` URL. You have a username or org, you want the list with stars, forks, language, and last push, and you need to keep paging when the first response is not the whole catalog. Standing up your own GitHub token stack for that job means rate limits, OAuth apps, and code you did not want to own for a public read.

`GET /v1/github/profiles/{handle}/repositories` is the list route. Pass the GitHub login in the path and send `x-api-key`. Optional query params: `type` (`owner`, `all`, or `member`; defaults to `owner`), `sort` (`created`, `updated`, `pushed`, or `full_name`), `direction` (`asc` or `desc`), and `cursor` from a previous page. Branch on `data.lookupStatus` before you write. On `found`, `data.repositories` is the page (it can be empty), and `data.page` has `nextCursor` and `hasMore`. Each item uses the shared repository shape: identity (`platformRepoId`, `name`, `fullName`, `owner`, `profileUrl`, description, fork/private flags), engagement counts, language, size, license, topics, visibility/archive flags, and `createdAt` / `updatedAt` / `pushedAt` when GitHub exposes them.

Use this route to inventory a user or org. For one repository when you already have the URL, call `GET /v1/github/repositories`. For discovery without a login, use the trending repositories route. Pricing is 1 credit per successful request; trust `meta.creditsCharged` on the response.

GitHub profile repositories API FAQ

How do I list GitHub repositories for a profile via API?

Call `GET /v1/github/profiles/{handle}/repositories` with your Social Fetch API key (`x-api-key`) and the GitHub username (login) in the path. Read `data.lookupStatus`, then `data.repositories` and `data.page`. Full parameters are in the API docs.

How much does the GitHub profile repositories endpoint cost?

Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged — that field is the billing source of truth.

How does pagination work on GitHub profile repositories?

Each response includes `data.page.nextCursor` and `data.page.hasMore`. When `hasMore` is true, pass `nextCursor` as the `cursor` query param on the next request. The cursor is opaque — do not invent or parse it.

What query filters does the profile repositories list support?

Optional `type` filters repository membership (`owner`, `all`, or `member`; defaults to `owner`). Optional `sort` is `created`, `updated`, `pushed`, or `full_name`. Optional `direction` is `asc` or `desc`. Keep the same filters when you follow a cursor.

Profile repositories list vs single repository vs trending?

Use this route to page public repositories for a login. Use `GET /v1/github/repositories` when you already have one `owner/repo` URL. Use `GET /v1/github/trending/repositories` for language and time-window discovery without a specific handle.

What happens for missing GitHub logins?

Unknown handles resolve as `lookupStatus` `not_found` with an empty repositories array. HTTP 200 still means the request finished. Always branch on `lookupStatus` before treating the payload as a found list. Private repositories are not returned.

Do I need a GitHub personal access token?

Not for Social Fetch public routes. Authenticate with your Social Fetch API key. Prefer GitHub's official API with a GitHub token for authenticated apps, webhooks, and private repos you are authorized to read.