Skip to main content

Query API

The Query API allows you to retrieve data from your Mixpanel reports programmatically. Query the same data you see in the Mixpanel UI to build custom dashboards, exports, and integrations.

Base URL

For EU data residency: https://eu.mixpanel.com/api/query For India data residency: https://in.mixpanel.com/api/query

Authentication

Use Service Account credentials with HTTP Basic Auth:

Rate Limits

The Query API has strict rate limits:
  • 60 queries per hour
  • 5 concurrent queries maximum
  • 3 queries per second
Exceeding these limits returns a 429 Too Many Requests error.

Available Endpoints

Insights

Query saved Insights reports to get event counts and trends. View Insights Documentation →

Funnels

Retrieve funnel analysis data including conversion rates and drop-off points. View Funnels Documentation →

Retention

Query retention data for cohort and frequency analysis. View Retention Documentation →

Cohorts

List cohorts and retrieve cohort membership information. View Cohorts Documentation →

Common Parameters

Most Query API endpoints accept these common parameters:
integer
required
Your Mixpanel project ID
integer
The workspace ID (optional, for workspace-specific queries)
string
Start date in YYYY-MM-DD format
string
End date in YYYY-MM-DD format

Response Format

All Query API responses follow a consistent structure:

Best Practices

Since the Query API has low rate limits, cache results on your side:
Query saved reports (Insights, Funnels) rather than building queries from scratch. This ensures consistency with the UI and better performance.
For large exports or heavy queries, schedule them during off-peak hours to minimize impact on rate limits.
Track your query usage to avoid hitting rate limits:

Error Handling

Finding Report IDs

Insights Report ID (bookmark_id)

  1. Open your Insights report in Mixpanel
  2. Look at the URL:
  3. The BOOKMARK_ID is the number after report-

Funnel ID

  1. Open your Funnel report
  2. Use the List Funnels endpoint to get all funnel IDs:

Workspace ID

  1. Open any report in your workspace
  2. Check the URL for the workspace ID:

Common Use Cases

Custom Dashboard

Automated Reports

Next Steps

Insights

Query event trends and metrics

Funnels

Analyze conversion funnels

Retention

Measure user retention

Cohorts

Work with user cohorts