GitHub hub

GitHub Repository API

Resolve a public GitHub repository URL to structured JSON — full name, owner, stars, forks, language, license, topics, and timestamps — without standing up your own GitHub token stack for enrichment jobs.

GET /v1/github/repositories

1 credit per successful request.

About this endpoint

Open-source trackers, recruiting enrichment, and competitive research often start from a concrete `owner/repo` link, not a username feed. You already have `https://github.com/torvalds/linux` (or the equivalent from a README, a blog post, or a CRM note). You want stars, forks, primary language, license, topics, default branch, and last-push time in one typed payload so you can score the project or attach it to a company record.

`GET /v1/github/repositories` takes one `url` query param: a full public GitHub repository URL. Branch on `data.lookupStatus` before you write — `found` vs `not_found`. When found, `data.repository` holds identity (`platformRepoId`, `name`, `fullName`, `owner`, `profileUrl`, `description`, fork/private flags), engagement counts (`starsCount`, `forksCount`, `watchersCount`, `openIssuesCount`), language and size, license and topics, visibility/archive flags, and `createdAt` / `updatedAt` / `pushedAt` when GitHub exposes them.

Use this route for one repository when you already have the `owner/repo` URL. To page through every public repository for a user or org, call `GET /v1/github/profiles/{handle}/repositories` instead. Discovery without a URL belongs on the trending routes. Pricing is 1 credit per successful request; trust `meta.creditsCharged` on the response.

GitHub Repository API FAQ

How do I fetch a GitHub repository via API?

Call `GET /v1/github/repositories` with your Social Fetch API key (`x-api-key`) and a repository `url` query param (for example `https://github.com/torvalds/linux`). Read `data.lookupStatus` and `data.repository` in the JSON response. Full parameters are in the API docs.

How much does the GitHub Repository API 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.

What URL format does the GitHub repository endpoint accept?

Pass a full public GitHub repository URL in `owner/repo` form (for example `https://github.com/facebook/react`). This route is for one repository by URL, not a bare username.

What fields does the GitHub repository response include?

When `lookupStatus` is `found`, you get repository identity (id, name, fullName, owner, profile URL, description, fork/private flags), metrics (stars, forks, watchers, open issues, size), primary language, default branch, topics, license, visibility/archive flags, and created/updated/pushed timestamps when available.

GitHub repository lookup vs profile repositories list vs trending?

Use `GET /v1/github/repositories` when you have one `owner/repo` URL. Use `GET /v1/github/profiles/{handle}/repositories` to list public repositories for a user or org with cursor pagination. Use `GET /v1/github/trending/repositories` when you want discovery by language and time window without a specific URL.

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.

Are private repositories supported?

No. Only publicly visible repository data. Private or inaccessible targets resolve as `not_found` (or fail validation for a bad URL). Keep `meta.requestId` if you need to retry or escalate that row.