Mixpanel APIs

Mixpanel supports API endpoints that can query, export, and import data.

The API endpoints are organized by the function that they support. The API structure is as follows:

Ingestion Endpoints

  • Use the Ingestion endpoints to get data into Mixpanel. This includes event import, user import, or event tracking in the cases that our SDKs don’t support.
  • api.mixpanel.com/

Query Endpoints

  • Use the Query API endpoints to query Mixpanel outside of the web application.
  • This includes JQL, and this is the endpoint to use when exporting user profile data.
  • mixpanel.com/api

Export Endpoints

  • The Export API endpoint should be used to export event data in JSON format.
  • https://data.mixpanel.com/api/2.0/export/

Pipelines

  • Data Pipelines is Mixpanel’s managed data infrastructure product. It removes the need to build custom connectors, maintain complex exports and transformations.
  • https://data.mixpanel.com/api/2.0/export/

Ingestion

Mixpanel Ingestion API endpoints allow you to send data to Mixpanel. In most cases you do not need to directly build on top of Ingestion API endpoints, as Mixpanel offers supported SDKs that remove this need.

The Ingestion API endpoints open the use of Mixpanel to anything with a network connection. As long as you can build an event with the proper JSON format, you can send data to Mixpanel that will be ingested and queried in a Mixpanel project.

This includes “Internet of Things” devices, server-side implementations that don’t have an SDK, hybrid implementations, and more.

Relevant Documentation

Query

Use the Query endpoint query data and return results outside of reports in the web application. Query results can be written to files, therefore making it possible to use transfer this data to other platforms.

The query endpoints should serve as the starting point for exporting user information from Mixpanel. This is done through the /engage endpoint. See the Export section for information on exporting event data.

The Mixpanel Query API endpoints can:

  • Filter or break down Events
  • Return user profiles.
  • Return an activity/event stream for a user.
  • Return a cohort of users.
  • Etc.

Relevant Documentation

Data Pipelines

Data Pipelines is a collection of tools and endpoints that export data from Mixpanel and manage the transformation, scheduling, and import for supported destinations.

Use Data Pipeline endpoints to create robust pipelines so that you do not need to build, manage, and host complex connectors.

Data Warehouse Export is available to export data to common providers such as Google Bigquery, Amazon Redshift, and Snowflake.

Relevant Documentation

Export

The Mixpanel Export API allows you to export raw event data in JSON Format.

{
  "event": "Viewed report",
    "properties": {
        "distinct_id": "foo",
        "time": 1518314400,
        "$os": "Linux",
        "$browser": "Chrome",
        "Project ID": "3",
        "mp_country_code": "US"
    }
}

This endpoint is meant to be flexible and provide quick means to quickly export data.

Relevant Documentation

Mixpanel APIs


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.