# Get GitHub Repository API

> Fetch metadata (stars, forks, topics, license, dates) for a public GitHub repository via the REST API.

Category: [Developer Tools APIs](https://upapi.io/apis/developer-tools) · Last updated 2026-11-07

## How to call it

- Endpoint: `POST https://api.upapi.io/github-repo.get`, key in the `X-Api-Key` header, JSON body.
- Cost: 1 weighted unit per call.
- Timeout: 15 seconds.
- Cache: identical requests are served from cache for 300 seconds, unbilled.
- Try it without writing code: https://app.upapi.io/try/github-repo.get

```bash
curl -X POST https://api.upapi.io/github-repo.get \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{ "repo": "playwright", "owner": "microsoft" }'
```

## Request parameters

- `repo` (string, required) — Repo name
- `owner` (string, required) — Repo owner (user or org)

## Response fields

- `forks` (integer, required)
- `stars` (integer, required)
- `isFork` (boolean, required)
- `topics` (array, required)
- `htmlUrl` (string, required)
- `license` (string, required)
- `fullName` (string, required)
- `homepage` (string, required)
- `language` (string, required)
- `pushedAt` (string, required)
- `watchers` (integer, required)
- `createdAt` (string, required)
- `fetchedAt` (string, required)
- `updatedAt` (string, required)
- `isArchived` (boolean, required)
- `isTemplate` (boolean, required)
- `openIssues` (integer, required)
- `description` (string, required)
- `defaultBranch` (string, required)

## Example request and response

The example response is generated from the published output schema: it shows the shape and field names, not values from a recorded call.

```json
{
  "repo": "playwright",
  "owner": "microsoft"
}
```

```json
{
  "forks": 1,
  "stars": 1,
  "isFork": false,
  "topics": [
    "example"
  ],
  "htmlUrl": "example",
  "license": "example",
  "fullName": "example",
  "homepage": "example",
  "language": "en",
  "pushedAt": "example",
  "watchers": 1,
  "createdAt": "example",
  "fetchedAt": "example",
  "updatedAt": "example",
  "isArchived": false,
  "isTemplate": false,
  "openIssues": 1,
  "description": "example",
  "defaultBranch": "example"
}
```

## Frequently asked questions

### How much does the Get GitHub Repository API cost per call?

Each call spends 1 weighted unit of your plan's monthly quota. Full pricing is at https://upapi.io/pricing.

### How do I authenticate to the Get GitHub Repository API?

Send your key in the X-Api-Key header. A free guest key is available without creating an account.

### Are Get GitHub Repository API responses cached?

Yes — identical requests are served from cache for 300 seconds, and a cache hit is not billed.

## More Developer Tools APIs

- [List GitHub Repository Contributors](https://upapi.io/apis/developer-tools/github-repo-contributors)
- [List GitHub Repository Issues](https://upapi.io/apis/developer-tools/github-repo-issues)
- [Star or Unstar a GitHub Repository](https://upapi.io/apis/developer-tools/github-repo-star)
- [Get GitHub User](https://upapi.io/apis/developer-tools/github-user)
- [Get GitHub User Commit Emails](https://upapi.io/apis/developer-tools/github-user-emails)
- [Get GitHub Trending Repositories](https://upapi.io/apis/developer-tools/github-trending)
- [List GitHub Issue Comments](https://upapi.io/apis/developer-tools/github-issue-comments)
- [Post a GitHub Issue Comment](https://upapi.io/apis/developer-tools/github-issue-comment)
