---
title: "GitHub API: JSON data, 31 endpoints, 1 credit per call"
description: "Get GitHub data as structured JSON with one API key: repository, repository activity, repository branches and repository commits. Free credits every month."
url: https://perceptlayer.com/apis/github
---

[APIs](https://perceptlayer.com/apis) / [Apps and media](https://perceptlayer.com/verticals/apps) / GitHub

1 credit per call 31 endpoints

# GitHub API

Get GitHub data as structured JSON with one API key: repository, repository activity, repository branches and repository commits. Free credits every month.

[Get a free API key](https://perceptlayer.com/signup) Run it below

GitHub

GET /v1/github/trending-developers?since=weekly 

```
curl "https://api.perceptlayer.com/v1/github/trending-developers?since=weekly" \
  -H "X-API-Key: $API_KEY"
```

cURL 1 credit per successful call

Run this call below or from your dashboard to see a live response.

Playground

## Run this API

cURL shell 

```
curl "https://api.perceptlayer.com/v1/github/trending-developers?since=weekly" \
  -H "X-API-Key: $API_KEY"
```

GitHub · 31 endpoints

## Endpoints

Every endpoint takes the same key. Open one for its parameters and an example request.

| Endpoint | Required parameters | Cost |
| --- | --- | --- |
| [GET `/v1/github/repository`](https://perceptlayer.com/apis/github/repository) | `owner` `repo` | 1 credit |
| [GET `/v1/github/repository-activity`](https://perceptlayer.com/apis/github/repository-activity) | `owner` `repo` | 1 credit |
| [GET `/v1/github/repository-branches`](https://perceptlayer.com/apis/github/repository-branches) | `owner` `repo` +2 optional | 1 credit |
| [GET `/v1/github/repository-commits`](https://perceptlayer.com/apis/github/repository-commits) | `owner` `repo` +7 optional | 1 credit |
| [GET `/v1/github/repository-compare-commits`](https://perceptlayer.com/apis/github/repository-compare-commits) | `owner` `repo` `base` `head` | 1 credit |
| [GET `/v1/github/repository-compare-files`](https://perceptlayer.com/apis/github/repository-compare-files) | `owner` `repo` `base` `head` | 1 credit |
| [GET `/v1/github/repository-compare-patch`](https://perceptlayer.com/apis/github/repository-compare-patch) | `owner` `repo` `base` `head` | 1 credit |
| [GET `/v1/github/repository-contributors`](https://perceptlayer.com/apis/github/repository-contributors) | `owner` `repo` +3 optional | 1 credit |
| [GET `/v1/github/repository-files`](https://perceptlayer.com/apis/github/repository-files) | `owner` `repo` +2 optional | 1 credit |
| [GET `/v1/github/repository-files-at-ref`](https://perceptlayer.com/apis/github/repository-files-at-ref) | `owner` `repo` `ref` | 1 credit |
| [GET `/v1/github/repository-issues`](https://perceptlayer.com/apis/github/repository-issues) | `owner` `repo` +7 optional | 1 credit |
| [GET `/v1/github/repository-issues-comments`](https://perceptlayer.com/apis/github/repository-issues-comments) | `number` `owner` `repo` +2 optional | 1 credit |
| [GET `/v1/github/repository-languages`](https://perceptlayer.com/apis/github/repository-languages) | `owner` `repo` | 1 credit |
| [GET `/v1/github/repository-pulls`](https://perceptlayer.com/apis/github/repository-pulls) | `number` `owner` `repo` | 1 credit |
| [GET `/v1/github/repository-raw-file`](https://perceptlayer.com/apis/github/repository-raw-file) | `owner` `repo` `path` `ref` | 1 credit |
| [GET `/v1/github/repository-readme`](https://perceptlayer.com/apis/github/repository-readme) | `owner` `repo` +1 optional | 1 credit |
| [GET `/v1/github/repository-releases`](https://perceptlayer.com/apis/github/repository-releases) | `owner` `repo` +2 optional | 1 credit |
| [GET `/v1/github/repository-tags`](https://perceptlayer.com/apis/github/repository-tags) | `owner` `repo` +2 optional | 1 credit |
| [GET `/v1/github/repository-tree`](https://perceptlayer.com/apis/github/repository-tree) | `owner` `repo` +2 optional | 1 credit |
| [GET `/v1/github/trending-developers`](https://perceptlayer.com/apis/github/trending-developers) | none +3 optional | 1 credit |
| [GET `/v1/github/trending-repositories`](https://perceptlayer.com/apis/github/trending-repositories) | none +3 optional | 1 credit |
| [GET `/v1/github/user`](https://perceptlayer.com/apis/github/user) | `username` | 1 credit |
| [GET `/v1/github/user-activity`](https://perceptlayer.com/apis/github/user-activity) | `username` | 1 credit |
| [GET `/v1/github/user-contributions`](https://perceptlayer.com/apis/github/user-contributions) | `username` +1 optional | 1 credit |
| [GET `/v1/github/user-counts`](https://perceptlayer.com/apis/github/user-counts) | `username` | 1 credit |
| [GET `/v1/github/user-events`](https://perceptlayer.com/apis/github/user-events) | `username` +2 optional | 1 credit |
| [GET `/v1/github/user-followers`](https://perceptlayer.com/apis/github/user-followers) | `username` +2 optional | 1 credit |
| [GET `/v1/github/user-following`](https://perceptlayer.com/apis/github/user-following) | `username` +2 optional | 1 credit |
| [GET `/v1/github/user-repositories`](https://perceptlayer.com/apis/github/user-repositories) | `username` +5 optional | 1 credit |
| [GET `/v1/github/user-starred`](https://perceptlayer.com/apis/github/user-starred) | `username` +2 optional | 1 credit |
| [GET `/v1/github/user-tabs`](https://perceptlayer.com/apis/github/user-tabs) | `username` +2 optional | 1 credit |

Overview

## About the GitHub API

## What you can get

The GitHub API returns repository, repository activity, repository branches and repository commits as clean JSON. Each successful call costs one credit, and calls that fail are free.

Apps and media JSON REST MCP

### More apps and media APIs

[Apple App Store](https://perceptlayer.com/apis/apple-app-store) [Bandcamp](https://perceptlayer.com/apis/bandcamp) [Genius](https://perceptlayer.com/apis/genius) [Google Play](https://perceptlayer.com/apis/google-play) [Product Hunt](https://perceptlayer.com/apis/producthunt) [Spotify](https://perceptlayer.com/apis/spotify) [Steam](https://perceptlayer.com/apis/steam)

Use cases

### Track commits and activity on repositories you depend on

`Use the GitHub API to track commits and activity on repositories you depend on` 

### Research contributors and maintainers

`Use the GitHub API to research contributors and maintainers` 

### Compare changes between branches or commits

`Use the GitHub API to compare changes between branches or commits` 

FAQ

## Questions

**How much does the GitHub API cost?**

Each successful call costs one credit. New accounts get free credits every month, and credit packs bring the price down as you scale.

**What format are responses in?**

Every endpoint returns JSON, with no HTML parsing on your side.

**Do I need a separate key for GitHub?**

No. One key works for every API in the catalogue.

## Try the GitHub API with 1,000 free credits

No credit card. Failed calls are never billed.

[Get a free API key](https://perceptlayer.com/signup) [Read the docs](https://perceptlayer.com/docs)
