mixpanel
v1.0.2Analyze user behavior with funnels, retention, cohorts, and event segmentation
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_insights_report Get Insights Report
Retrieve data from a saved Insights report in your Mixpanel project. Subject to a rate limit of 60 queries per hour with a maximum of 5 concurrent queries.
| Parameter | Type | Description |
|---|---|---|
bookmark_id * | integer | The unique identifier of your Insights report, found in the Mixpanel URL path after 'report-' in the editor-card-id parameter. |
project_id * | integer | The Mixpanel project ID associated with your account. |
get_funnel_data Get Funnel Data
Retrieve funnel conversion data for a specified date range and funnel. Results can be segmented by user properties and filtered by event criteria. Subject to a rate limit of 60 queries per hour with a maximum of 5 concurrent queries.
| Parameter | Type | Description |
|---|---|---|
from_date * | string | The start date for the query in YYYY-MM-DD format (inclusive). |
funnel_id * | integer | The ID of the funnel to retrieve data for. |
project_id * | integer | The Mixpanel project ID that contains the funnel. |
to_date * | string | The end date for the query in YYYY-MM-DD format (inclusive). |
length | integer | The time window for users to complete the funnel from when they trigger the first step. Maximum allowed is 90 days. If not specified, uses the value saved in the UI for this funnel. |
length_unit | string | The unit of time for the length parameter: day, hour, minute, or second. If not specified, uses the value saved in the UI for this funnel. |
limit | integer | The maximum number of top property values to return when segmenting. Defaults to 255 if not specified; maximum allowed is 10,000. This parameter has no effect if the 'on' parameter is not used. |
on | string | A property expression to segment funnel results by. When specified, results are grouped by the values of this property. |
where | string | An expression to filter which events are included in the funnel analysis. Only events matching this filter are considered. |
list_saved_funnels List Saved Funnels
Retrieve a list of all saved funnels in your Mixpanel project, including their names and unique funnel identifiers.
| Parameter | Type | Description |
|---|---|---|
project_id * | integer | The Mixpanel project ID associated with the funnels you want to retrieve. |
get_retention_report Get Retention Report
Retrieve a retention analysis report for a Mixpanel project, measuring how users return to your product over time. Supports both first-time user retention (birth) and recurring user retention (compounded) with optional event and property filtering.
| Parameter | Type | Description |
|---|---|---|
from_date * | string | Start date for the retention analysis period in YYYY-MM-DD format (e.g., 2024-01-15). |
project_id * | integer | The Mixpanel project ID to query retention data for. |
to_date * | string | End date for the retention analysis period in YYYY-MM-DD format (e.g., 2024-01-31). |
event | string | Optional event name to analyze retention for (e.g., 'Viewed report'). If omitted, retention is calculated across all events. |
interval_count | integer | Number of time intervals to return in the retention analysis; defaults to 1. The report includes a '0th' interval for events occurring within the first interval period. |
limit | integer | Maximum number of segmentation values to return in results. Only used when the 'on' parameter is specified for property-based segmentation. |
on | string | Optional property expression to segment the returning event by (e.g., properties["plan_type"]). Only applies when segmenting retention results. |
retention_type | string | Retention measurement type: 'birth' tracks first-time user retention, while 'compounded' tracks recurring retention. Defaults to 'birth' if not specified. |
unbounded_retention | boolean | When enabled, retention values accumulate from right to left, so each interval includes users retained on that day and all subsequent days. Defaults to false for standard interval-by-interval counting… |
where | string | Optional filter expression to segment the initial cohort by user properties (e.g., properties["$os"]=="Linux"). Uses Mixpanel expression syntax. |
get_retention_frequency_report Get Retention Frequency Report
Retrieve a frequency report analyzing user retention and addiction patterns over a specified date range. Returns the distribution of returning user actions segmented by time unit and optional properties.
| Parameter | Type | Description |
|---|---|---|
addiction_unit * | string | The granularity at which to measure action frequency: hour or day. |
from_date * | string | Start date for the analysis period in YYYY-MM-DD format (inclusive). |
project_id * | integer | The Mixpanel project ID to query against. |
to_date * | string | End date for the analysis period in YYYY-MM-DD format (inclusive). |
unit * | string | The time period granularity for the overall report: day, week, or month. |
event | string | The specific event name to analyze for returning user counts. If omitted, analyzes all events. |
limit | integer | Maximum number of segmentation values to return when segmenting by the 'on' property. Has no effect if 'on' is not specified. |
on | string | A property expression to segment results by. When specified, the report breaks down metrics by distinct values of this property. Supports nested properties as documented in segmentation expressions. |
where | string | A filter expression to narrow the returning events analyzed. Supports property-based conditions and logical operators as documented in segmentation expressions. |
get_segmented_event_data Get Segmented Event Data
Retrieve event data segmented and filtered by properties from your Mixpanel project. Results can be broken down by a specific property dimension and filtered by event criteria.
| Parameter | Type | Description |
|---|---|---|
event * | string | The name of the event to query. Specify a single event name, not multiple events. |
from_date * | string | Query start date in YYYY-MM-DD format (inclusive). |
project_id * | integer | Your Mixpanel project identifier (numeric ID). |
to_date * | string | Query end date in YYYY-MM-DD format (inclusive). |
format | string | Optional output format. Set to 'csv' for comma-separated values; omit for default JSON format. |
limit | integer | Maximum number of top property values to return (defaults to 60, maximum 10,000). Only applies when segmenting with the 'on' parameter. |
on | string | Optional property expression to segment results by. Omit to get aggregate counts without segmentation. See segmentation expressions documentation for syntax. |
where | string | Optional filter expression to narrow events by property values. See segmentation expressions documentation for syntax. |
get_event_segmentation_by_numeric_buckets Get Event Segmentation by Numeric Buckets
Retrieve event data segmented into numeric buckets based on a numeric property value. Results are filtered by the specified date range and optional event properties.
| Parameter | Type | Description |
|---|---|---|
event * | string | The name of the event to analyze. Specify a single event name, not multiple events. |
from_date * | string | The start date for the query range in YYYY-MM-DD format (inclusive). |
on * | string | A numeric property expression to segment the event data into buckets. The property must contain numeric values. |
project_id * | integer | The Mixpanel project ID to query. |
to_date * | string | The end date for the query range in YYYY-MM-DD format (inclusive). |
where | string | An optional property expression to filter which events are included in the results. Only events matching this filter will be segmented. |
get_event_sum_by_time Get Event Sum by Time
Calculate the sum of a numeric expression for a specified event aggregated over time. Results are broken down by unit time periods within the requested date range.
| Parameter | Type | Description |
|---|---|---|
event * | string | The name of the event to analyze. Provide a single event name, not multiple events. |
from_date * | string | The start date for the query in YYYY-MM-DD format (inclusive). |
on * | string | A numeric expression to sum for each time unit. Non-numeric expression results are treated as 0.0. Use Mixpanel expression syntax to reference event properties and perform calculations. |
project_id * | integer | The Mixpanel project ID to query. |
to_date * | string | The end date for the query in YYYY-MM-DD format (inclusive). |
where | string | Optional filter expression to narrow results to specific events. Use Mixpanel expression syntax to define conditions on event properties. |
get_event_average Get Event Average
Calculate the average value of a numeric expression across events within a specified date range. Results are aggregated per unit time for trend analysis.
| Parameter | Type | Description |
|---|---|---|
event * | string | The name of the event to analyze. Provide a single event name, not multiple events. |
from_date * | string | The start date for the query range in YYYY-MM-DD format (inclusive). |
on * | string | A numeric expression to average per unit time. Non-numeric expression results are treated as 0.0. Refer to the expressions documentation for valid syntax. |
project_id * | integer | The Mixpanel project ID to query. |
to_date * | string | The end date for the query range in YYYY-MM-DD format (inclusive). |
where | string | Optional filter expression to narrow events by specific criteria. Refer to the expressions documentation for valid syntax. |
get_activity_stream_for_users Get Activity Stream for Users
Retrieve the activity feed for specified users within a date range. Subject to a rate limit of 60 queries per hour with a maximum of 5 concurrent queries.
| Parameter | Type | Description |
|---|---|---|
distinct_ids * | string | A JSON array (as a string) of distinct user IDs for which to return activity feeds. Each ID should be a valid distinct_id from your Mixpanel project. |
from_date * | string | The start date for the activity query in YYYY-MM-DD format (inclusive). |
project_id * | integer | The Mixpanel project ID that identifies which project to query. |
to_date * | string | The end date for the activity query in YYYY-MM-DD format (inclusive). |
list_cohorts List Cohorts
Retrieve all saved cohorts in a Mixpanel project, including metadata such as name, ID, user count, description, creation date, and visibility settings. Use the /engage endpoint with filter_by_cohort to retrieve the actual users within a cohort.
| Parameter | Type | Description |
|---|---|---|
project_id * | integer | The numeric identifier for your Mixpanel project. |
query_profiles Query Profiles
Query user or group profiles from a Mixpanel project with optional filtering, property selection, and cohort-based retrieval to retrieve detailed profile data.
| Parameter | Type | Description |
|---|---|---|
project_id * | integer | The Mixpanel project ID to query profiles from. Required to identify which project's data to access. |
as_of_timestamp | integer | A Unix timestamp specifying the point-in-time snapshot for profile data. Required when exporting more than 1,000 profiles with behavior filters to avoid caching errors. |
data_group_id | string | The group key ID for querying group profiles instead of user profiles. Required when analyzing group-level analytics data rather than individual users. |
distinct_ids | string | A JSON array of distinct IDs to retrieve profiles for. When provided, limits results to only these specific user or group identifiers. |
filter_by_cohort | string | A JSON object with an `id` key containing a cohort ID to filter profiles by cohort membership. Mutually exclusive with behavior-based filtering. |
include_all_users | boolean | When using cohort filtering, set to `true` (default) to include all distinct IDs even without profiles, or `false` to return only IDs with existing profiles. |
output_properties | array | A JSON array of property names to include in the response. Restricting to needed properties significantly reduces data transfer and improves query performance. |
where | string | A filter expression to narrow results by profile properties or attributes. Supports complex conditions to target specific user or group segments. |
get_event_aggregates Get Event Aggregates
Retrieve aggregated event data (counts, unique users, or averages) for specified events over a time period. Results can be broken down by minute, hour, day, week, or month granularity.
| Parameter | Type | Description |
|---|---|---|
event * | string | One or more event names to analyze, provided as a JSON array of strings (e.g., ["play song", "log in"]). |
from_date * | string | The start date for the query range in YYYY-MM-DD format (inclusive). |
project_id * | integer | The Mixpanel project ID to query. |
to_date * | string | The end date for the query range in YYYY-MM-DD format (inclusive). |
type * | string | The type of aggregation to perform: 'general' for total event counts, 'unique' for distinct user counts, or 'average' for mean values per time unit. |
unit * | string | The time granularity for bucketing results: 'minute', 'hour', 'day', 'week', or 'month'. Note that hourly granularity is not available for unique user counts. |
format | string | The response format: 'json' (default) or 'csv'. Subject to rate limits of 60 queries per hour and 5 concurrent queries. |
list_top_events List Top Events
Retrieve today's top events ranked by frequency, including event counts and normalized percent change compared to yesterday.
| Parameter | Type | Description |
|---|---|---|
project_id * | integer | The Mixpanel project ID to query events for. |
type * | string | The type of event analysis to perform: 'general' for event frequency, 'unique' for unique user counts, or 'average' for average event values. |
limit | integer | Maximum number of events to return in the results. Defaults to 100 if not specified. |
list_top_event_names List Top Event Names
Retrieve the most frequently occurring events from the past 31 days, analyzed by the specified metric type. Useful for understanding user behavior patterns and identifying key interactions in your product.
| Parameter | Type | Description |
|---|---|---|
project_id * | integer | The Mixpanel project ID that identifies which project's event data to query. |
type * | string | The type of event analysis to perform: 'general' for event frequency, 'unique' for distinct user counts, or 'average' for per-user averages. |
limit | integer | Maximum number of top events to return in the results, up to 255. Defaults to 255 if not specified. |
get_event_property_aggregates Get Event Property Aggregates
Retrieve aggregated metrics for a specific event property over a time period, supporting analysis types like total counts, unique values, or averages at various time granularities (minute through month).
| Parameter | Type | Description |
|---|---|---|
event * | string | The name of the event to analyze. Provide a single event name, not multiple events. |
from_date * | string | The start date for the analysis period in YYYY-MM-DD format (inclusive). |
name * | string | The property name within the event whose values you want to aggregate. |
project_id * | integer | The Mixpanel project ID to query. |
to_date * | string | The end date for the analysis period in YYYY-MM-DD format (inclusive). |
type * | string | The type of aggregation to perform: 'general' for total event counts, 'unique' for distinct value counts, or 'average' for mean values. |
unit * | string | The time bucket granularity for results: 'minute', 'hour', 'day', 'week', or 'month'. Note that hourly granularity is not available for unique analysis. |
format | string | The response format: 'json' (default) or 'csv'. |
limit | integer | Maximum number of property values to return in results. Defaults to 255 if not specified. |
values | array | Optional filter to analyze only specific property values. Provide as a JSON array of strings (e.g., ["value1", "value2"]). If omitted, all values are included. |
list_top_event_properties List Top Event Properties
Retrieve the most frequently used property names for a specified event in your Mixpanel project. Useful for understanding which properties are most relevant to an event's analysis.
| Parameter | Type | Description |
|---|---|---|
event * | string | The name of the event to retrieve properties for. Provide a single event name, not multiple events. |
project_id * | integer | The Mixpanel project ID that contains the event you want to analyze. |
limit | integer | The maximum number of top properties to return in the results. Defaults to 10 if not specified. |
list_event_property_top_values List Event Property Top Values
Retrieve the most frequently occurring values for a specific event property in Mixpanel. Useful for understanding the distribution and cardinality of property values within an event.
| Parameter | Type | Description |
|---|---|---|
event * | string | The name of the event to analyze. Provide a single event name (not multiple events). |
name * | string | The property name within the event whose top values you want to retrieve. |
project_id * | integer | The Mixpanel project ID that contains the event data you want to query. |
limit | integer | The maximum number of top values to return in the response. Defaults to 255 if not specified. |
execute_jql_script Execute JQL Script
Execute a custom JQL script against a Mixpanel project to query and aggregate event data. The script receives optional parameters and returns results based on the defined aggregation logic.
| Parameter | Type | Description |
|---|---|---|
project_id * | integer | The numeric identifier for the Mixpanel project where the script will execute. |
script * | string | A JavaScript function that processes events using the Mixpanel JQL API. The function receives a params object and must return aggregated event data. Typically groups events by specified dimensions and… |
params | string | A JSON object containing custom variables and configuration values made available to the script as the global params variable. Allows parameterization of script logic without modifying the script itse… |