Skip to main content
An audit log tells you who did what. Monitoring API usage tells you how your automated integrations behave and which callers consume the most capacity.
Every API call made to your enterprise is subject to rate limiting. As an administrator, monitor limits, identify bottlenecks, and guide development teams to more efficient integration patterns.
A slide titled "Why API Usage Needs Watching" showing an "As an administrator" checklist with three points: 1) Monitor these limits, 2) Identify bottlenecks, and 3) Efficient integration pathways.

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.
Table — typical API access options and use cases

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.
Use the REST endpoint to check limits for the authenticated token or installation:
  • 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:
Example of a more expensive GraphQL query (requesting many repositories and nested fields):
For GraphQL rate-limit details and optimization tips, see the GraphQL resource limitations docs: https://docs.github.com/en/graphql/overview/resource-limitations#rate-limiting

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 a Retry-After header.
A dashboard-style graphic titled "The Second Gatekeeper" showing a usage progress bar reading 1,204 / 5,000 requests this hour with the note "Well within budget." Below are buttons labeled "Secondary rate limits" and "Rapid concurrency."
Example: a concurrency test showing some 429 responses
Example server response when secondary rate limits are hit:
Example of a client applying exponential backoff until success:
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.
Short checklist 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

Watch Video