MockFoxAdvertise

HTTP 429 Too Many Requests

Updated Free mock REST & WebSocket APIs

HTTP 429 Too Many Requests — The client sent too many requests in a given time (rate limiting).

Class
4xx Client Error
Defined in
RFC 6585
Official
Yes (IANA registry)
Cacheable by default
No (unless Cache-Control/Expires say so)
Safe to retry
Yes, after a delay (respect Retry-After)

Try it: get a real 429 response

Our test endpoint answers every request with 429 Too Many Requests.

curl -i https://mockfox.dev/api/status/429

Use it in tests, health-check monitors or to see how your client handles a 429. Add ?delay=2000 to slow it down.

What does HTTP 429 mean?

429 Too Many Requests means the client has sent too many requests in a given amount of time — it's hit a rate limit. The response may include a Retry-After header saying how many seconds to wait (or until what date).

Defined in RFC 6585, it's used by virtually every public API (GitHub, OpenAI, Stripe, Twitter/X) and by CDNs and WAFs to protect against abuse, scraping and accidental request floods.

When is 429 used?

  • An API client exceeds its quota per second, minute or day.
  • Login endpoints throttle repeated attempts.
  • A CDN/WAF rate-limiting rule detects a burst from one IP.
  • A frontend bug fires requests in a loop (e.g. a useEffect without dependencies).

Common causes of a 429

  • Too many requests from your IP, API key or account in a short window.
  • Shared IPs (offices, VPNs, mobile carriers' NAT) pooling many users into one limit.
  • Retries without backoff that amplify the problem.

How to fix 429 Too Many Requests

If you're visiting the site

  1. Wait a minute or two and try again — the limit resets automatically.
  2. Stop refreshing repeatedly; each refresh counts.
  3. Turn off your VPN, since many users may share its IP.

If you run the site or API (developers)

  1. Respect Retry-After, and use exponential backoff with jitter for retries.
  2. Read rate-limit headers (RateLimit-*, X-RateLimit-Remaining) and slow down before hitting zero.
  3. Cache responses and batch requests to reduce volume.
  4. When implementing limits, return 429 with Retry-After and a clear body — not 403 or 503.

Returning or handling 429: server examples

nginx

http {
    limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;
    server {
        location /api/ {
            limit_req zone=api burst=20 nodelay;
            limit_req_status 429;   # default is 503!
            proxy_pass http://app;
        }
    }
}

Express

import rateLimit from "express-rate-limit";

app.use("/api/", rateLimit({
  windowMs: 60_000,
  limit: 100,                 // 100 requests per minute per IP
  standardHeaders: "draft-7", // RateLimit headers; 429 + Retry-After when exceeded
}));

Client backoff

async function fetchWithRetry(url, tries = 5) {
  for (let i = 0; ; i++) {
    const res = await fetch(url);
    if (res.status !== 429 || i === tries - 1) return res;
    const wait = Number(res.headers.get("Retry-After")) * 1000 || 2 ** i * 1000 + Math.random() * 250;
    await new Promise((r) => setTimeout(r, wait));
  }
}

Example 429 response

HTTP/1.1 429 Too Many Requests
Retry-After: 30
RateLimit-Policy: 100;w=60
RateLimit: limit=100, remaining=0, reset=30
Content-Type: application/json

{"error":"rate_limited","message":"Too many requests, retry in 30 seconds."}

Related status codes

Related tools

Frequently asked questions

How long does a 429 error last?

As long as the rate-limit window — check the Retry-After header. Typically seconds to an hour; daily quotas reset after 24 hours.

How do I fix 429 Too Many Requests?

Slow down: wait for the Retry-After period, add exponential backoff to retries, cache results, and request a higher quota if you legitimately need more.

Why does nginx return 503 instead of 429 when rate limiting?

limit_req_status and limit_conn_status default to 503. Set them to 429 so clients know they're being throttled rather than seeing an outage.

Does 429 affect SEO?

If Googlebot gets 429s (or 503s) it slows its crawl rate; prolonged errors can drop pages from the index. Don't rate-limit verified search engine crawlers aggressively.