Slow API Responses
Why some requests take longer and how to optimize response times.
Response time depends on whether we already have the data. Cached data returns in under a second; a live lookup can take a minute or more. Here's why and how to optimize.
Why some requests are slow
Live lookups vs cache hits
- Cache hit — Returns in under 1 second. The data was already in our cache.
- Live lookup — Often takes 30 seconds or more, and can exceed a minute. We fetch fresh data from the source in real time.
The first request for any profile is always a live lookup. Subsequent requests within the cache window are fast cache hits.
Search endpoints are slower
Person Search and Company Search query large datasets and typically take 5-15 seconds. This is normal. Use pagination wisely — request larger page sizes to minimize the number of search calls.
Extra fields add time
Including optional fields (personal_email=include, personal_contact_number=include) adds verification steps that increase response time by 1-5 seconds each.
How to optimize
Use caching
use_cache=if-present&fallback_to_cache=on-errorThis serves cached data when available (fast) and falls back gracefully if a live lookup fails.
Set timeouts
Always set a timeout on your HTTP client, and make it long enough for a live lookup. We recommend 90 seconds for v2 endpoints and 300 seconds for v3 endpoints (see Errors & Timeouts). A shorter timeout cuts off requests that would have succeeded.
const controller = new AbortController();
setTimeout(() => controller.abort(), 90000); // 90s for v2; use 300000 for v3
const response = await fetch(url, {
headers: { Authorization: `Bearer ${API_KEY}` },
signal: controller.signal
});Batch with parallelism
If you're enriching multiple profiles, run requests in parallel (up to your rate limit). Don't make them sequentially.
Pre-warm your cache
If you know which profiles you'll need, enrich them ahead of time. The cached results will be available instantly when your users need them.