429 Too Many Requests
You sent too many requests in a short time and hit a rate limit. Wait, then retry, ideally after the Retry-After time.
What 429 Too Many Requests means
Defined in RFC 6585 for rate limiting. The server may send Retry-After, either a number of seconds or a date, to say when you can try again.
Many APIs also send headers like X-RateLimit-Limit and X-RateLimit-Remaining so clients can slow down before they hit the limit. 429 is about your traffic; 503 means the whole server is struggling.
Common causes
- A script, loop or retry storm sending requests faster than the API allows.
- Many users behind one IP address, such as an office or mobile network, sharing one limit.
- Repeated login or form attempts hitting a stricter limit on that endpoint.
- Bot protection on a CDN treating your traffic as abusive.
How to fix 429 Too Many Requests
- As a visitor, wait a few minutes and try again.
- Read Retry-After and do not retry before that time.
- Use exponential backoff with jitter, and cache responses so you make fewer calls.
- Batch requests where the API allows it, or ask the provider for a higher limit.
Headers that go with it
Retry-After
Example response
HTTP/1.1 429 Too Many Requests
Retry-After: 120
Content-Type: text/plain; charset=utf-8
429 Too Many RequestsHow to check for a 429 response
cURL
# Print only the status code
curl -s -o /dev/null -w "%{http_code}\n" https://example.com/JavaScript (Node.js)
const res = await fetch("https://example.com/");
if (res.status === 429) {
console.log(res.status, res.statusText);
}Python
import requests
res = requests.get("https://example.com/")
if res.status_code == 429:
print(res.status_code, res.reason)Go
res, err := http.Get("https://example.com/")
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
if res.StatusCode == 429 {
fmt.Println(res.Status)
}Specification
429 Too Many Requests is defined in RFC 6585, section 4.
Related status codes
- 503
The server cannot handle the request right now, usually because it is overloaded or down for maintenance. Try again later.
- 403
The server understood the request but refuses to allow it. Logging in again will not help unless your account gets access.
- 408
The server closed the connection because the client took too long to send the full request.