Unstatus API

Rate Limiting

API rate limits and how to handle them.

The API enforces per-key rate limits using a sliding window.

Limits

TierLimitWindow
Free100 requests1 hour
Pro1,000 requests1 hour

Response Headers

Every response includes rate limit headers:

HeaderDescription
X-RateLimit-LimitMaximum requests allowed in the window
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetUnix timestamp when the window resets
Example response headers
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 847
X-RateLimit-Reset: 1714636800

Handling 429 Responses

When the limit is exceeded, the API returns 429 Too Many Requests:

{
  "error": {
    "code": "RATE_LIMITED",
    "message": "Rate limit exceeded. Try again in 342 seconds."
  }
}

The response includes a Retry-After header with the number of seconds to wait.

Retry logic
async function apiCall(url: string, apiKey: string) {
  const res = await fetch(url, {
    headers: { Authorization: `Bearer ${apiKey}` },
  });

  if (res.status === 429) {
    const retryAfter = Number(res.headers.get("Retry-After") ?? 60);
    await new Promise((r) => setTimeout(r, retryAfter * 1000));
    return apiCall(url, apiKey);
  }

  return res.json();
}

On this page