Rate Limits

All APIs should possess rate limits that govern the amount of any digital resource or capability a consumer be able to access, with well-communicated, consistent, and enforced rate limits. Rate limits are what give API producers control over their digital resources, and are a fundamental aspect of how any type of APIs is publicly made available.

Also known as: Throttling, Quotas, Usage Limits

Example

rate-limits.yaml
- type: RateLimits
  url: https://developers.example.com/rate-limits

Standards

HTTP Headers

HeaderDirectionSpecDescription
RateLimit response draft-ietf-httpapi-ratelimit-headers Structured field conveying remaining quota and the reset interval for the current policy.
RateLimit-Policy response draft-ietf-httpapi-ratelimit-headers Advertises one or more quota policies (limit and window) that apply to the request.
Retry-After response RFC 9110 §10.2.3 Seconds (or HTTP-date) the client should wait before retrying after a 429 or 503.
X-RateLimit-Limit response De facto Maximum number of requests permitted in the current window.
X-RateLimit-Remaining response De facto Requests remaining in the current window.
X-RateLimit-Reset response De facto Time at which the current window resets, usually as a Unix timestamp or seconds remaining.

Status Codes

Media Types

OpenAPI Expression

Governance Rules

Risk & Compliance

OWASP:

Compliance:

Security: Without enforced rate limits, APIs are vulnerable to credential stuffing, scraping, denial-of-wallet (for metered backends), and DoS. Apply per-key, per-IP, and per-tenant limits; surface quota state via standard headers; degrade gracefully with 429 + Retry-After rather than dropping connections.

Tools

Suggested Metrics

Example Implementations

Related Properties

Tags


All Common Properties