Rate Limits
The AeroSelect API limits the number of requests per time window to ensure stable performance for all users.
Limits by Plan
Rate limits apply per API key and are set based on your tenant's subscription plan:
| Plan | Requests/Minute | Requests/Hour | Concurrent Requests |
|---|---|---|---|
| Free | 60 req/min | 1.000 req/h | 5 |
| Pro | 300 req/min | 10.000 req/h | 20 |
| Enterprise | 1.000 req/min | 50.000 req/h | 100 |
Response Headers
Every API response includes headers informing about the current rate limit status:
| Header | Description | Example |
|---|---|---|
| X-RateLimit-Limit | Maximum requests per minute | 300 |
| X-RateLimit-Remaining | Remaining requests in the current window | 247 |
| X-RateLimit-Reset | Unix timestamp when the window resets | 1716825600 |
| Retry-After | Seconds until the next permitted request (only on 429) | 42 |
429 Too Many Requests
When the rate limit is exceeded, the API responds with HTTP 429:
429 Too Many RequestsJSON
HTTP/1.1 429 Too Many Requests
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1716825660
Retry-After: 42
{
"message": "Too Many Requests.",
"errors": {
"rate_limit": ["Rate limit exceeded. Please retry after 42 seconds."]
}
}Retry with Exponential Backoff
Implement exponential backoff to handle rate limit errors gracefully:
retry.jsJavaScript
async function fetchWithRetry(url, options, maxRetries = 3) {
let lastError;
for (let attempt = 0; attempt < maxRetries; attempt++) {
const response = await fetch(url, options);
if (response.status === 429) {
const retryAfter = parseInt(
response.headers.get("Retry-After") ?? "1",
10
);
// Exponential backoff: retryAfter * 2^attempt
const delay = retryAfter * Math.pow(2, attempt) * 1000;
console.log(`Rate limit hit. Retry in ${delay}ms...`);
await new Promise((resolve) => setTimeout(resolve, delay));
lastError = new Error("Rate limit exceeded");
continue;
}
if (!response.ok) {
const error = await response.json();
throw new Error(error.message);
}
return response.json();
}
throw lastError;
}retry.pyPython
import time
import requests
def fetch_with_retry(url, headers, max_retries=3):
for attempt in range(max_retries):
response = requests.get(url, headers=headers)
if response.status_code == 429:
retry_after = int(response.headers.get("Retry-After", 1))
delay = retry_after * (2 ** attempt)
print(f"Rate limit erreicht. Retry in {delay}s...")
time.sleep(delay)
continue
response.raise_for_status()
return response.json()
raise Exception("Max Retries erreicht")Best Practices
- Cache Responses: Store frequently requested data locally (e.g. office list, pipeline stages). This data changes rarely.
- Use Pagination: Only request the pages you need, not all pages at once.
- Webhooks over Polling: Once webhooks are available, use them instead of regular API polling.
- Limit Concurrent Requests: Do not send more concurrent requests than your plan allows.
- Monitor X-RateLimit-Remaining: Proactively throttle your requests when the value drops below 20%.
Enterprise Limits
For enterprise customers with peak load requirements above 1,000 req/min, please contact the AeroSelect sales team for custom limits.