---
title: "GitHub Repository API"
method: GET
path: "/v1/github/repository"
tags: ["GitHub"]
---

# GitHub Repository API

`GET /v1/github/repository`

## Request

- Base URL: `https://api.captapi.com`
- URL: `https://api.captapi.com/v1/github/repository`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

GitHub repo — stars, real watchers (subscribers), openIssuesAndPrs, license, parent when fork (1 credit).

Pass a repository URL or owner/name and get GitHub REST /repos/{owner}/{repo} as camelCase JSON: description, stars, forks, watchers (subscribers_count — people notified of activity; not the legacy watchers_count star alias), openIssuesAndPrs (GitHub's open_issues_count = open issues + open PRs), primary programming language, homepage / license / licenseName (always present; SPDX NOASSERTION → license null with licenseName kept), topics, parent when isFork, size, visibility, hasIssues/hasDiscussions, ownerType (User|Organization), and timestamps. This card is a superset of each github/repositories row (list omits watchers and parent). Flat 1 credit. For the curated trending page (stars gained today/this week/month), use github/trending-repositories.

Docs: https://captapi.com/apis/github-repository

## Query parameters

- `repo` string, required
- `cache` boolean

## Response `200`

Success. The data object for this endpoint.

- object
  - `success` unknown, required
  - `data` object, required
    - `platform` string: Always "github" on this endpoint.
    - `type` string: Always "repository" on each repo object.
    - `name` string: Name of the item or account. On profile endpoints: deprecated alias of displayName (one release).
    - `fullName` string: Full display name.
    - `url` string: Canonical URL of the item.
    - `description` string: Description text.
    - `owner` string: Owner of the repository.
    - `ownerUrl` string: Owner url URL.
    - `ownerType` string: Owner account kind: "User" or "Organization".
    - `ownerAvatar` string: Owner avatar URL.
    - `language` string: Primary programming language (e.g. "C", "Python") — not a spoken-language code.
    - `stars` integer: stargazers_count — total stars.
    - `forks` integer: Fork count.
    - `watchers` integer: subscribers_count — people watching for notifications. Omitted on list payloads that lack the field. Never GitHub's legacy watchers_count (that equals stars).
    - `openIssuesAndPrs` integer: GitHub open_issues_count — open issues plus open pull requests. Use github/pull-requests for PRs alone.
    - `defaultBranch` string: Default branch name.
    - `licenseName` string: Human-readable license label from GitHub (e.g. Other, MIT License). Always present — null when GitHub sent no license object.
    - `isFork` boolean: Whether the repository is a fork.
    - `isArchived` boolean: Whether the repository is archived.
    - `size` integer: Repository size in kilobytes (GitHub's size field).
    - `visibility` string: Repository visibility (usually "public" on this surface).
    - `hasIssues` boolean: Whether the issues feature is enabled on the repo.
    - `hasDiscussions` boolean: Whether GitHub Discussions is enabled.
    - `pushedAt` string: Last push date (ISO 8601).
    - `createdAt` string: Creation date (ISO 8601).
    - `updatedAt` string: Last update date (ISO 8601).

## Other responses

- `400`: Bad request: wrong platform URL, unknown endpoint, or an invalid parameter value. Not billed.
- `401`: Missing, invalid or revoked API key. Not billed.
- `402`: Not enough credits for this request. Not billed.
- `404`: The resource does not exist or is not public. Not billed.
- `422`: A required parameter is missing or has the wrong type. Not billed.
- `429`: Rate limit reached. Wait for Retry-After seconds. Not billed.
- `502`: The platform could not be reached or returned nothing usable. Retryable, not billed. 503 and 504 use the same envelope.

---

[API](https://skmtc.dev/captapi/apis/captapi-api.md) · [All operations](https://skmtc.dev/captapi/apis/captapi-api/llms.txt) · [OpenAPI document](https://skmtc.dev/captapi/apis/captapi-api/revisions/c9b9ac5ff1bd?raw)
