4xx Client Errors

HTTP 429 Too Many Requests

The client has sent too many requests in a given amount of time (rate limiting).

When is 429 used?

  • API rate limiting
  • DDoS protection
  • Throttling excessive requests

How to handle a 429 response

Inspect the request — URL, method, headers, credentials, and body. Retrying the same request unchanged will usually fail again; 429 is the exception, where you should wait for the Retry-After period.

Check the status code a URL returns from the command line:

curl -s -o /dev/null -w "%{http_code}\n" https://example.com

How to return 429 from your server

Node.js (Express)

res.status(429).json({ message: 'Too Many Requests' });

Python (Flask)

return {"message": "Too Many Requests"}, 429

Go (net/http)

w.WriteHeader(429)

Frequently Asked Questions

What does HTTP 429 mean?

429 Too Many Requests: The client has sent too many requests in a given amount of time (rate limiting).

Is 429 an error?

Yes. 429 is in the 4xx Client Errors class. Client errors: the request is malformed, unauthorized, or targets something that does not exist.