On this page
  1. What 429 means
  2. Why sites send it
  3. First steps when you get a 429
  4. Handle it in code: wait, then back off
  5. Let the API retry for you
  6. Prevent it: a polite scraper

What 429 means

HTTP 429 Too Many Requests is the status a server sends when one client has made more requests in a time window than it allows. The page itself is fine; the server just will not answer you right now.

Many sites add a Retry-After header that says how many seconds to wait, or at which time to come back. If you keep asking at the same speed, a temporary 429 often turns into a longer ban or a 403.

Why sites send it

Rate limits protect a site from overload and from bots that copy everything at once. A limit can count requests per address, per session, per account or per API key – and it can be stricter for search pages, logins or expensive endpoints than for normal pages.

Typical triggers: too many requests in parallel, no pause between pages, retries that fire immediately, and many requests from one address in a short time.

First steps when you get a 429

Stop and wait before the next request. Read the Retry-After header if there is one and wait at least that long. Lower the number of requests that run at the same time, and spread the work over a longer period.

Check whether the site offers an official API or a data export – it is often faster and allowed by its terms. And look at robots.txt: some sites state a crawl delay there.

Handle it in code: wait, then back off

A robust client treats 429 as normal. It waits as long as the site asks; without a Retry-After header it waits longer after each failed attempt (exponential backoff) and adds a little randomness so that parallel workers do not all retry at the same moment. After a few attempts it gives up and logs the URL for later.

import random, time, requests

def fetch(url, tries=5):
    for attempt in range(tries):
        r = requests.get(url, timeout=30)
        if r.status_code != 429:
            return r
        # Wait as long as the site asks; otherwise back off exponentially, with jitter.
        wait = r.headers.get("Retry-After", "")
        delay = float(wait) if wait.isdigit() else 2 ** attempt + random.random()
        time.sleep(min(delay, 60))
    r.raise_for_status()

Let the API retry for you

With VirginProxy you can let us try again before we answer: the "retry" option repeats the request after a timeout or when the target answers with a temporary error you name, for example 503. You get the first good answer, and you are only charged for the answer you receive and the attempts the site actually answered. For a 429 from the site itself, wait as long as it asks.

Our own limits work the same way: if you start more requests per second than your plan allows, the API answers at once with a 429 and charges nothing – with retry_after_ms telling you when to continue.

curl https://api.virginproxy.com/v1/requests \
  -H "Authorization: Bearer $VP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://shop.example/category/lamps", "retry": {"times": 2, "on": [503]}}'

Prevent it: a polite scraper

Fetch only the pages you need and keep what you already have – a cache avoids asking twice. Spread requests evenly instead of in bursts, keep parallel requests low per site, and schedule large jobs at quiet hours. Watch the share of 429 answers: when it rises, slow down automatically. A scraper that behaves like a careful visitor is faster in the end, because the site keeps answering it.