Rate Limits
Rate limits control how many requests you can make per time period.
| Plan | Requests/Minute | Requests/Hour |
|---|
| Free | 10 | 100 |
| Starter | 60 | 1,000 |
| Pro | 300 | 10,000 |
| Enterprise | Custom | Custom |
Rate limits reset at the start of each minute/hour window.
Monthly Quotas
Quotas limit total captures per billing period.
| Plan | Monthly Captures |
|---|
| Free | 100 |
| Starter | 5,000 |
| Pro | 50,000 |
| Enterprise | Unlimited |
Rate limit info is included in response headers:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1703001260
| Header | Description |
|---|
X-RateLimit-Limit | Max requests per window |
X-RateLimit-Remaining | Remaining requests |
X-RateLimit-Reset | Unix timestamp when limit resets |
Handling Rate Limits
When rate limited, you receive a 429 response:
{
"success": false,
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests. Please slow down."
}
}
Best Practices
- Check headers - Monitor remaining requests
- Implement backoff - Wait before retrying
- Queue requests - Spread requests over time
- Use caching - Avoid duplicate requests
Retry Example
async function captureWithRateLimit(params) {
const response = await fetch('https://api.snapopa.com/capture', {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify(params),
});
if (response.status === 429) {
const resetTime = response.headers.get('X-RateLimit-Reset');
const waitMs = (resetTime * 1000) - Date.now();
await new Promise(r => setTimeout(r, Math.max(waitMs, 1000)));
return captureWithRateLimit(params); // Retry
}
return response.json();
}
Quota Management
Monitor quota usage in your Dashboard.
Quota Response
When quota is exceeded:
{
"success": false,
"error": {
"code": "QUOTA_EXCEEDED",
"message": "Monthly capture quota exceeded"
}
}
Tips to Reduce Usage
- Enable caching - Reuse captures for identical requests
- Batch requests - Plan captures efficiently
- Review history - Remove unnecessary captures
- Upgrade plan - Get more quota if needed
Enterprise Limits
Need higher limits? Contact us for custom enterprise plans with:
- Unlimited monthly captures
- Custom rate limits
- Dedicated infrastructure
- Priority support