API error

rate_limited

HTTP 429 · no credit is used for a request that ends in an error.

The account or key sent more requests per second than its limit allows, the IP address sent more than 500 requests per second (requests with a key from Cloudflare Workers, which all share one address, are left out), or the IP address sent more than 20 requests with an invalid key in a minute (its further invalid keys get this for up to a minute; valid keys keep working). GET /v1/latency has its own limit instead, 20 requests in 10 seconds per IP address, and test and malformed addresses, which do not count toward the per-second limit, have a separate, much higher safety limit per key.

What to do

Wait for the number of seconds in Retry-After, then retry. Spread requests evenly over time, and fix an invalid key instead of retrying it.

Retry

Yes, after Retry-After. When and how often to retry any error: retrying safely.

The answer

{
  "error": {
    "code": "rate_limited",
    "message": "Too many requests. Slow down and retry later.",
    "request_id": "req_7Hq2LmX9cV4bN8tR1zK6wD"
  }
}

Branch on code, which is stable; message is for people and may change. Keep request_id in your logs.

Headers that come with it:

  • X-Request-Id: Our ID for the request (same as request_id in bodies).
  • Retry-After: Seconds to wait before retrying.

Endpoints that can answer it

More

Updated · Maintained by: Email Validation LLC

Need help? Contact support, or ask the help chat. Something wrong or missing on this page? Tell us