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:

  1. Per minute: 60 requests
  2. Per day: 1,000 requests
  3. 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

  4. Implement exponential backoff
  5. - First retry: 1 second

    - Second retry: 2 seconds

    - Third retry: 4 seconds

  6. Cache responses
  7. - Store lead data locally

    - Only fetch when needed

    - Use ETags for cache validation

  8. Batch operations
  9. - Combine multiple requests

    - Use bulk endpoints when available

  10. Monitor usage
  11. - Track requests per endpoint

    - Set up alerts at 80% usage

    Increasing Limits

    For higher limits:

  12. Upgrade to Pro plan (10x limits)
  13. Contact support for custom limits
  14. Apply for partner program
  15. Endpoint-Specific Limits

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

    Was this article helpful?

    Related Articles

    rate limit
    API
    errors
    429