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
    Starter30500
    Growth601,000
    Pro1205,000
    EnterpriseCustomCustom

    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

  1. Cache read-heavy data locally
  2. Use ETags for cache validation
  3. Implement TTL-based expiration
  4. 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

    API
    rate limits
    best practices
    optimization