Overview
Rate limits protect the API from abuse and ensure fair usage for all users. agntdata uses request-based rate limiting per workspace.How Rate Limiting Works
Rate limits are applied per workspace with a rolling 60-second window:- Each workspace has a requests-per-minute (RPM) limit based on their plan
- All API keys in a workspace share the same rate limit bucket
- When the limit is exceeded, requests return
429 Too Many Requests
Rate Limit Response
When you exceed rate limits, you’ll receive a429 response:
retryAfter field indicates how many seconds to wait before retrying.
Response Headers
Rate limit information is included in theRetry-After header when limits are exceeded.
Best Practices
Implement Exponential Backoff
Implement Exponential Backoff
When you hit a rate limit, wait and retry with increasing delays:
Space Out Requests
Space Out Requests
Instead of bursting requests, space them out over time to avoid hitting limits.
Cache Responses
Cache Responses
Cache API responses when data doesn’t change frequently:
- Company profiles: Cache for 24 hours
- User profiles: Cache for 1-6 hours
- Posts/content: Cache for 15-60 minutes
Use Bulk Endpoints
Use Bulk Endpoints
When available, use bulk endpoints to fetch multiple items in one request instead of making many individual requests.
Credit Costs
Each API call consumes credits based on the endpoint. Credit costs vary by endpoint complexity and are deducted from your workspace balance. The response includes billing information:Next Steps
Error Handling
Learn how to handle rate limit and other errors.
Billing
Understand credit consumption and pricing.