Status codes · one code429Too Many Requests

What a 429 Too Many Requests response means, who is at fault, what a visitor should do and what the server owner should do.

Open the reference on this code
What is happening

Requests start failing although everything worked

HTTP/1.1 429 Too Many Requests
Retry-After: 120

A rate limit was exceeded: the service is not broken, it asked you to slow down. The Retry-After header says how many seconds to wait — that is part of the answer rather than advice: retrying sooner usually extends the block.

Code
Who is at faultClient error
Class4xx Client error
Headers
Retry-Afterhow long to wait before retrying
01

What to do

If it is someone else's site

Wait as long as the response says and stop refreshing — every refresh counts as another request and pushes the unblock further away. If the limit comes from a site rather than your own script, a few minutes' pause is what helps.

If it is your server

For the client: read Retry-After and retry with exponential backoff plus jitter — otherwise every client returns at the same moment and hits the limit again. For the server: a 429 must carry Retry-After and should not count as an application error — it is a normal answer, and keeping it apart from 5xx in monitoring stops the error graph from lying.

02

Easily confused with

503Service Unavailable

the service is unavailable as a whole rather than for you personally: overload or maintenance.

503
403Forbidden

you were blocked rather than throttled: waiting will not help.

403
408Request Timeout

that one is about a slow request from the client, not about how many there were.

408
03

How to check

curl -sI https://api.example.com/items | grep -i -E 'retry-after|ratelimit'

how long to wait and how much of the limit is left

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

check a single request without starting another burst

Find another code

The reference holds sixty-four codes searchable by number, name and meaning — plus a breakdown of confusing pairs such as 401 and 403.

Open the reference on this codeAll codes

Updated

«» added to favorites