Skip to content

Rate limits in Truto API ​

We standardize and expose rate limit information from various underlying APIs to ensure consistent and predictable usage tracking for our consumers. We normalize the following headers across all endpoints:

  • ratelimit-limit:

    • Indicates the maximum number of requests allowed within the current rate limit window. It represents the total quota allocated by the API you are interacting with.
  • ratelimit-remaining:

    • Reflects the number of requests remaining within the current rate limit window. This header updates after each API call, helping you track your remaining quota in real-time.
  • ratelimit-reset:

    • Reflects the number of seconds when the current rate limit window will reset. After this time, your request quota will be refreshed, and the ratelimit-remaining will return to its maximum value.

By normalizing the rate limit information with these headers, we ensure that regardless of the API provider's native rate-limiting policies, you always receive a standardized rate limit response. This allows for easier integration and rate limit management, ensuring you can efficiently monitor and control your API consumption while avoiding unexpected rate limit breaches and service interruptions.

Example ​

Here's an example of how these headers are returned in the response when the Unified API is called for the HubSpot integration:

json
{
    "ratelimit-limit": "110;w=10",
    "ratelimit-remaining": 109,
    "ratelimit-reset": 60
}
  • ratelimit-limit: This indicates that the maximum number of requests allowed within the current rate limit window is 110, with a rate limit window duration of 10 seconds (w=10).
  • ratelimit-remaining: This shows that 109 requests are still available within the current rate limit window.
  • ratelimit-reset: This indicates that the current rate limit window will reset in 60 seconds.

Note: Rate limit headers are included in the response only if the underlying API provider supports rate limiting. If the provider does not enforce rate limits, these headers will be absent. Additionally, the rate limit window (w=10) is specific to certain APIs and may not be available depending on the rate limit configurations of the underlying API provider.

Truto's rate limiting mechanism has been implemented based on this archive RateLimit Header Fields for HTTP