Rate Limits

Understand rate limits and how to handle them in your application.

Limits by Plan

PlanRequests/MinuteRequests/Month
Starter (Free)601,000
Pro30050,000
EnterpriseCustomUnlimited

Rate Limit Headers

Every API response includes headers to help you track your usage:

HeaderDescription
X-RateLimit-LimitMaximum requests per minute
X-RateLimit-RemainingRequests remaining in current window
X-RateLimit-ResetUnix timestamp when the limit resets

Example Response Headers

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1705595400

Handling Rate Limit Errors

When you exceed the rate limit, the API returns a 429 status code:

429-response.jsonjson
{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Please wait before making more requests.",
"status": 429
}
}

Best Practices

Check headers proactively

Monitor X-RateLimit-Remaining and slow down before hitting limits.

Implement exponential backoff

When rate limited, wait progressively longer between retries.

Queue requests

Buffer requests and process them at a controlled rate.

Cache responses

If you're analyzing the same content multiple times, cache the results.

Example: Rate Limit Handler

rate-limiter.tstypescript
class RateLimitedClient {
private remaining = 60;
private resetTime = 0;
async analyze(content: string) {
// Wait if we're out of requests
if (this.remaining === 0) {
const waitTime = this.resetTime - Date.now();
if (waitTime > 0) {
await this.sleep(waitTime);
}
}
const response = await fetch(
"https://api.guardcrow.com/v1/analyze",
{
method: "POST",
headers: {
"X-API-Key": process.env.GUARDCROW_API_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({ content }),
}
);
// Update rate limit tracking
this.remaining = parseInt(
response.headers.get("X-RateLimit-Remaining") || "60"
);
this.resetTime = parseInt(
response.headers.get("X-RateLimit-Reset") || "0"
) * 1000;
if (response.status === 429) {
// Wait for reset and retry
await this.sleep(this.resetTime - Date.now());
return this.analyze(content);
}
return response.json();
}
private sleep(ms: number) {
return new Promise(resolve => setTimeout(resolve, ms));
}
}

Need higher limits?

Upgrade to Pro for 5x more requests, or contact us for Enterprise custom limits.

View Plans