Rate Limits
Mixpanel enforces rate limits on API endpoints to ensure system stability and fair usage across all customers.Rate Limits by API
Ingestion API
Rate Limit: No hard limit, but 429 errors may be returned during high loadBest Practice: Implement exponential backoff on 429 errors
Rate Limit: No hard limit for reasonable usageRecommendation: Batch events when possible (up to 2000 events per request)
Query API
Rate Limit: 60 queries per hour, 5 concurrent queries maximumPer Second: 3 queries per secondStatus Code: 429 Too Many Requests
/api/query/insights/api/query/funnels/api/query/retention/api/query/segmentation/api/query/cohorts/api/query/engage
Export API
Rate Limit: 60 queries per hour, 3 queries per second, 100 concurrent queries maximumStatus Code: 429 Too Many Requests
Management APIs
Rate Limit: Standard HTTP rate limiting appliesRecommendation: Space out requests, avoid burst traffic
Request Limits
Ingestion Payload Limits
| Endpoint | Max Payload Size | Max Events per Request |
|---|---|---|
/import | 2 MB | 2000 events |
/track | 2 MB | 2000 events |
/engage | 2 MB | 2000 profile updates |
/groups | 2 MB | 2000 group updates |
Query Result Limits
| Endpoint | Default Limit | Max Limit |
|---|---|---|
/export | All events | 100,000 events (with limit param) |
/engage | 1000 profiles | 10,000 profiles |
/segmentation (on parameter) | 60 values | 10,000 values |
Handling Rate Limits
Detecting Rate Limit Errors
When you exceed rate limits, Mixpanel returns a429 Too Many Requests response:
Implementing Exponential Backoff
Best Practices
Batch Your Requests
Batch Your Requests
Instead of sending individual events, batch them into arrays of up to 2000 events per request. This significantly reduces the number of API calls.
Implement Retry Logic
Implement Retry Logic
Always implement exponential backoff retry logic for 429 errors. Start with a 1-second delay and double it with each retry.
Cache Query Results
Cache Query Results
If you’re querying the same data frequently, cache the results on your side instead of making repeated API calls.
Use Webhooks for Real-time Data
Use Webhooks for Real-time Data
For real-time updates, consider using Mixpanel’s webhook features instead of polling the Query API.
Compress Payloads
Compress Payloads
Use gzip compression for large payloads to reduce transfer time and stay within size limits:
Monitor Your Usage
Monitor Your Usage
Track your API usage to identify patterns and optimize before hitting rate limits.
Rate Limit Headers
Mixpanel may include rate limit information in response headers (implementation varies by endpoint):Not all endpoints currently return rate limit headers. Use 429 status codes as the primary indicator.
Increasing Rate Limits
If you have a legitimate need for higher rate limits:- Contact Mixpanel Support
- Describe your use case
- Provide expected traffic patterns
- Enterprise customers may have higher default limits
Common Scenarios
High-Volume Event Ingestion
Problem: Sending millions of events per day Solution:- Batch events in groups of 2000
- Use multiple threads/workers with proper backoff
- Consider using Data Pipelines for bulk imports
Frequent Dashboard Updates
Problem: Polling Query API every minute for dashboard data Solution:- Cache results and refresh less frequently
- Use longer time windows to reduce query complexity
- Consider using Mixpanel’s embedding features
Bulk Data Export
Problem: Exporting large date ranges frequently Solution:- Use Data Pipelines for scheduled exports
- Limit export date ranges to reduce query time
- Export during off-peak hours