Too Many Requests
4xx Client Error
Last updated:
The client has sent too many requests in a given amount of time (rate limited).
Description
The response SHOULD include a Retry-After header indicating how long to wait. Many APIs also include X-RateLimit-* headers with quota info.
When to use
Return 429 when clients exceed your rate limits. Include Retry-After so well-behaved clients can back off.
Also searched as
Developers commonly search for 429 using phrases like 429 too many requests · 429 error · http 429 · rate limited · rate limit exceeded · 429 status code. All refer to the same HTTP 429 Too Many Requests response.
Specification
RFC 6585
Examples
HTTP response
HTTP/1.1 429 Too Many Requests
Content-Type: application/json
{"error":"Too Many Requests"}Node.js (Express)
res.status(429).json({ error: "Too Many Requests" });Go (net/http)
w.WriteHeader(http.StatusTooManyRequests)
Python (Flask)
return jsonify({"error": "Too Many Requests"}), 429Debug 429 with these tools
Related status codes
All 4xx codes
400 Bad Request401 Unauthorized403 Forbidden404 Not Found405 Method Not Allowed406 Not Acceptable408 Request Timeout409 Conflict410 Gone411 Length Required412 Precondition Failed413 Payload Too Large414 URI Too Long415 Unsupported Media Type418 I'm a teapot422 Unprocessable Entity425 Too Early428 Precondition Required429 Too Many Requests431 Request Header Fields Too Large451 Unavailable For Legal Reasons