Skip to main content

Rate Limiting

Understand Status Check's rate limits and how to work with them effectively.

Rate Limits

All API keys are subject to the following rate limits:

  • 60 requests per minute
  • 1,000 requests per hour

Rate Limit Headers

Each API response includes rate limit information in the headers:

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

Header Descriptions:

  • X-RateLimit-Limit: Maximum requests allowed in the current window
  • X-RateLimit-Remaining: Number of requests remaining
  • X-RateLimit-Reset: Unix timestamp when the limit resets

Rate Limit Exceeded

When you exceed the rate limit, you'll receive:

Error Response:

{
"error": "Rate limit exceeded",
"message": "Too many requests. Please try again later.",
"retry_after": 60
}

HTTP Status: 429 Too Many Requests

Best Practices

1. Implement Exponential Backoff

When you receive a 429 response, implement exponential backoff:

async function validateWithBackoff(domain, retries = 3) {
for (let i = 0; i < retries; i++) {
try {
const response = await fetch('https://api.status-check.io/v1/check', {
method: 'POST',
headers: {
'X-API-Key': apiKey,
'Content-Type': 'application/json'
},
body: JSON.stringify({ domain })
});

if (response.status === 429) {
const retryAfter = response.headers.get('retry-after') || Math.pow(2, i);
await new Promise(resolve => setTimeout(resolve, retryAfter * 1000));
continue;
}

return await response.json();
} catch (error) {
if (i === retries - 1) throw error;
}
}
}

2. Use Batch Endpoints

For validating multiple domains, use the batch endpoint instead of individual requests:

curl -X POST https://api.status-check.io/v1/batch \
-H "X-API-Key: sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"domains": ["example.com", "acme.org", "test.io"]
}'

See Batch Processing for more details.

3. Cache Results

Cache validation results to avoid redundant API calls:

const cache = new Map();
const CACHE_TTL = 3600000; // 1 hour

async function getCachedValidation(domain) {
const cached = cache.get(domain);
if (cached && Date.now() - cached.timestamp < CACHE_TTL) {
return cached.result;
}

const result = await validateDomain(domain);
cache.set(domain, { result, timestamp: Date.now() });
return result;
}

4. Distribute Requests

Spread requests over time instead of bursts:

async function validateDomains(domains) {
const results = [];
const delay = 1100; // Just over 1 second (60/min = 1 per second)

for (const domain of domains) {
results.push(await validateDomain(domain));
await new Promise(resolve => setTimeout(resolve, delay));
}

return results;
}

5. Monitor Rate Limit Headers

Track remaining requests to avoid hitting limits:

async function smartValidate(domain) {
const response = await fetch('https://api.status-check.io/v1/check', {
method: 'POST',
headers: {
'X-API-Key': apiKey,
'Content-Type': 'application/json'
},
body: JSON.stringify({ domain })
});

const remaining = parseInt(response.headers.get('X-RateLimit-Remaining'));

if (remaining < 5) {
console.warn('Rate limit nearly exceeded. Slowing down...');
await new Promise(resolve => setTimeout(resolve, 5000));
}

return await response.json();
}

Batch Processing Limits

Batch operations have separate limits:

  • Maximum batch size: 10,000 items
  • Concurrent batches: 3 per account
  • Daily limit: 100,000 validations

Increasing Rate Limits

Need higher rate limits for your use case?

Contact support@status-check.io to discuss:

  • Your use case and volume needs
  • Custom rate limits for enterprise customers
  • Dedicated infrastructure options

Next Steps

Support

Questions about rate limits? Contact support@status-check.io