Mixpanel Segmentation API

Query event segmentation data over time

Operations 3

GET /segmentation Mixpanel Query event segmentation #
GET /segmentation/sum Mixpanel Query numeric property sum #
GET /segmentation/average Mixpanel Query numeric property average #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/mixpanel-segmentation-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

mixpanel-segmentation-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mixpanel Query Segmentation API
  description: API for querying and retrieving analytics data from Mixpanel, including cohorts, funnels, insights, retention, segmentation, activity feeds, and event breakdowns.
  version: '2.0'
  contact:
    name: Mixpanel Support
    email: support@mixpanel.com
    url: https://mixpanel.com/get-support
  termsOfService: https://mixpanel.com/legal/terms-of-use
servers:
- url: https://mixpanel.com/api/2.0
  description: Mixpanel US Data Residency
- url: https://eu.mixpanel.com/api/2.0
  description: Mixpanel EU Data Residency
security:
- basicAuth: []
tags:
- name: Segmentation
  description: Query event segmentation data over time
paths:
  /segmentation:
    get:
      operationId: querySegmentation
      summary: Mixpanel Query event segmentation
      description: Query event counts over a time range, optionally segmented by a property. Returns time series data.
      tags:
      - Segmentation
      parameters:
      - name: project_id
        in: query
        required: true
        schema:
          type: integer
        description: The Mixpanel project ID
      - name: event
        in: query
        required: true
        schema:
          type: string
        description: The event name to query
      - name: from_date
        in: query
        required: true
        schema:
          type: string
          format: date
        description: Start date (YYYY-MM-DD)
      - name: to_date
        in: query
        required: true
        schema:
          type: string
          format: date
        description: End date (YYYY-MM-DD)
      - name: type
        in: query
        schema:
          type: string
          enum:
          - general
          - unique
          - average
        description: Aggregation type - general (total count), unique (unique users), or average (average per user)
      - name: 'on'
        in: query
        schema:
          type: string
        description: Property expression to segment results by
      - name: where
        in: query
        schema:
          type: string
        description: Expression to filter events
      - name: unit
        in: query
        schema:
          type: string
          enum:
          - minute
          - hour
          - day
          - week
          - month
        description: Time granularity for the results
      - name: limit
        in: query
        schema:
          type: integer
        description: Maximum number of segment values
      responses:
        '200':
          description: Segmentation query results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SegmentationResponse'
        '400':
          description: Invalid query parameters
        '401':
          description: Unauthorized
        '429':
          description: Rate limit exceeded
  /segmentation/sum:
    get:
      operationId: querySegmentationSum
      summary: Mixpanel Query numeric property sum
      description: Query the sum of a numeric event property over a time range.
      tags:
      - Segmentation
      parameters:
      - name: project_id
        in: query
        required: true
        schema:
          type: integer
        description: The Mixpanel project ID
      - name: event
        in: query
        required: true
        schema:
          type: string
        description: The event name to query
      - name: from_date
        in: query
        required: true
        schema:
          type: string
          format: date
        description: Start date (YYYY-MM-DD)
      - name: to_date
        in: query
        required: true
        schema:
          type: string
          format: date
        description: End date (YYYY-MM-DD)
      - name: 'on'
        in: query
        required: true
        schema:
          type: string
        description: The numeric property to sum
      - name: where
        in: query
        schema:
          type: string
        description: Expression to filter events
      - name: unit
        in: query
        schema:
          type: string
          enum:
          - minute
          - hour
          - day
          - week
          - month
        description: Time granularity for the results
      responses:
        '200':
          description: Segmentation sum results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SegmentationResponse'
        '401':
          description: Unauthorized
        '429':
          description: Rate limit exceeded
  /segmentation/average:
    get:
      operationId: querySegmentationAverage
      summary: Mixpanel Query numeric property average
      description: Query the average of a numeric event property over a time range.
      tags:
      - Segmentation
      parameters:
      - name: project_id
        in: query
        required: true
        schema:
          type: integer
        description: The Mixpanel project ID
      - name: event
        in: query
        required: true
        schema:
          type: string
        description: The event name to query
      - name: from_date
        in: query
        required: true
        schema:
          type: string
          format: date
        description: Start date (YYYY-MM-DD)
      - name: to_date
        in: query
        required: true
        schema:
          type: string
          format: date
        description: End date (YYYY-MM-DD)
      - name: 'on'
        in: query
        required: true
        schema:
          type: string
        description: The numeric property to average
      - name: unit
        in: query
        schema:
          type: string
          enum:
          - minute
          - hour
          - day
          - week
          - month
        description: Time granularity for the results
      responses:
        '200':
          description: Segmentation average results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SegmentationResponse'
        '401':
          description: Unauthorized
        '429':
          description: Rate limit exceeded
components:
  schemas:
    SegmentationResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            series:
              type: array
              items:
                type: string
                format: date
              description: Dates in the time series
            values:
              type: object
              additionalProperties:
                type: object
                additionalProperties:
                  type: number
              description: Values keyed by segment name and date
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Service account credentials. Use the service account username as the username and the service account secret as the password.
externalDocs:
  description: Mixpanel Query API Documentation
  url: https://developer.mixpanel.com/reference/query-api