API Reference

Rate Limits

Integrate with the Kantos REST API.

API requests are rate limited to ensure fair usage and platform stability. Limits vary by plan and are applied per API key.

Rate Limits by Plan

PlanRequests/MinuteRequests/Day
Free10010,000
Starter50050,000
Professional1,000100,000
EnterpriseCustomCustom

Response Headers

Every API response includes rate limit information in the headers:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 847
X-RateLimit-Reset: 1705312800
HeaderDescription
X-RateLimit-LimitMaximum requests per minute for your plan
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetUnix timestamp when the rate limit resets

Handling Rate Limits

When you exceed the rate limit, the API returns a 429 Too Many Requests response. Implement exponential backoff to handle this gracefully:

async function fetchWithRetry(url: string, options: RequestInit, maxRetries = 3) {
  for (let attempt = 0; attempt <= maxRetries; attempt++) {
    const response = await fetch(url, options);

    if (response.status !== 429) return response;

    // Exponential backoff: 1s, 2s, 4s
    const delay = Math.pow(2, attempt) * 1000;
    await new Promise(resolve => setTimeout(resolve, delay));
  }
  throw new Error('Rate limit exceeded after retries');
}

Exceeding Limits

Rate limiting does not affect your data. Requests are simply delayed — no data is lost or modified. Wait for the reset window and retry.

Tips for Staying Within Limits

  • Batch requests — combine multiple operations where possible
  • Cache responses — avoid re-fetching data that hasn't changed
  • Use pagination — fetch records in pages rather than all at once
  • Monitor headers — check X-RateLimit-Remaining before sending bursts
  • Use webhooks — receive push notifications instead of polling

Next Steps

    Rate Limits - API Reference | Kantos Docs