Real-time GitHub data, one API call.
Public GitHub users, repos, PRs, followers, plus github.com/trending and the contribution heatmap — surfaces GitHub REST does not ship.
The GitHub API from Captapi gives developers reliable access to public GitHub data without building or maintaining scrapers — send one authenticated request and get clean, structured JSON back. Users, repos, contributions, and trending — one key with the rest of Captapi.
curl "https://api.captapi.com/v1/github/user?username=nasa" \
-H "Authorization: Bearer capt_live_..."What is the GitHub API?
Public GitHub users, repos, PRs, followers, plus github.com/trending and the contribution heatmap — surfaces GitHub REST does not ship. Every endpoint is a single authenticated GET request that responds with predictable JSON, so the data drops straight into dashboards, AI pipelines, RAG systems, and no-code automations. AI agents can call the same endpoints as MCP tools via @captapi/mcp.
Compared with GitHub REST API: Do not switch off GitHub's official API if GitHub is your only source. Use Captapi when you already hold a Captapi key for other platforms, or when you need github.com/trending (starsGained) or the last-year contribution heatmap — neither is a REST endpoint. GitHub REST API alternative.
Endpoints
What you can do with the GitHub API
User
GET /v1/github/user
GitHub public profile — login, type User|Organization, email when public, followers (1 credit).
1 credit
Repositories
GET /v1/github/repositories
List a user's repos with sort/direction/type — opaque Link cursor (~0.4/repo).
~12 credits (0.4/result) · billed per result
Pull Requests
GET /v1/github/pull-requests
List repo PRs — draft, labels, author{}, head/base, opaque Link cursor (state echoed).
~12 credits (0.4/result) · billed per result
Activity
GET /v1/github/activity
Public events with typed payload (Push commits/ref, PR/issue action) — 90-event ceiling.
~12 credits (0.4/result) · billed per result
Followers
GET /v1/github/followers
Follower cards {id, login, type, url, avatar} — ~0.1/row; large accounts are expensive to page fully.
~3 credits (0.1/result) · billed per result
Following
GET /v1/github/following
Accounts a user follows — same card and ~0.1/row pricing as followers.
~3 credits (0.1/result) · billed per result
Contributions
GET /v1/github/contributions
GitHub contribution graph — sorted days[], currentStreak (today grace), longestStreak (2 credits).
2 credits
Repository
GET /v1/github/repository
GitHub repo — stars, real watchers (subscribers), openIssuesAndPrs, license, parent when fork (1 credit).
1 credit
Trending
GET /v1/github/trending-repositories
github.com/trending — repos ranked by starsGained (daily|weekly|monthly), not all-time stars (2 credits).
2 credits
Trending Devs
GET /v1/github/trending-developers
github.com/trending/developers — windowed ranks with popularRepo + followers (2 credits).
2 credits
How it works
- 1. Sign up — get 100 free credits, no card required.
- 2. Create a key from your dashboard.
- 3. Call any endpoint above with
Authorization: Bearer capt_live_...and parse the JSON response. Passcache=trueto reuse a prior response from the 24h cache at no cost.
GitHub API guides
Frequently asked questions
What is the GitHub API?+
The GitHub API is a REST API from Captapi that returns public GitHub data as clean, structured JSON. It covers 10 endpoints — User, Repositories, Pull Requests, Activity, Followers, Following, and more — behind one Bearer API key, with no OAuth flow and no infrastructure to build or maintain.
What data can I get from the GitHub API?+
Public GitHub users, repos, PRs, followers, plus github.com/trending and the contribution heatmap — surfaces GitHub REST does not ship. Each endpoint is a single GET request that responds with predictable JSON fields, so the data is ready for dashboards, AI pipelines, and automations.
Do I need a GitHub developer account or OAuth?+
No. You only need a Captapi key (capt_live_...), sent as an Authorization: Bearer header. The same key works across all 33 platforms Captapi supports. We handle access, rate limits, retries, and parsing for you.
How much does the GitHub API cost?+
GitHub endpoints cost between 1 and 12 credits per call, depending on the endpoint and how many results you request. New accounts start with 100 free credits (no credit card). Pass cache=true to serve from the 24h cache (0 credits on hit); default is always fresh. Selected profile endpoints also accept cacheMaxAge=1d|3d|7d|14d|30d.
Can AI agents use the GitHub API?+
Yes. Every GitHub endpoint is exposed as a tool in the official MCP server (@captapi/mcp) for Claude, Cursor, and VS Code, and is also available through the @captapi/cli CLI and the n8n-nodes-captapi community node.
Is the GitHub API suitable for production use?+
Yes. It is a stable REST API with predictable JSON, automatic retries, and upstream fallbacks. Pass cache=true to serve from the 24h cache (0 credits on hit); default is always fresh. Selected profile endpoints also accept cacheMaxAge=1d|3d|7d|14d|30d. Only successful responses consume credits — failed or empty results are never charged.
Should I use Captapi or api.github.com?+
Call api.github.com for GitHub-only jobs — public REST does not require OAuth, and a PAT raises the limit from 60 to 5,000 requests/hour. Use Captapi when you already hold our key for other platforms, or when you need github.com/trending (starsGained) or the contribution heatmap. Those two are not REST endpoints. Paging a mega-follower list through Captapi is expensive (~0.1 credits/row); prefer GitHub directly for full archives.
Explore other platforms
Start using the GitHub API in sixty seconds
Sign up, grab your API key, and make your first request. 100 credits on the house — no credit card.