Skip to content

429 Too Many Requests

You sent too many requests in a short time and hit a rate limit. Wait, then retry, ideally after the Retry-After time.

What 429 Too Many Requests means

Defined in RFC 6585 for rate limiting. The server may send Retry-After, either a number of seconds or a date, to say when you can try again.

Many APIs also send headers like X-RateLimit-Limit and X-RateLimit-Remaining so clients can slow down before they hit the limit. 429 is about your traffic; 503 means the whole server is struggling.

Common causes

  • A script, loop or retry storm sending requests faster than the API allows.
  • Many users behind one IP address, such as an office or mobile network, sharing one limit.
  • Repeated login or form attempts hitting a stricter limit on that endpoint.
  • Bot protection on a CDN treating your traffic as abusive.

How to fix 429 Too Many Requests

  1. As a visitor, wait a few minutes and try again.
  2. Read Retry-After and do not retry before that time.
  3. Use exponential backoff with jitter, and cache responses so you make fewer calls.
  4. Batch requests where the API allows it, or ask the provider for a higher limit.

Headers that go with it

  • Retry-After

Example response

HTTP/1.1 429 Too Many Requests
Retry-After: 120
Content-Type: text/plain; charset=utf-8

429 Too Many Requests

How to check for a 429 response

cURL

# Print only the status code
curl -s -o /dev/null -w "%{http_code}\n" https://example.com/

JavaScript (Node.js)

const res = await fetch("https://example.com/");
if (res.status === 429) {
  console.log(res.status, res.statusText);
}

Python

import requests

res = requests.get("https://example.com/")
if res.status_code == 429:
    print(res.status_code, res.reason)

Go

res, err := http.Get("https://example.com/")
if err != nil {
	log.Fatal(err)
}
defer res.Body.Close()
if res.StatusCode == 429 {
	fmt.Println(res.Status)
}

Specification

429 Too Many Requests is defined in RFC 6585, section 4.

  • 503

    Service Unavailable

    The server cannot handle the request right now, usually because it is overloaded or down for maintenance. Try again later.

  • 403

    Forbidden

    The server understood the request but refuses to allow it. Logging in again will not help unless your account gets access.

  • 408

    Request Timeout

    The server closed the connection because the client took too long to send the full request.

← all 63 HTTP status codes

Type to search posts, tools and projects.

Keyboard shortcuts

Search+Kor/
Go to homegthenh
Go to bloggthenb
Go to projectsgthenp
Go to timelinegthent
Show this help?
Close search or helpesc