Rate Limiting / Throttling

Limit how many lookups an API key can make per hour. There is no limit by default: only your credits bound what a key can spend.

Set a limit

  1. Open the key In the dashboard, click API keys in the left menu, then the name of the key.
  2. Choose the limit Under Rate limit, pick Per key or Per client IP and enter the number of lookups per hour.
  3. Save Click Save changes.
The restrictions of an API key in the dashboard, with a rate limit of 1,000 lookups per hour for the key.
Per key

All the requests made with the key share one limit.

Per client IP

Each IP address that calls the API with the key has its own limit. It suits a key used from browsers.

How it works

The limit counts over one hour, and that hour slides: what was used in the previous hour weighs less as the current one goes by, so capacity comes back gradually. The method is the one described by Cloudflare.

A request over the limit is answered with the HTTP status 429 and the error code TOO_MANY_REQUESTS.

Headers

Responses to requests made with a limited key carry these headers:

HeaderMeaning
X-Rate-Limit-LimitLookups allowed per hour.
X-Rate-Limit-RemainingLookups left before the limit is reached.
X-Rate-Limit-ResetSeconds until the current hour ends.
Retry-AfterWith a 429 answer only: seconds to wait before the next request.