Docs / Rate Limits

Rate Limits

Understanding API rate limits and quotas

Rate Limits

APIMW implements rate limiting to ensure fair usage and platform stability.

Rate Limit Tiers

Plan Requests/Minute Requests/Hour Requests/Day
Free 10 100 1,000
Starter 60 1,000 10,000
Professional 300 10,000 100,000
Enterprise Custom Custom Custom

Rate Limit Headers

Every API response includes rate limit information:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640995200
Header Description
X-RateLimit-Limit Maximum requests allowed
X-RateLimit-Remaining Requests remaining in window
X-RateLimit-Reset Unix timestamp when limit resets

Rate Limit Exceeded

When you exceed the rate limit, you'll receive a 429 Too Many Requests response:

{
  "success": false,
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Rate limit exceeded. Please retry after 60 seconds.",
    "retry_after": 60
  }
}

Best Practices

1. Implement Exponential Backoff

async function apiCallWithRetry(fn, maxRetries = 3) {
  for (let i = 0; i < maxRetries; i++) {
    try {
      return await fn();
    } catch (error) {
      if (error.status === 429) {
        const delay = Math.pow(2, i) * 1000;
        await sleep(delay);
      } else {
        throw error;
      }
    }
  }
}

2. Monitor Rate Limit Headers

Check remaining requests before making calls:

if (response.headers['x-ratelimit-remaining'] < 10) {
  // Slow down requests
}

3. Use Webhooks

Instead of polling for status updates, use webhooks to receive real-time notifications.

4. Batch Operations

When possible, use batch endpoints to reduce the number of API calls.

Increasing Limits

Need higher limits? Contact us to discuss Enterprise plans with custom rate limits.