Skip to main content
HTTP/4xx (Client Error)

429 Too Many Requests

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

❓ Why does this happen?

API rate limit threshold exceeded by IP address, API key, or user token.

✅ How to fix it

Implement exponential backoff retry logic and respect Retry-After header values.

Return or handle 429 in your stack

// app/api/resource/route.ts
export function GET() {
  return Response.json(
    { error: "Too Many Requests", status: 429 },
    {
      status: 429,
      headers: { "Retry-After": "60" }
    }
  );
}

Live 429 mock endpoint

Point your app, tests, or retry logic at this free public URL to reproduce a real 429 response (CORS enabled, optional ?delay=ms up to 5000).

https://castov.com/api/mock/429

429 vs similar status codes

Frequently Asked Questions

What does HTTP Status 429 mean?
The user has sent too many requests in a given amount of time (rate limiting).
Why am I getting a 429 status code?
API rate limit threshold exceeded by IP address, API key, or user token.
How do I fix a 429 Too Many Requests error?
Implement exponential backoff retry logic and respect Retry-After header values.
What is the difference between 429 Too Many Requests and 503 Service Unavailable?
429 targets one client that exceeded its rate limit. 503 means the whole service is unavailable for everyone.
How can I test how my app handles a 429 response?
Send a request to https://castov.com/api/mock/429 — it returns a real 429 Too Many Requests response with CORS enabled. Add ?delay=2000 to simulate a slow server.

Other 4xx status codes

Browse the full HTTP status codes directory or troubleshoot terminal errors in the Error Fix Encyclopedia.