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
- Open the key In the dashboard, click API keys in the left menu, then the name of the key.
- Choose the limit Under Rate limit, pick Per key or Per client IP and enter the number of lookups per hour.
- Save Click Save changes.
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:
| Header | Meaning |
|---|---|
X-Rate-Limit-Limit | Lookups allowed per hour. |
X-Rate-Limit-Remaining | Lookups left before the limit is reached. |
X-Rate-Limit-Reset | Seconds until the current hour ends. |
Retry-After | With a 429 answer only: seconds to wait before the next request. |