Rate Limits¶
DeepTagger API enforces rate limits to ensure fair usage and system stability.
Rate Limit Tiers¶
Limits vary by plan:
Plan | Requests per Minute | Requests per Day |
---|---|---|
Free | 10 | 100 |
Pro | 60 | 1,000 |
Enterprise | Custom | Custom |
Check your current plan in the DeepTagger dashboard.
Rate Limit Headers¶
API responses include rate limit headers:
X-RateLimit-Limit
: Total allowed requestsX-RateLimit-Remaining
: Remaining requests in current windowX-RateLimit-Reset
: Unix timestamp when limit resets
Exceeding Rate Limits¶
When you exceed the limit, you'll receive:
HTTP 429 Too Many Requests
{
"status": "error",
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Try again in 60 seconds.",
"retry_after": 60
}
}
Best Practices¶
1. Respect the Headers¶
Check X-RateLimit-Remaining
before making requests:
if int(response.headers.get('X-RateLimit-Remaining', 0)) < 5:
# Approaching limit, slow down
time.sleep(1)
2. Implement Exponential Backoff¶
import time
def extract_with_retry(url, headers, data, max_retries=3):
for i in range(max_retries):
try:
response = requests.post(url, headers=headers, data=data)
if response.status_code == 429:
wait = 2 ** i # 1s, 2s, 4s, 8s...
time.sleep(wait)
continue
return response.json()
except Exception as e:
if i == max_retries - 1:
raise
return None
3. Batch Processing¶
Add delays between requests:
4. Queue Management¶
For high-volume, use a queue system:
- Redis Queue (RQ)
- Celery
- Bull (Node.js)
5. Upgrade Your Plan¶
If you consistently hit limits, upgrade to a higher tier.
Monitoring Usage¶
Track API usage in your DeepTagger dashboard:
- Go to Settings → API Usage
- View requests per day/minute
- See rate limit history
- Set up alerts for high usage
Burst Limits¶
Short bursts above the per-minute limit are allowed, but sustained high rates will be throttled.
Contact for Custom Limits¶
Enterprise customers can request custom rate limits:
Email: support@deeptagger.com