HTTP 429 Too Many Requests (RFC 6585) indicates the client has sent too many requests in a given time period (rate limiting). The server SHOULD include a Retry-After header telling the client when it can try again. This is the standard rate-limiting response — APIs use it to protect against abuse, enforce fair usage quotas, and prevent service degradation from excessive traffic.
Response includes the status code, standard headers (including Content-Type), and a small diagnostic JSON body describing the request and returned status.
Simulator URL (copy in the app after load — not a normal link):
https://httpstatus.com/api/status/429
Example request:
curl -i "https://httpstatus.com/api/status/429"The user has sent too many requests in a given amount of time.
On this code, Inspector focuses on semantics, headers, and correctness warnings that commonly affect clients and caches.
HTTP 429 Too Many Requests has specific technical implications for API design, caching, and client behavior. Understanding the precise semantics helps distinguish it from similar status codes and implement correct error handling. The response should include a descriptive body following a consistent error schema (like RFC 7807 Problem Details) so clients can programmatically handle the error.
// Handle 429 Too Many Requests in Express
app.use((err, req, res, next) => {
if (err.status === 429) {
return res.status(429).json({
type: 'https://api.example.com/errors/too-many-requests',
title: 'Too Many Requests',
status: 429,
detail: err.message
});
}
next(err);
});from fastapi import HTTPException
# Raise 429 Too Many Requests
raise HTTPException(
status_code=429,
detail={
'type': 'too_many_requests',
'message': 'Descriptive error for 429 Too Many Requests'
}
)// Spring Boot 429 Too Many Requests handling
@ExceptionHandler(CustomTooManyRequestsException.class)
public ResponseEntity<ErrorResponse> handleTooManyRequests(
CustomTooManyRequestsException ex) {
return ResponseEntity.status(429)
.body(new ErrorResponse("Too Many Requests", ex.getMessage()));
}// Return 429 Too Many Requests
func errorHandler(w http.ResponseWriter, message string) {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(429)
json.NewEncoder(w).Encode(map[string]any{
"status": 429,
"error": "Too Many Requests",
"message": message,
})
}