DevKits
429

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.

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"}), 429

Related status codes

All 4xx codes