
API rate-limit analogy
Think of GitHub API rate limits like lanes on a highway:- Personal Access Token (PAT): a regular car lane — 5,000 requests per hour.
- GitHub App installation: a freight corridor — about 15,000 requests per hour (roughly three times the throughput), better for heavy CI/CD integrations.
- Unauthenticated requests: a restricted side road — only 60 requests per hour.
Inspecting rate-limit headers
You don’t need extra calls to monitor usage. Every API response includes five headers that track your quota in real time:
Example: a typical curl request and its response headers.
- GET
/rate_limit— returns current rate-limit state for the caller.
Calling GET
/rate_limit gives current quota metrics for the token or installation and is useful for status checks. Remember: it is still an API request, so avoid aggressive polling—cache results and poll sparingly to prevent contributing to secondary limits.GraphQL: a point-based cost model
The GitHub GraphQL API uses a point-based budget (commonly 5,000 points/hour) rather than counting requests. Simple queries may cost 1 point; complex queries with many nested fields cost more. Optimize queries to retrieve necessary fields only—well-crafted GraphQL calls can replace many REST requests efficiently, but unoptimized queries can quickly exhaust your budget. Example of a small GraphQL query:Secondary rate limits (concurrency and abuse protection)
Even if you are within your hourly budget, GitHub enforces secondary limits to protect platform stability from extreme concurrency, rapid-fire mutations, or excessive polling. Many concurrent requests (for example, 100 simultaneous requests) can trigger a secondary limit and return HTTP 429 Too Many Requests with aRetry-After header.

Respect HTTP 429 responses and the
Retry-After header. Implement client-side throttling, exponential backoff, and queuing. Continuous retries without backoff can trigger additional rate limiting or abuse protections.Administrator runbook — practical steps
- Track and surface integrations consuming > ~80% of their hourly budget.
- Identify bursty or highly concurrent callers; add client-side throttling, request queuing, or concurrency limits.
- Ensure all clients handle HTTP 429 with exponential backoff and honor
Retry-After. - Move heavy automations from PATs to GitHub App installations to increase throughput without changing core integration behavior.
- Cache rate-limit responses (from
GET /rate_limit) and avoid polling more frequently than necessary.
If a tool experiences frequent 403/429 errors because it hits limits, migrating from a PAT to a GitHub App installation is a recommended solution: it usually increases capacity and is designed for organization-scale automations. See: https://docs.github.com/en/developers/apps/getting-started-with-apps/about-apps
Links and references
- GitHub REST API rate limit documentation
- GET /rate_limit endpoint
- GitHub Apps overview and best practices
- GraphQL API resource limitations