GitHub
Make use of GitHub repositories, code and user info programmatically
- Authentication
- OAuth
- HTTPS
- Yes
- CORS
- Yes
- Category
- Development
- Data source
- public-apis + marcelscruz
- Documentation / URL
- https://docs.github.com/en/free-pro-team@latest/rest
Overview
The GitHub REST API exposes nearly everything on GitHub — repos, issues, PRs, commits, users, organizations, actions, releases, and more. Unauthenticated access works for public data (verified live: 60 requests/hour); OAuth or a personal access token raises limits and unlocks private data.
Quick Start
Public repo — no auth needed (verified live):
curl "https://api.github.com/repos/octocat/Hello-World"
User profile:
curl "https://api.github.com/users/octocat"
Search repos:
curl "https://api.github.com/search/repositories?q=astro+language:javascript&sort=stars"
Repo contents:
curl "https://api.github.com/repos/octocat/Hello-World/contents/"
With a token (authenticated, 5,000 req/hr):
curl "https://api.github.com/repos/octocat/Hello-World" \
-H "Authorization: Bearer YOUR_TOKEN"
Authentication
- Anonymous: public data, 60 requests/hour (verified working).
- Personal access token (GitHub → Settings → Developer settings): 5,000 req/hr, private repos.
- OAuth: for acting on behalf of users (issues, gists, repo writes) — the listing’s OAuth flag refers to this.
- GraphQL API also available at
https://api.github.com/graphql.
Rate Limits & Notes
- Rate limit headers come back in responses (
X-RateLimit-Remaining,X-RateLimit-Reset). - 404 can mean “private or doesn’t exist” — the API deliberately hides existence.
- Pagination via
Linkheaders or?page=N&per_page=100(max 100). - Set a descriptive
User-Agent— GitHub requires it.
FAQ
Is GitHub API free? Yes — public data is free; 60 req/hr anonymous, 5,000 req/hr with a free token.
Do I need OAuth? Only for user-scoped actions — reads work anonymously or with a token.
How do I avoid rate limits? Authenticate with a token and cache responses.
More in Development
| API | Auth | HTTPS | CORS | |
|---|---|---|---|---|
| 24 Pull Requests Project to promote open source collaboration during December | No auth | Yes | Yes | ↗ |
| Abacus Free and simple counting service. You can use it to track page hits and specific events | No auth | Yes | Unknown | ↗ |
| Agent Gateway 34+ AI agent infrastructure services including memory, wallets, and scheduling | API Key | Yes | Unknown | ↗ |
| AgentDeals Search and compare developer free tiers, startup credits, and pricing changes | No auth | Yes | Unknown | ↗ |
| Agify.io Estimates the age from a first name | No auth | Yes | Yes | ↗ |