API & Developers
4 min read

Rate Limits and Best Practices

Optimize your API usage

Rate Limits and Best Practices

Build reliable integrations that respect rate limits.

Current Limits

PlanRequests/MinRequests/Day
Growth30500
Pro1205,000

Rate Limit Headers

Every response includes:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 42
X-RateLimit-Reset: 1699999999

Best Practices

1. Implement Retry Logic

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

2. Use Caching

  • Cache read-heavy data locally
  • Use ETags for cache validation
  • Implement TTL-based expiration
  • 3. Batch Requests

    Instead of:

    GET /leads/1
    GET /leads/2
    GET /leads/3

    Use:

    GET /leads?ids=1,2,3

    4. Use Webhooks

    Instead of polling, subscribe to webhooks for real-time updates.

    Monitoring Your Usage

    View usage in Settings → API Keys → View Usage

    Set up alerts when approaching limits.

    Was this article helpful?

    Related Articles

    APIrate limitsbest practicesoptimization