GitHub API
Overview
The GitHub REST API gives you programmatic access to nearly everything on GitHub — repositories, issues, pull requests, commits, users, organizations, GitHub Actions, and more. Unauthenticated requests are allowed for public data but are limited to 60 requests per hour; authenticating with a personal access token raises the limit to 5,000 per hour. It is one of the most widely documented and used APIs in the developer ecosystem.
Beginner Tip
Start with public endpoints that require no auth — like fetching repo info or listing releases. When you need more data or hit rate limits, create a Personal Access Token (PAT) at github.com > Settings > Developer settings > Personal access tokens. Pass it as Authorization: Bearer <token>. The API base URL is https://api.github.com.
Measurement Record
What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.
- Request
- GET https://api.github.com/repos/torvalds/linux
- Result
- HTTP 200 · application/json · 5,487 bytes · compressed
- Response time
- 45 ms (median of 3) · fastest 44 ms
- Transport
- TLSv1.3 · TLS_AES_128_GCM_SHA256 · certificate issued by Sectigo Limited
- Browser CORS
- Allowed — Access-Control-Allow-Origin: *
- Rate limit
- 60 per window (55 remaining at test time)
- Served by
- github.com
- Recorded
- 2026-08-10
Available Data
The kind of data this API exposes, based on its documentation. We could not call the endpoint to confirm the exact field names.
Captured Response
Captured from a real request to https://api.github.com/repos/torvalds/linux on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.
{
"id": 2325298,
"node_id": "MDEwOlJlcG9zaXRvcnkyMzI1Mjk4",
"name": "linux",
"full_name": "torvalds/linux",
"private": false,
"owner": {
"login": "torvalds",
"id": 1024025,
"node_id": "MDQ6VXNlcjEwMjQwMjU=",
"avatar_url": "https://avatars.githubusercontent.com/u/1024025?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/torvalds",
"html_url": "https://github.com/torvalds",
"followers_url": "https://api.github.com/users/torvalds/followers",
"following_url": "https://api.github.com/users/torvalds/following{/other_user}",
"gists_url": "https://api.github.com/users/torvalds/gists{/gist_id}",
"starred_url": "https://api.github.com/users/torvalds/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/torvalds/subscriptions",
"organizations_url": "https://api.github.com/users/torvalds/orgs",
"repos_url": "https://api.github.com/users/torvalds/repos",
"…": "(5 more fields)"
},
"html_url": "https://github.com/torvalds/linux",
"description": "Linux kernel source tree",
"fork": false,
"url": "https://api.github.com/repos/torvalds/linux",
"forks_url": "https://api.github.com/repos/torvalds/linux/forks",
"keys_url": "https://api.github.com/repos/torvalds/linux/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/torvalds/linux/collaborators{/collaborator}",
… Field Reference
full_name Owner and repository name in "owner/repo" format, e.g., "torvalds/linux". description Short description of the repository as set by the owner. Implementation Example
Calls a real endpoint of this API. Replace any placeholder credentials with your own key.
// Get repository information
const url = "https://api.github.com/repos/github/docs";
const response = await fetch(url, {
headers: {
"Accept": "application/vnd.github+json",
"Authorization": "Bearer YOUR_PERSONAL_ACCESS_TOKEN"
}
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(`Repository: ${data.full_name}`);
console.log(`Stars: ${data.stargazers_count}`);
console.log(`Forks: ${data.forks_count}`);
console.log(`Description: ${data.description}`); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
How This API Fails
We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.
{
"message": "Not Found",
"documentation_url": "https://docs.github.com/rest",
"status": "404"
} Common Errors & Troubleshooting
Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.
Measured Score Breakdown
Live HTTP request to the API endpoint
Fully tested on Aug 10, 2026
Technical Specifications
Related Tags
Alternatives to GitHub
Technical alternatives for different use cases.
Atlassian ecosystem integration with Jira and Confluence
Teams already using Jira and Atlassian tools
Public repository hosting and community features
Full DevOps platform with built-in CI/CD
Integrated CI/CD pipelines without third-party tools
Open-source community size and discoverability
Recipes Using GitHub
Build something with this API. Each recipe includes step-by-step instructions and code outlines.
Similar APIs
View All →Gitlab
The GitLab REST API provides comprehensive programmatic control over GitLab projects, including repositories, merge requests, pipelines, issues, CI/CD variables, and user management.
Bitbucket
The Bitbucket REST API (v2) provides programmatic access to Bitbucket Cloud repositories, pull requests, pipelines, and user accounts, enabling you to automate code review workflows and integrate Bitbucket into your CI/CD toolchain.
DomainDb Info
⭐ Beginner's PickDomainsDB.info provides a searchable database of registered domain names, allowing you to find all domains containing specific keywords, phrases, or patterns across various TLDs.
ApicAgent
⭐ Beginner's PickApicAgent parses User-Agent strings into structured device and browser information, returning details like browser name, version, OS, device type, and whether the client is a bot.
Beeceptor
⭐ Beginner's PickBeeceptor lets you create a mock REST API endpoint in seconds directly from your browser, without writing any server code.