Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.reachedapp.com/llms.txt

Use this file to discover all available pages before exploring further.

Rate Limiting

The API enforces a rate limit of 100 requests per minute per API key. Rate limit information is included in every response via HTTP headers.

Rate Limit Headers

Every API response includes the following headers:
HeaderDescription
X-RateLimit-LimitMaximum requests per window (100)
X-RateLimit-RemainingRequests remaining in current window
X-RateLimit-ResetUnix timestamp when the window resets

Handling Rate Limits

When you exceed the rate limit, the API returns a 429 Too Many Requests response:
{
  "error": {
    "code": "rate_limited",
    "message": "Rate limit exceeded. Max 100 requests per minute."
  }
}

Best Practices

Monitor headers

Check X-RateLimit-Remaining in responses to track your usage before hitting the limit.

Implement backoff

When you receive a 429, wait until the X-RateLimit-Reset timestamp before retrying.

Batch operations

Use the bulk add leads endpoint to add multiple leads in a single request instead of one-by-one.

Cache responses

Cache GET responses locally when data does not change frequently.

Retry Strategy Example

async function apiCallWithRetry(url, options, maxRetries = 3) {
  for (let attempt = 0; attempt < maxRetries; attempt++) {
    const response = await fetch(url, options);

    if (response.status === 429) {
      const resetAt = response.headers.get("X-RateLimit-Reset");
      const waitMs = resetAt
        ? (parseInt(resetAt) * 1000) - Date.now()
        : 60000;
      await new Promise(resolve => setTimeout(resolve, Math.max(waitMs, 1000)));
      continue;
    }

    return response;
  }
  throw new Error("Max retries exceeded");
}