Rate limits are enforced per API key to ensure fair usage of the API and maintain service stability.

All rate limits are calculated on a per-minute basis and reset automatically at the start of each window.

Rate Limit Overview

Default Limits

  • 60 requests per minute per API key
  • Batch operations count as multiple requests
  • Rolling window reset

Batch Operations

Each item in a batch counts as one request:

  • Uploading 10 files = 10 requests
  • Processing 5 statements = 5 requests

Rate Limit Headers

The API includes rate limit information in the response headers:

Rate Limit Headers
object

Handling Rate Limits

  1. Monitor Headers Check the X-RateLimit-Remaining header to track your remaining requests.

  2. Implement Backoff When you receive a rate limit error, wait until the reset time before retrying:

    {
      "success": false,
      "error": {
        "code": "RATE_LIMIT_EXCEEDED",
        "message": "Too many requests",
        "details": "Please wait before making more requests"
      }
    }
    
  3. Optimize Requests Use batch operations when possible to maximize your rate limit usage.

Best Practices

Implement Exponential Backoff

When rate limited, use exponential backoff to prevent overwhelming the API:

function sleep(ms) {
  return new Promise(resolve => setTimeout(resolve, ms));
}

async function makeRequest(retries = 3) {
  for (let i = 0; i < retries; i++) {
    try {
      return await apiRequest();
    } catch (error) {
      if (error.code !== 'RATE_LIMIT_EXCEEDED') throw error;
      await sleep(Math.pow(2, i) * 1000);
    }
  }
}

Batch Processing

Group multiple items into single requests:

// Instead of multiple single uploads
const files = ['doc1.pdf', 'doc2.pdf', 'doc3.pdf'];
const formData = new FormData();
files.forEach(file => formData.append('files', file));

// Single batch upload
await api.upload(formData);

Need Higher Limits?

Enterprise Plans

For higher rate limits and dedicated support, contact our sales team.

Enterprise plans include:

  • Custom rate limits
  • Priority support
  • Dedicated account manager