---
title: "GitHub Repositories API"
method: GET
path: "/v1/github/repositories"
tags: ["GitHub"]
---

# GitHub Repositories API

`GET /v1/github/repositories`

## Request

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

List a user's repos with sort/direction/type — opaque Link cursor (~0.4/repo).

List repositories from GitHub REST /users/{login}/repos. Pass sort=created|updated|pushed|full_name (default updated), direction=asc|desc, and type=owner|member|all — all echoed at the top level. Each row is the same camelCase repo card as github/repository: homepage, license, and licenseName are always present (null when unset / NOASSERTION). watchers and parent are detail-only — list payloads omit subscribers_count and parent; call github/repository for those. Opaque nextCursor from GitHub's Link header. ~0.4 credits/repo (default limit 30 → ~12). Pricing vs detail: single-repo lookup is flat 1 credit; this list is per-result for bulk. Trending is a separate HTML scrape at flat 2.

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

## Query parameters

- `username` string, required
- `sort` string
- `direction` string
- `type` string
- `limit` integer
- `cursor` string
- `cache` boolean

## Response `200`

Success. The data object for this endpoint.

- object
  - `success` unknown, required
  - `data` object, required
    - `username` string: Account username / handle.
    - `sort` string: Echo of sort=created|updated|pushed|full_name (default updated).
    - `direction` string: Echo of direction=asc|desc (default desc).
    - `type` string: Top-level: affiliation filter owner|member|all. On each repo row: always "repository".
    - `totalReturned` integer: Number of items returned in this response.
    - `nextCursor` string: Opaque Link-header cursor (not a bare page number).
    - `hasMore` boolean: Whether more results are available beyond this page. When true, pass nextCursor to fetch the next page.
    - `repositories` object[]
      - `platform` string: Platform identifier for this response (matches the endpoint's platform).
      - `type` string: Top-level: affiliation filter owner|member|all. On each repo row: always "repository".
      - `name` string: Name of this repositories item.
      - `fullName` string: Full display name.
      - `url` string: Canonical URL of the item.
      - `description` string: Description of this repositories item.
      - `owner` string: Owner of the repository.
      - `ownerUrl` string: Owner url URL.
      - `ownerType` string: Owner type. Example: "User".
      - `ownerAvatar` string: Owner avatar URL.
      - `language` string: Primary programming language (e.g. "C", "Python") — not a spoken-language code.
      - `stars` integer: Star count.
      - `forks` integer: Fork count.
      - `openIssuesAndPrs` integer: GitHub open_issues_count — open issues plus open pull requests.
      - `defaultBranch` string: Default branch name.
      - `licenseName` string: Human-readable license label from GitHub. Always present — null when GitHub sent no license object.
      - `isFork` boolean: Whether the repository is a fork.
      - `isArchived` boolean: Whether the repository is archived.
      - `pushedAt` string: Last push date (ISO 8601).
      - `createdAt` string: Creation date (ISO 8601).
      - `updatedAt` string: Last update date (ISO 8601).
      - `homepage` string

## 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)
