Social

Query GitHub Repository

0calls
2 credits / call

Need to fetch the core metadata of a GitHub repository quickly? This endpoint returns the repository's key data in a single call — ideal for project listings, statistics, and analytics use cases.

GET
uapis.cn
/api/v1/github/repo
Query parameters
1
repo
string
required

Target repository identifier in owner/repo form.

Data returned

In a single request you receive:

  • Core metrics: star, fork, open_issues, and other key counters.
  • Project details: description, homepage, language breakdown, topic tags, license.
  • Participants: collaborator list (collaborators) and inferred maintainer list (maintainers), including their public email when the user has chosen to expose it.
Note

Thecollaborators field may be empty when access is restricted. maintainers is inferred and intended for reference only.

Query parameters

repo
stringrequired

Target repository identifier in owner/repo form.

Response

200 / OK

Success. Returns the repository's information.

JSON
{
  // Full repository name.
  "full_name": "torvalds/linux",
  // Repository description.
  "description": "Linux kernel source tree",
  // Repository homepage URL.
  "homepage": "https://www.kernel.org",
  // Default branch name.
  "default_branch": "master",
  // Primary branch name (typically matching the default branch).
  "primary_branch": "master",
  // SHA hash of the latest commit on the default branch.
  "default_branch_sha": "abc123...",
  // Repository visibility, typically `public` or `private`.
  "visibility": "public",
  // Whether the repository is archived.
  "archived": false,
  // Whether the repository is disabled.
  "disabled": false,
  // Whether the repository is a fork.
  "fork": false,
  // Primary language.
  "language": "C",
  // Topic tags list.
  "topics": [
    "string"
  ],
  // Open-source license name.
  "license": "GPL-2.0",
  // Star count.
  "stargazers": 170000,
  // Fork count.
  "forks": 85000,
  // Open issue count.
  "open_issues": 500,
  // Watchers / subscribers count.
  "watchers": 3000,
  // Last push time (ISO 8601).
  "pushed_at": "2025-09-24T12:34:56Z",
  // Creation time (ISO 8601).
  "created_at": "2011-07-04T22:42:00Z",
  // Last update time (ISO 8601).
  "updated_at": "2025-09-24T12:34:56Z",
  // Language statistics. Keys are language names; values are code-byte counts.
  "languages": {
    "C": 123456789,
    "Assembly": 2345678
  },
  // Pinned reply in the comment area. May be `null` when not present.
  "collaborators": [
    {
      "login": "octocat",
      "name": "The Octocat",
      "email": "public@example.com",
      "url": "https://github.com/octocat"
    }
  ],
  // Inferred maintainer list (based on recent commits to the default branch).
  "maintainers": [
    {
      // GitHub login name.
      "login": "string",
      // Display name.
      "name": "string",
      // Public email.
      "email": "string",
      // GitHub profile URL.
      "url": "string"
    }
  ],
  // Latest release information for the repository. `null` when no releases exist. Useful for app-update checks.
  "latest_release": {
    "tag_name": "v1.2.3",
    "name": "Release v1.2.3",
    "published_at": "2026-01-10T12:00:00Z",
    "html_url": "https://github.com/owner/repo/releases/tag/v1.2.3",
    "prerelease": false,
    "draft": false
  }
}

400 / Bad Request

Missing or malformed request parameters. Ensure repo is supplied in owner/repo form.

JSON
{
  "code": "INVALID_ARGUMENT",
  "message": "Missing or invalid 'repo' parameter."
}

502 / Bad Gateway

Temporarily unable to fetch the repository. Please try again later.

JSON
{
  "code": "UPSTREAM_ERROR",
  "message": "Unable to fetch repository data. Please try again later."
}