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:
Headers returned:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1699999999Handling 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
- First retry: 1 second
- Second retry: 2 seconds
- Third retry: 4 seconds
- Store lead data locally
- Only fetch when needed
- Use ETags for cache validation
- Combine multiple requests
- Use bulk endpoints when available
- Track requests per endpoint
- Set up alerts at 80% usage
Increasing Limits
For higher limits:
Endpoint-Specific Limits
| Endpoint | Per Minute | Per Day |
|---|---|---|
| /leads | 60 | 1,000 |
| /deals | 60 | 1,000 |
| /search | 30 | 500 |
| /enrich | 10 | 100 |
Was this article helpful?
Related Articles
rate limit
API
errors
429