API rate limits specify the number of requests a client can make to DatoCMS APIs in a specific time frame.
By default the Management API enforces rate limits of 60 requests per 3 seconds. Higher rate limits may apply depending on your current plan.
In the following list you can find all the headers returned in every response by the Content Management API which give a client information on rate limiting:
X-RateLimit-Limit
: the maximum amount of requests which can be made in 3 seconds.
X-RateLimit-Remaining
: the remaining amount of requests which can be made until the next 3-seconds reset.
X-RateLimit-Reset
: if present, indicates the number of seconds until the next request can be made.
When a client gets rate limited, the API responds with the 429 Too Many Requests
HTTP status code and sets the value X-RateLimit-Reset
header to an integer larger than 0 specifying the time before the limit resets and another request will be accepted.
Our Javascript client already manages rate limit errors for you! If it encounters a 429
status code, the promise won't be rejected. The client will repeat the requests until the API stops returning 429
status codes, and only then will the promise will be resolved with success.
Every DatoCMS plan offers a number of API requests per month. What happens you exceed the included quota?
If your project is under a free plan, API responses will be temporarily disabled until the beginning of the following calendar month, unless you switch to a paid plan.
If your project is under a paid plan, you will pay an additional cost for the additional usage you made of the API.
For more details, check our Plans, billing and pricing page.