Rate limit tiers
PostHog applies different rate limits based on the endpoint type:Standard API endpoints
Applies to most read and write operations:ClickHouse query endpoints
More aggressive limits for analytics queries that hit the database:
Affected endpoints:
/api/projects/{id}/insights//api/projects/{id}/events//api/projects/{id}/persons//api/projects/{id}/sessions/- Other analytics and data query endpoints
HogQL query endpoints
Custom rate limits for HogQL queries:Teams can configure custom HogQL query rate limits. Contact support to adjust your team’s limit if you need higher throughput.
Specific endpoint limits
Certain endpoints have specialized rate limits:Unlimited endpoints
These endpoints are not rate limited:/decide/- Feature flag evaluation/capture/- Event ingestion/batch/- Batch event ingestion
Rate limit headers
API responses include headers to track your rate limit status:Checking rate limits
You can check your current rate limit status without consuming quota by inspecting the headers:Rate limit exceeded
When you exceed a rate limit, the API returns a429 Too Many Requests response:
Retry-After header indicating when you can retry:
Handling rate limits
Best practices
1. Implement exponential backoff
When you hit a rate limit, wait before retrying. Increase wait time with each subsequent failure:2. Batch requests when possible
Instead of making multiple individual requests, use batch endpoints:3. Cache responses
Cache API responses to reduce request volume:4. Monitor your usage
Track rate limit headers to stay under limits:5. Use webhooks for real-time data
Instead of polling the API, use webhooks to receive updates:Team-specific rate limits
PostHog supports custom rate limits for HogQL queries on a per-team basis. These are stored in the database and cached for performance.Configuring custom limits
Custom limits are set via theapi_query_rate_limit field on your team. Contact PostHog support to configure:
Custom rate limits override the default 120 requests/hour limit for HogQL queries.
Increasing your rate limits
If you consistently hit rate limits:- Optimize your integration - Use the best practices above
- Review your query patterns - Identify unnecessary requests
- Contact support - Enterprise customers can request higher limits
- Your use case and requirements
- Current request volume and patterns
- Steps you’ve taken to optimize