GitHub REST API
GitHub REST API with no key for public data: repository details, users, issues, releases and commits. 60 req/hour unauthenticated, 5,000 with a token.
Endpoint tested and returned HTTP 200 on 2026-08-19
What is the GitHub REST API?
The GitHub REST API provides programmatic access to repositories, users, issues, pull requests, releases and commits. Public data can be read with no authentication at 60 requests per hour per IP, rising to 5,000 per hour with a personal access token.
The GitHub REST API is the reference example of a well-designed public API, and much of it is readable without any authentication at all. Repository metadata, user profiles, issues, releases and commit history for public repos are all available anonymously.
The constraint that matters is the unauthenticated rate limit: 60 requests per hour per IP, which is very easy to exhaust. Adding a personal access token — even one with no scopes selected — raises that to 5,000 per hour, so generate one for anything beyond casual testing.
Quick facts
- Base URL
https://api.github.com- Authentication
- Public read access needs no auth. Send `Authorization: Bearer <token>` to raise limits or read private data.
- Rate limit
- 60 requests/hour per IP unauthenticated; 5,000/hour with a personal access token.
- Pricing
- Free. Rate limits, not fees, are the constraint.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the GitHub REST API
Every request below was executed against the live API on 2026-08-19, and the response shown is the real body it returned — not an illustration.
1. Fetch public repository metadata
GET https://api.github.com/repos/vercel/next.js
curl 'https://api.github.com/repos/vercel/next.js'const res = await fetch("https://api.github.com/repos/vercel/next.js");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://api.github.com/repos/vercel/next.js", timeout=20)
res.raise_for_status()
print(res.json()){
"id": 70107786,
"node_id": "MDEwOlJlcG9zaXRvcnk3MDEwNzc4Ng==",
"name": "next.js",
"full_name": "vercel/next.js",
"private": false,
"owner": {
"login": "vercel",
"id": 14985020,
"node_id": "MDEyOk9yZ2FuaXphdGlvbjE0OTg1MDIw",
"avatar_url": "https://avatars.githubusercontent.com/u/14985020?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vercel",
"html_url": "https://github.com/vercel",
"followers_url": "https://api.github.com/users/vercel/followers",
"following_url": "https://api.github.com/users/vercel/following{/other_user}",
"gists_url": "https://api.github.com/users/vercel/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vercel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vercel/subscriptions",
"organizations_url": "https://api.github.com/users/vercel/orgs",
"repos_url": "https://api.github.com/users/vercel/repos",
"events_url": "https://api.github.com/users/vercel/events{/privacy}",
"received_events_url": "https://api.github.com/users/vercel/received_events",
"type": "Organization",
"user_view_type": "public",
"site_admin": false
},
"html_url": "https://github.com/vercel/next.js",
"description": "The React Framework",
"fork": false,
"url": "https://api.github.com/repos/vercel/next.js",
"forks_url": "https://api.github.com/repos/vercel/next.js/forks",
"keys_url": "https://api.github.com/repos/vercel/next.js/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/vercel/next.js/collaborators{/collaborParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
<owner>/<repo> | path | Required | Repository owner and name. vercel/next.js |
Accept | header | Optional | Set to `application/vnd.github+json` to pin the response format. application/vnd.github+json |
Authorization | header | Optional | `Bearer <token>` to raise the rate limit to 5,000/hour. Bearer ghp_xxx |
per_page | integer | Optional | Page size on list endpoints, max 100. 100 |
Response fields
full_namestring- Owner and repository name, e.g. `vercel/next.js`.
stargazers_countinteger- Current star count.
forks_count / open_issues_countinteger- Fork and open issue totals.
languagestring- Primary detected language.
pushed_at / updated_atstring- ISO 8601 timestamps of the last push and last metadata change.
licenseobject- SPDX licence information, or null when unlicensed.
What you can build with the GitHub REST API
- Show live star counts and release versions on a project website
- Build a portfolio page that lists your public repositories automatically
- Monitor issue and pull request activity in a dashboard
- Fetch the latest release tag for an installer or update checker
Common errors and how to fix them
403 with rate limit message
The 60/hour unauthenticated limit is exhausted.
Fix: Add a personal access token. Check the `x-ratelimit-remaining` response header to track budget.
404
Repository is private or does not exist. GitHub returns 404 rather than 403 to avoid leaking existence.
Fix: Verify the path, and authenticate if the repo is private.
422
Validation failed on a write request.
Fix: Read the `errors` array in the body, which names the offending field.
GitHub REST API — frequently asked questions
Can I use the GitHub API without a token?
Yes, for public data, but you are limited to 60 requests per hour per IP. A personal access token with no scopes raises this to 5,000 per hour and is strongly recommended.
How do I check my remaining GitHub API rate limit?
Read the `x-ratelimit-remaining` and `x-ratelimit-reset` response headers on any call, or request /rate_limit, which does not itself count against the limit.
Why does GitHub return 404 for a repository I know exists?
For private repositories GitHub returns 404 rather than 403, deliberately, so unauthenticated callers cannot confirm whether a private repo exists. Authenticate to access it.
Is the GitHub GraphQL API better than REST?
GraphQL lets you fetch precisely the fields you need in one request, which is more efficient for complex queries, but it always requires authentication. REST is simpler and works anonymously for public data.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
Markdown to HTML Converter
Convert Markdown to clean HTML with a live preview — headings, emphasis, links, lists, code blocks, tables and blockquotes. 100% in your browser.
GitHub REST API is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-19; always check the official documentation before relying on this API in production, as terms and limits can change.