Skip to main content
GET
/
export
Download Data
curl --request GET \
  --url https://{server}.mixpanel.com/api/2.0/export \
  --header 'Authorization: Basic <encoded-value>'
"{\"event\":\"Signed up\",\"properties\":{\"time\":1602611311,\"$insert_id\":\"hpuDqcvpltpCjBsebtxwadtEBDnFAdycabFb\",\"mp_processing_time_ms\":1602625711874}}\n{\"event\":\"Signed up\",\"properties\":{\"time\":1602787121,\"$insert_id\":\"jajcebutltmvhbbholfhxtCcycwnBjDtndha\",\"mp_processing_time_ms\":1602801521561}}\n"

Authorizations

Authorization
string
header
required

Project Secret

Headers

Accept-Encoding
enum<string>

If set to gzip and the response body is > 1400 bytes, the response will be compressed with gzip, and Content-Encoding will be set to gzip.

Available options:
gzip

Query Parameters

project_id
integer

Required if using service account to authenticate request.

from_date
string
required

The date in yyyy-mm-dd format to begin querying from. This date is inclusive and interpreted as UTC timezone for projects created after 1 January 2023 and current project timezone for projects created before 11 January 2023.

to_date
string
required

The date in yyyy-mm-dd format to query to. This date is inclusive and interpreted as UTC timezone for projects created after 1 January 2023 and current project timezone for projects created before 11 January 2023.

limit
integer

Use this parameter if you want to limit the max number of events to be returned. Value cannot be over 100000.

event
string

The event or events that you wish to get data for, encoded as a JSON array.

where
string

An expression to filter events by. More info on expression sequence structure can be found here

time_in_ms
boolean

Defaults to false which will export event timestamps with second-precision. Set to true to export event timestamps with millisecond-precision.

Response

200 - text/plain

Success. The returned format is one event per line where each line is a valid JSON object, but the full return itself is JSONL.

Newline delimited JSON (JSONL)

Example:

"{\"event\":\"Signed up\",\"properties\":{\"time\":1602611311,\"$insert_id\":\"hpuDqcvpltpCjBsebtxwadtEBDnFAdycabFb\",\"mp_processing_time_ms\":1602625711874}}\n{\"event\":\"Signed up\",\"properties\":{\"time\":1602787121,\"$insert_id\":\"jajcebutltmvhbbholfhxtCcycwnBjDtndha\",\"mp_processing_time_ms\":1602801521561}}\n"