Skip to main content
PostHog implements rate limiting to ensure fair usage and protect API performance. Rate limits are applied per API key and per team.

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 a 429 Too Many Requests response:
The response includes a 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 the api_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:
  1. Optimize your integration - Use the best practices above
  2. Review your query patterns - Identify unnecessary requests
  3. Contact support - Enterprise customers can request higher limits
When contacting support, include:
  • Your use case and requirements
  • Current request volume and patterns
  • Steps you’ve taken to optimize