429 Too Many Requests
You have been rate limited: the server counted more requests from you in some period than it allows. Slow down and the same request will work.
What 429 means
A 429 is a refusal based on volume, not on the content of the request. The specification that defines it is deliberately loose: it does not say how the server identifies "you" (an IP address, an API key, a user account or a cookie are all used), how it counts, or whether the limit applies to one URL or the whole service.
The response should explain the condition and may include a Retry-After header. That header is optional, so a client must cope without it. A 429 must not be stored by a cache. A server under real pressure need not answer at all and may simply drop connections.
Reading the response
Retry-After comes in two forms, a delay in seconds or a date:
Retry-After: 30
Retry-After: Sat, 14 Nov 2026 09:15:00 GMT
Many APIs add their own headers showing the quota, the amount left and the reset time. The names are not standardised and neither are the units: X-RateLimit-Reset is a Unix timestamp on some services and a number of seconds on others. Read the API's documentation before you parse it. The body often says which limit was hit (per second, per day, per endpoint), which matters when a service enforces several.
Handling 429 in a client
- Wait for
Retry-Afterif present. Without it, back off exponentially (1 s, 2 s, 4 s and up to a ceiling) and add random jitter so that many clients do not all return at the same instant. - Stop the other workers too. If ten parallel workers share a key and each retries by itself, the limit is never cleared. Put one limiter in front of all of them.
- Stay under the limit instead of bouncing off it. Use the remaining-quota headers to pace requests, and cap concurrency.
- Send fewer requests. Cache responses, use batch endpoints and conditional requests, raise page sizes, and replace polling with webhooks where the API offers them.
- Give up eventually. After a handful of attempts, surface the error.
As a visitor in a browser, wait a few minutes. Repeated reloading extends the block. A shared IP address (office, VPN, mobile carrier) can put you over a limit through other people's traffic.
Rate limiting on your own server
nginx has it built in, but rejects with 503 unless told otherwise:
limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;
location /api/ {
limit_req zone=api burst=20 nodelay;
limit_req_status 429;
}
burstlets short spikes through; without it, anything over the rate is rejected at once.- Behind a proxy or CDN,
$binary_remote_addris the proxy's address. Limit on the real client address or, better, on the API key. - Send
Retry-Afterand document the limits. Clients that know the rules trip over them less. - Use 429 for per-client limits and 503 when the whole service is overloaded. Googlebot treats 429 as a signal to slow its crawling.
429 compared with 503 and 403
| Code | Why you were refused | Clears when |
|---|---|---|
| 429 Too Many Requests | This client exceeded its allowance | The rate window passes |
| 503 Service Unavailable | The server is overloaded for everyone, or in maintenance | Load drops or maintenance ends |
| 403 Forbidden | A rule blocks you outright | Somebody changes the rule; waiting does not help |
Example 429 response
HTTP/1.1 429 Too Many Requests
Retry-After: 30
Content-Type: application/json
Content-Length: 100
{"error":"rate_limited","message":"Limit of 100 requests per minute exceeded. Retry in 30 seconds."}Retry-After: 30 is the number of seconds to wait. The header is optional in a 429, so a client still needs a fallback delay of its own.
Defined in RFC 6585, section 4.
Questions
How long should I wait after a 429 error?
For as long as the Retry-After header says, if there is one. Otherwise start with a second or two and double the wait after each failed attempt, with a little randomness added. The API's documentation usually states the length of its rate window.
Does a 429 response always include Retry-After?
No. The specification says a server may include it, not that it must. Some APIs send their own reset headers instead, and some send nothing, so client code needs a default back-off.
Why am I getting 429 when I have barely made any requests?
The limit may be counted per IP address and you share that address with others (a VPN, an office network, a cloud provider), or a script, browser extension or retry loop is sending more requests than you realise. Check the Network tab or your client's logs for the real count.
Is 429 a client error or a server error?
It is a 4xx code: the request was refused because of the client's behaviour, not a fault in the server. It is still temporary, which is why it is one of the few 4xx responses that should be retried, after a delay.