Skip to content

RateLimit-Limit

Standardized header indicating the maximum number of requests allowed in the current rate limit window.

The RateLimit-Limit response header is the IETF standardized version of X-RateLimit-Limit. It specifies the total number of requests a client is permitted to make within a given time window before being rate limited. This header is part of the RateLimit Header Fields for HTTP specification (RFC draft) and represents the modern, standardized approach to communicating rate limiting policies.

Modern APIs should prefer this standardized header over the legacy X-RateLimit-Limit version. Include it in responses to API requests where rate limiting is enforced.

Using the standardized header promotes interoperability across different API implementations and client libraries. It follows current best practices by avoiding the X- prefix, which was originally meant for experimental headers but has been deprecated for new standards.

The server sets this header to a numeric value representing the maximum allowed requests. Clients should read this value to understand their quota.

Example code in Javascript:

fetch('https://api.example.com/data')
.then(response => {
const limit = response.headers.get('RateLimit-Limit');
const remaining = response.headers.get('RateLimit-Remaining');
console.log(`Rate limit: ${remaining}/${limit} requests remaining`);
return response.json();
});
RateLimit-Limit: 1000