Skip to main content
We publish frequent updates to our documentation, and translation of this page may still be in progress. For the most current information, please visit the English documentation.

This version of GitHub Enterprise was discontinued on 2023-03-15. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.

After a site administrator upgrades your Enterprise Server instance to Enterprise Server 3.9 or later, the REST API will be versioned. To learn how to find your instance's version, see "About versions of GitHub Docs". For more information, see "About API versioning."

Rate limit

Use the REST API to check your current rate limit status.

About rate limits

You can check your current rate limit status at any time. For more information about rate limit rules, see "Resources in the REST API."

The REST API for searching items has a custom rate limit that is separate from the rate limit governing the other REST API endpoints. For more information, see "Search." The GraphQL API also has a custom rate limit that is separate from and calculated differently than rate limits in the REST API. For more information, see "Resource limitations." For these reasons, the API response categorizes your rate limit. Under resources, you'll see objects relating to different categories:

  • The core object provides your rate limit status for all non-search-related resources in the REST API.

  • The search object provides your rate limit status for the REST API for searching (excluding code searches). For more information, see "Search."

  • The code_search object provides your rate limit status for the REST API for searching code. For more information, see "Search."

  • The graphql object provides your rate limit status for the GraphQL API.

  • The integration_manifest object provides your rate limit status for the POST /app-manifests/{code}/conversions operation. For more information, see "Registering a GitHub App from a manifest."

  • The code_scanning_upload object provides your rate limit status for uploading SARIF results to code scanning. For more information, see "Uploading a SARIF file to GitHub."

For more information on the headers and values in the rate limit response, see "Resources in the REST API."

Get rate limit status for the authenticated user

Works with GitHub Apps

Note: Accessing this endpoint does not count against your REST API rate limit.

Note: The rate object is deprecated. If you're writing new API client code or updating existing code, you should use the core object instead of the rate object. The core object contains the same information that is present in the rate object.

HTTP response status codes for "Get rate limit status for the authenticated user"

Status codeDescription
200

OK

304

Not modified

404

Resource not found

Code samples for "Get rate limit status for the authenticated user"

get/rate_limit
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ http(s)://HOSTNAME/api/v3/rate_limit

Response

Status: 200
{ "resources": { "core": { "limit": 5000, "remaining": 4999, "reset": 1372700873, "used": 1 }, "search": { "limit": 30, "remaining": 18, "reset": 1372697452, "used": 12 }, "graphql": { "limit": 5000, "remaining": 4993, "reset": 1372700389, "used": 7 }, "integration_manifest": { "limit": 5000, "remaining": 4999, "reset": 1551806725, "used": 1 }, "code_scanning_upload": { "limit": 500, "remaining": 499, "reset": 1551806725, "used": 1 } }, "rate": { "limit": 5000, "remaining": 4999, "reset": 1372700873, "used": 1 } }