Query API
Insights
Query saved Insights reports
GET
Insights
Query Insights
Retrieve data from your saved Insights reports programmatically.Query Saved Report
integer
required
Your Mixpanel project ID
integer
The workspace ID containing the report
integer
required
The ID of your Insights report. Can be found from the URL:
https://mixpanel.com/project/<PROJECT_ID>/view/<WORKSPACE_ID>/app/boards#id=12345&editor-card-id="report-<BOOKMARK_ID>"Example Request
Response
string
Timestamp when the query was computed
object
The date range of the queried data
array
Array explaining the nested keys in the
series objectobject
Maps event names to date/value pairs. Each key is an event name, and the value is an object with dates as keys and event counts as values.
Use Cases
Daily Metrics Dashboard
Trend Analysis
Best Practices
Create dedicated reports for API queries
Create dedicated reports for API queries
Instead of querying general reports, create specific Insights reports optimized for API consumption with:
- Relevant date ranges
- Specific events needed
- Appropriate filters
Cache results appropriately
Cache results appropriately
Insights data doesn’t change frequently, so cache results:
Handle missing data gracefully
Handle missing data gracefully
Some dates might not have data:
Insights