Troubleshooting
4 min read

Rate Limit Exceeded Solutions

Handle API rate limiting gracefully

Rate Limit Exceeded Solutions

Best practices for handling rate limits.

Understanding Rate Limits

Default limits:

  • Per minute: 60 requests
  • Per day: 1,000 requests
  • Headers returned:

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

    Handling 429 Responses

    When you receive HTTP 429:

    async function makeRequest() {
      const response = await fetch(url, options);
      
      if (response.status === 429) {
        const retryAfter = response.headers.get('Retry-After') || 60;
        await sleep(retryAfter * 1000);
        return makeRequest(); // Retry
      }
      
      return response;
    }

    Best Practices

  • Implement exponential backoff
  • - First retry: 1 second

    - Second retry: 2 seconds

    - Third retry: 4 seconds

  • Cache responses
  • - Store lead data locally

    - Only fetch when needed

    - Use ETags for cache validation

  • Batch operations
  • - Combine multiple requests

    - Use bulk endpoints when available

  • Monitor usage
  • - Track requests per endpoint

    - Set up alerts at 80% usage

    Increasing Limits

    For higher limits:

  • Upgrade to Pro plan (10x limits)
  • Contact support for custom limits
  • Apply for partner program
  • Endpoint-Specific Limits

    EndpointPer MinutePer Day
    /leads601,000
    /deals601,000
    /search30500
    /enrich10100

    Was this article helpful?

    Related Articles

    rate limitAPIerrors429