Rate limit

Duve’s Open API Rate Limits

Duve’s Open API enforces rate limits to ensure efficient resource usage and fair access for all users. Below is an overview of rate limits and how to handle them effectively.

API Rate Limits

All API requests are subject to rate limits. Your system must handle 429 Too Many Requests responses by implementing a retry mechanism. The general rate limits are:

Maximum Number of RequestsTime Frame
15One second
120One minute
5,000One hour

Handling Rate Limits

To address rate limits correctly, follow these steps:

  1. Implement a retry mechanism in your system.
  2. When an HTTP 429 Too Many Requests response is returned:
    • Delay the subsequent request based on the seconds specified in the Retry-After response header.

Understanding Your API Usage

Duve provides additional response headers in all API responses to help you monitor your usage:

  • X-RateLimit-Limit-<interval>: The total request limit for the specified interval.
  • X-RateLimit-Remaining-<interval>: The remaining requests available for the specified interval. These headers are available for second, minute, and hour intervals.

Example After a Single Request

Example response headers:

1X-RateLimit-Limit-Second: 15
2X-RateLimit-Limit-Minute: 120
3X-RateLimit-Limit-Hour: 5000
4X-RateLimit-Remaining-Minute: 119
5X-RateLimit-Remaining-Second: 14
Built with