429 Too Many Requests: what it means
The server is rate limiting you: you sent more requests than it allows in a given time. The limit can apply per IP address, per API key, per account or per route, and the server may say when to come back in a Retry-After header. Unlike a 5xx, the server is healthy; it is protecting itself.
The code belongs to the 4xx class and its official name is "Too Many Requests". The page opens the status code list on 429, so you can compare it with its neighbours.
What the response looks like
HTTP/1.1 429 Too Many Requests
Retry-After: 30
Content-Type: application/jsonCommon causes
- A loop or a retry storm in your code that calls the API with no pause.
- Many users behind one shared IP (an office, a school, a mobile carrier) counted as one client.
- Scraping or testing tools that send requests in parallel faster than the plan allows.
- Hitting the limit of a free tier, such as 60 requests per minute or a daily quota.
How to fix it
If you are a visitor
- Wait for the time in the Retry-After header (or a minute) and try again, without reloading repeatedly.
- Close extra tabs or tools that call the same site in the background.
If you run the site or the API
- Read Retry-After and wait that long; if it is absent, back off exponentially with some random jitter (1 s, 2 s, 4 s…).
- Cache the responses and batch the calls: one request for 100 ids beats 100 requests.
- Limit your own concurrency to what the documented limit allows.
- On the server side, set the limit per key rather than per IP when clients share addresses, and always send Retry-After.
Snippets to copy
JavaScript: retry with Retry-After and backoff
async function getWithRetry(url, attempts = 5) {
for (let i = 0; i < attempts; i++) {
const res = await fetch(url);
if (res.status !== 429) return res;
const wait = Number(res.headers.get('Retry-After')) || 2 ** i;
await new Promise(r => setTimeout(r, wait * 1000 + Math.random() * 250));
}
throw new Error('rate limited');
}nginx: limit to 10 requests per second per IP
limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;
server {
location /api/ {
limit_req zone=api burst=20 nodelay;
limit_req_status 429;
}
}Codes it is confused with
| Code | Difference |
|---|---|
| 503 Service Unavailable | The server is overloaded or in maintenance for everyone, not only for you. |
| 403 Forbidden | You are not allowed at all, however slowly you ask. |
| 408 Request Timeout | The server gave up waiting for your request to arrive. |
| 401 Unauthorized | The key or token is missing or wrong, which is not the same as being over the limit. |
Caching, retries and search engines
A 429 is a request to slow down, not a ban, and well-behaved clients recover from it by waiting. Hammering the endpoint after a 429 is what turns a rate limit into a block, so put the backoff in the HTTP client once, not in every call.
Look up other status codes
- Open the list and type a number (404) or a word (timeout) in the search box.
- Read the description of the code and copy "429 Too Many Requests" with the button on its card.
- Use the # button to copy a link straight to that code.
Frequently asked questions
How long should I wait after a 429?
As long as the Retry-After header says (in seconds, or a date). Without it, start at one second and double on each new 429, up to a cap such as 60 seconds.
Does changing my IP or using a VPN fix a 429?
Only if the limit is per IP. When it is per API key or per account, a new IP changes nothing, and evading a limit may break the service terms.
Is 429 an error in my code?
It is an expected condition of any API with limits. Your code is only wrong if it does not handle it: treat 429 as a normal answer that triggers a wait.