Skip to main content

Overview

The ZKScore API implements rate limiting to ensure fair usage and system stability. This guide explains rate limits and how to handle them.

Rate Limits

API Endpoints

TierRequests/MinuteRequests/Day
Free6010,000
Developer600100,000
Pro6,0001,000,000
EnterpriseCustomCustom

Handling Rate Limits

async function fetchWithRetry(url, options, maxRetries = 3) {
  for (let i = 0; i < maxRetries; i++) {
    try {
      const response = await fetch(url, options);
      
      if (response.status === 429) {
        const retryAfter = response.headers.get('Retry-After') || 60;
        await new Promise(resolve => setTimeout(resolve, retryAfter * 1000));
        continue;
      }
      
      return response;
    } catch (error) {
      if (i === maxRetries - 1) throw error;
    }
  }
}

Best Practices

  1. Caching: Cache responses to reduce requests
  2. Batch Operations: Use batch endpoints
  3. Exponential Backoff: Implement backoff strategy
  4. Monitor Usage: Track your API usage
  5. Upgrade Plan: Upgrade if hitting limits