Rate Limit Tiers
| Scope | Sustained Rate | Burst Allowance |
|---|---|---|
API endpoints (/api/v1/*) | 10 req/s | 20 requests |
| General requests | 20 req/s | 40 requests |
How Limits Work
Xquik uses a token bucket algorithm:- Each API key has a bucket that fills at the sustained rate (e.g. 10 tokens/second for API endpoints)
- The bucket holds a maximum of burst tokens (e.g. 20 for API endpoints)
- Each request consumes 1 token
- When the bucket is empty, requests return
429 Too Many Requests
- You can send 20 requests instantly (burst)
- After that, you can send 10 requests per second (sustained)
- If you stop sending requests, the bucket refills at 10 tokens per second
Response Headers
When you exceed the rate limit, the response includes:| Header | Description |
|---|---|
Retry-After | Seconds to wait before retrying |
Retry-After header. Sending requests before the window resets may extend your cooldown.
Client-Side Rate Limiter
Prevent hitting server-side limits by implementing a client-side token bucket. This is more efficient than relying on 429 responses and backoff.Best Practices
Batch operations where possible
Batch operations where possible
Fetch events in larger pages (
limit=100) instead of many small requests. 1 request for 100 events is better than 10 requests for 10 events each.Use webhooks instead of polling
Use webhooks instead of polling
Webhooks deliver events in real time with zero polling overhead. You only receive traffic when something happens. See the webhooks overview.
Cache responses client-side
Cache responses client-side
Monitor and webhook configurations change infrequently. Cache
GET responses for list endpoints and invalidate only after mutations (create, update, delete).Implement exponential backoff
Implement exponential backoff
When you receive a 429, wait for the
Retry-After duration. If the retry also fails, double the wait time. See the error handling guide for complete retry implementations.Spread requests evenly
Spread requests evenly
Avoid sending all requests in a burst at the start of each interval. Spread them evenly across the window to maintain a steady token refill rate.