Export Methods: Export raw data and reports from Mixpanel
Overview
This page provides a high-level overview of your options for exporting event data, profile data, and formatted report data.
You can export data from your project using a variety of methods, including lightweight CSVs generated from the UI, large volume raw data export from our APIs, and data syncs to external destinations through Cohort Syncs and Data Pipelines.
For GDPR/CCPA-compliant exports, please see the End User Data Management page (opens in a new tab).
Exporting Events
Event Export via API
The from_date and to_date parameters are in UTC timezone, regardless of your project's timezone setting.
To export raw event data, use the Raw Event Export API (opens in a new tab). The events payload is returned as JSONL, where each line is a valid JSON object. This method is recommended for high volume exports.
Example request:
# Returning "sample_event" from 2024-07-23 to 2024-07-24
curl --request GET \
--url 'https://data.mixpanel.com/api/2.0/export?from_date=2024-07-23&to_date=2024-07-24&limit=100&event=sample_event' \
--header 'accept: text/plain' \
--header 'authorization: Basic YOUR_TOKEN’
Example payload:
# The entire payload is a JSONL
# Each line of event is a JSON object
{"event":"Signed up","properties":{"time":1602611311,"$insert_id":"hpuDqcvpltpCjBsebtxwadtEBDnFAdycabFb","mp_processing_time_ms":1602625711874}}
{"event":"Signed up","properties":{"time":1602787121,"$insert_id":"jajcebutltmvhbbholfhxtCcycwnBjDtndha","mp_processing_time_ms":1602801521561}}
The exported payloads are raw events, containing timestamps as they are stored in your project. For projects created before 11 Jan 2023, your event timestamp is stored in your local project timezone at the time of ingestion. For projects created after 11 Jan 2023, your event timestamp is stored in UTC timezone. Learn more about managing your project timezone here.
CSV Events Export
Only the events visible in the Events table at the time of your export will be included in the CSV. Scroll down and click “Load More” to make more events visible.
You may export small batches of events as a CSV for use in quick analysis by navigating to the Events tab, querying the events that you are interested in seeing, then clicking the “Export” button in the top right corner.
By default, only the columns that are shown in the UI will be exported. You can click the “Edit Columns” button to modify the properties columns shown in the Events table.
Select the option to include “All event properties” if you are interested in all of the event properties.
Exporting Profiles
User Profile Export via API
Profiles and events will always export the canonical distinct ID as shown in the UI.
To export User Profile data, use the Engage API (opens in a new tab). The return payload is a JSON object, where the profiles are stored in the results key, as an array of objects where each profile is its own object.
Sample request:
# Returns all user profiles in project 1234567
curl --request POST \
--url 'https://mixpanel.com/api/query/engage?project_id=1234567' \
--header 'accept: application/json' \
--header 'authorization: Basic YOUR _TOKEN \
--header 'content-type: application/x-www-form-urlencoded'
Sample payload:
# Your profiles are stored in an array of objects in the results key
# Each object is a separate profile
{
"page": 0,
"page_size": 1000,
"results": [
{
"$distinct_id": 1,
"$properties": {
"$created": "2008-12-12T11:20:47",
"$email": "example1@mixpanel.com",
"$first_name": "Example1”,
"$last_name": "Name1”,
"$last_seen": "2008-06-09T23:08:40"
}
},
{
"$distinct_id": 2,
"$properties": {
"$created": "2008-12-12T11:20:47",
"$email": "example2@mixpanel.com",
"$first_name": "Example2”,
"$last_name": "Name2”,
"$last_seen": "2008-06-09T23:08:40"
}
}
],
"session_id": "1234567890-EXAMPL",
"status": "ok",
"total": 1
}
By default, all profile properties are returned. Use the output_properties parameter to specify specific profile properties to return.
Example: output_properties=["$last_name", "$email", "Total Spent"]
You may export specific cohorts by using the filter_by_cohort
parameter. You may find the cohort_id
in the UI next to your cohort or by using the cohorts-list API (opens in a new tab).
Group Profile Export via API
You can also leverage the Engage API (opens in a new tab) to export Group Profiles. To do so, provide the data_group_id
parameter in your Engage API request. You can find the data_group_id
for your group keys in your project settings.
CSV User Profile Export
You may export your profiles as a CSV for use in quick analysis by navigating to the Users tab, querying the profiles that you are interested in seeing, then clicking the “Export” button in the top right corner.
Only the columns shown in the UI will be exported in the CSV. You may modify the table by clicking the “Edit Columns” button to choose the profile properties to return before your export.
CSV Group Profile Export
To export Group Profiles as a CSV, switch the group key to your group of choice by clicking the “Analyze Uniques by” button in the top left of the UI
Exporting Reports
Downloading Reports via the UI
You can download any reports as a CSV, PNG, or PDF by clicking the "..." button in the top right corner of the report UI, and then selecting "Export".
Exporting Reports via API
The Flows report cannot be exported using API at this time. Please use the export method from the UI outlined above.
You may use our Query API (opens in a new tab) to export the formatted results that you see in our web app. Learn more about the Insights API (opens in a new tab), Funnels API (opens in a new tab), and Retention API (opens in a new tab).
Export Integrations
You can sync your Mixpanel data to your other destinations using our native connectors. Learn more about the Data Pipeline for warehouse syncs and Cohort Syncs for audience targeting.
Was this page useful?