# GitHub API — UnifAPI

> Users, repositories, contributions, trending. Read public GitHub users and organizations, repositories with stars and forks, contribution graphs, pull requests and trending lists.

- Category: Developer
- API base URL: https://api.unifapi.com
- Auth: `Authorization: Bearer <UnifAPI API key>` (OAuth recommended for MCP clients)
- MCP server: https://mcp.unifapi.com
- Developer docs: https://docs.unifapi.com/api/github
- OpenAPI spec: https://unifapi.com/openapi.json
- HTML page: https://unifapi.com/apis/github
- Full catalog: https://unifapi.com/apis.md

## Agent workflows

- Source engineers from public profiles, repositories, pull requests and contribution activity.
- Track trending repositories and developers by language to spot new tools and communities.
- Compare open-source projects by stars, forks, open issues, license and recent pushes.

## Endpoints (10)

Every endpoint returns the UnifAPI JSON envelope (`request_id`, `data`, `pagination` on lists, `billing`) and bills max(records × credits per record, minimum) in credits.

### Get a GitHub repository

`GET /github/repos/{owner}/{repo}`

Returns a public GitHub repository: description, topics, license, default branch, languages, stars, forks, watchers and open issues. Returns `not_found` when the repository does not exist.

- Price: 1 credit per record, minimum 3 credits ($0.003) per call
- Required: `owner` (path), `repo` (path)
- Details: https://unifapi.com/apis/github/repos/owner/repo/get
- Docs: https://docs.unifapi.com/api/github/repos/owner/repo/get

### List trending GitHub developers

`GET /github/trending/developers`

Returns GitHub's trending developers for a time window, optionally for one programming language, with each developer's popular repository.

- Price: 1 credit per record, minimum 3 credits ($0.003) per call
- Details: https://unifapi.com/apis/github/trending/developers/get
- Docs: https://docs.unifapi.com/api/github/trending/developers/get

### List trending GitHub repositories

`GET /github/trending/repos`

Returns GitHub's trending repositories for a time window (`daily`, `weekly`, `monthly`), optionally for one programming or spoken language, with stars gained in the window.

- Price: 1 credit per record, minimum 3 credits ($0.003) per call
- Details: https://unifapi.com/apis/github/trending/repos/get
- Docs: https://docs.unifapi.com/api/github/trending/repos/get

### Get a GitHub user or organization

`GET /github/users/{username}`

Returns a public GitHub user or organization profile: name, bio, company, location, blog, follower and repository counts. Returns `not_found` when the account does not exist.

- Price: 1 credit per record, minimum 3 credits ($0.003) per call
- Required: `username` (path)
- Details: https://unifapi.com/apis/github/users/username/get
- Docs: https://docs.unifapi.com/api/github/users/username/get

### List a GitHub user's public activity

`GET /github/users/{username}/activity`

Returns a GitHub user's public activity one month at a time (commits, pull requests, issues, reviews). The cursor pages backward month by month through the selected `year`.

- Price: 1 credit per record, minimum 3 credits ($0.003) per call
- Required: `username` (path)
- Details: https://unifapi.com/apis/github/users/username/activity/get
- Docs: https://docs.unifapi.com/api/github/users/username/activity/get

### Get a GitHub user's contribution graph

`GET /github/users/{username}/contributions`

Returns a GitHub user's daily contribution counts and total for one calendar year (default: the current year). Returns `not_found` when the user does not exist.

- Price: 1 credit per record, minimum 3 credits ($0.003) per call
- Required: `username` (path)
- Details: https://unifapi.com/apis/github/users/username/contributions/get
- Docs: https://docs.unifapi.com/api/github/users/username/contributions/get

### List a GitHub account's followers

`GET /github/users/{username}/followers`

Returns the accounts that follow a GitHub user or organization. Paginate with `cursor`.

- Price: 1 credit per record, minimum 3 credits ($0.003) per call
- Required: `username` (path)
- Details: https://unifapi.com/apis/github/users/username/followers/get
- Docs: https://docs.unifapi.com/api/github/users/username/followers/get

### List accounts a GitHub user follows

`GET /github/users/{username}/following`

Returns the accounts a GitHub user follows. Paginate with `cursor`.

- Price: 1 credit per record, minimum 3 credits ($0.003) per call
- Required: `username` (path)
- Details: https://unifapi.com/apis/github/users/username/following/get
- Docs: https://docs.unifapi.com/api/github/users/username/following/get

### List pull requests by a GitHub user

`GET /github/users/{username}/pull-requests`

Returns public pull requests authored by a GitHub user, optionally between `since` and `until`, with repository, state and timestamps. Paginate with `cursor`.

- Price: 1 credit per record, minimum 3 credits ($0.003) per call
- Required: `username` (path)
- Details: https://unifapi.com/apis/github/users/username/pull-requests/get
- Docs: https://docs.unifapi.com/api/github/users/username/pull-requests/get

### List a GitHub account's repositories

`GET /github/users/{username}/repos`

Returns the public repositories of a GitHub user or organization with language, stars, forks and update times. Filter by type and sort. Paginate with `cursor`.

- Price: 1 credit per record, minimum 3 credits ($0.003) per call
- Required: `username` (path)
- Details: https://unifapi.com/apis/github/users/username/repos/get
- Docs: https://docs.unifapi.com/api/github/users/username/repos/get

## Related APIs

- [Hacker News API](https://unifapi.com/apis/hacker-news/index.md) — Stories, search, comment trees, users, jobs
- [LinkedIn API](https://unifapi.com/apis/linkedin/index.md) — People, companies, posts, jobs, ads, search
- [Browser API](https://unifapi.com/apis/browser/index.md) — Markdown, HTML, screenshots, links
- [Email API](https://unifapi.com/apis/email/index.md) — Free email filter: business vs. personal addresses
