# GitHub Repo Stats API: Stars, Forks, Releases, Contributors

Stats for GitHub repositories: stars, forks, watchers, open issues, languages, topics, license, latest release, contributor count and last push. List repos, pull every repo of a user or org, or search GitHub. Official GitHub REST API.

Need this wired into your stack? We build it. [Get a quote →](https://pushbuild.com/services/etl-data-pipelines.html#scopeform)

$0.80 per 1,000 repositories

[Get an API key](https://pushbuild.com/apis/app/signup?api=github-repo-stats)

Example request

```
POST /github-repo-stats/run
{
  "repos": [
    "fastapi/fastapi",
    "https://github.com/pydantic/pydantic"
  ],
  "maxItems": 20
}
```

## What a response looks like

POST /github-repo-stats/run{"repos": ["fastapi/fastapi", "https://github.com/pydantic/pyd… "maxItems": 20}

```
{"count": 1, "items": [{ "contributors": 864, "description": "The Python micro framework for building web applica… "forks": 17079, "language": "Python", "latestRelease": {  "name": "",  "publishedAt": "2026-02-19T05:01:30Z",  "tag": "3.1.3" }, "license": "BSD-3-Clause", … ]}
```

| contributors | description | forks | language | license | openIssuesAndPRs |
| --- | --- | --- | --- | --- | --- |
| 864 | The Python micro framework for building web ap… | 17,079 | Python | BSD-3-Clause | 4 |

Example rows from the API documentation.

## What it returns

Bulk statistics for public GitHub repositories from the official GitHub REST API. Three ways in:

- **repos**: a list of `owner/name` or GitHub URLs
- **owners**: every public repository of a user or organization, most recently pushed first
- **search**: any GitHub repository search, e.g. `vector database language:rust stars:>500`

| field | meaning |
| --- | --- |
| `repo`, `url`, `description`, `homepage` | identity |
| `owner`, `ownerType` | user or organization |
| `stars`, `forks`, `watchers`, `openIssuesAndPRs` | counts |
| `language`, `languages` | main language and the share of code per language (%) |
| `topics`, `license` | topics and SPDX license id |
| `latestRelease` | tag, name and publish time of the latest release |
| `contributors` | number of contributors, anonymous included |
| `createdAt`, `pushedAt`, `updatedAt` | activity dates |
| `isFork`, `isArchived`, `defaultBranch`, `sizeKb` | repository state |

## Request

`POST https://api.pushbuild.com/github-repo-stats/run` with a JSON body. Send your key in the `X-API-Key` header.

| Field | Type | Description |
| --- | --- | --- |
| `repos` | list of strings | owner/name or GitHub URLs. |
| `owners` | list of strings | Every public repo of these users or orgs, most recently pushed first. |
| `search` | string | GitHub repository search, e.g. 'vector database language:rust stars:>500'. Up to 1,000 results. |
| `sort` | string: stars, forks, updated | Order of search results. Default: `"stars"`. |
| `includeForks` | boolean | For owners: include forked repos. Default: `false`. |
| `includeDetails` | boolean | Three extra GitHub calls per repo. Turn off for faster runs without a token. Default: `true`. |
| `maxRepos` | integer | Cap on repositories returned. Default: `30`. |
| `githubToken` | string | A free personal access token with no scopes raises GitHub's limit from 60 to 5,000 requests an hour. |
| `maxItems` | integer | Maximum items to return (1-500). Default: `100`. |

### Example

```
curl -X POST https://api.pushbuild.com/github-repo-stats/run \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"repos": ["fastapi/fastapi", "https://github.com/pydantic/pydantic"], "maxItems": 20}'
```

### Response

```
{"count": 20, "truncated": false, "seconds": 1.4, "items": [ { ... } ]}
```

Each call returns up to 500 items. Records that fail validation or are not found are flagged in the items and not charged.

## Pricing

Pay only for results returned: $0.80 per 1,000 repositories. No charge for errors or empty searches.

| Repositories | Cost |
| --- | --- |
| 1,000 | $0.80 |
| 10,000 | $8.00 |
| 100,000 | $80.00 |
| 1,000,000 | $800.00 |
| 1,250 a month | Free ($1 monthly credit) |

## Use it from Claude, ChatGPT or Cursor

This API is also an MCP server: `https://api.pushbuild.com/mcp/github-repo-stats`. Add it to any assistant that supports remote MCP servers, with your key in the `X-API-Key` header. Same prices. [Setup for each app](https://pushbuild.com/apis/mcp.html).

## Related APIs

- [npm & PyPI Package Stats API](https://pushbuild.com/apis/npm-pypi-package-stats.html): Download counts (daily, weekly, monthly and 12-month history), latest version, license, repository, maintainers, dependencies and release dates for any npm or PyPI package, plus npm search.
- [Docker Hub API](https://pushbuild.com/apis/docker-hub-stats.html): Docker Hub repository stats for any public image: total pulls, stars, last update, creation date, description, official flag and categories, plus recent tags with update time, compressed size and architectures.
- [Government Open Data API](https://pushbuild.com/apis/government-open-data-catalogs.html): Search the national open data catalogs of the UK, Canada, Australia and Ireland plus the UN Humanitarian Data Exchange by keyword, publisher, file format and update date.
- [Germany Weather API](https://pushbuild.com/apis/germany-weather-dwd.html): German weather from DWD (Deutscher Wetterdienst) open data: hourly observations and forecasts for any location in Germany, current conditions, active official weather warnings, and nearby DWD stations..
- [High School Sports API](https://pushbuild.com/apis/high-school-sports-scores.html): US high school game schedules, results and scores read from school athletics websites (VNN / PlayOn network) and the Wisconsin WIAA ScoreCenter: date, sport, level, home and away schools with city and state, and final score..
- [Gemini Exchange API](https://pushbuild.com/apis/gemini-exchange-prices.html): Gemini exchange public market data: current price and 24h change for every trading pair, 24h ticker with open, high, low, last, bid, ask and hourly prices, and OHLC candles from 1 minute to 1 day..

## Tell us what you need built.

Questions about this API, higher volumes, or a data source you need that we don't cover yet.

[hello@pushbuild.com](mailto:hello@pushbuild.com?subject=API%20question)

## New APIs and data, twice a month

New data APIs, coverage changes and analysis from Pushbuild. No spam; one click to leave.

---
As of 2026-12-03. Source: https://pushbuild.com/apis/github-repo-stats.html
