---
ref: tool:mixpanel/query-profiles
name: Query profiles
company: company:mixpanel
workflows: []
access: [api]
tags: [capability:build-audience, category:product-analytics, has:api]
docs: https://docs.mixpanel.com/reference/engage-query
updated: 2026-09-26
---

# Query profiles

Returns the user or group profiles that match a selector expression or belong to a cohort.

Note: Returns at most `page_size` profiles per response: for the next page, pass the first response's `session_id` with an incremented `page`.

## Set up

Use the first option your agent supports.

### API (official)

- Base URL: https://mixpanel.com/api/query
- Endpoint: `POST /engage`
- Auth: send the header `Authorization: Basic $MIXPANEL_SA_TOKEN`
- Get a key: https://mixpanel.com/settings/org#serviceaccounts
- Docs: https://docs.mixpanel.com/reference/query-api

Note: `MIXPANEL_SA_TOKEN` holds the base64 of `<service account username>:<secret>`, and every request carries `project_id`; EU and India projects use `eu.mixpanel.com` and `in.mixpanel.com`.

Before anything else, confirm access with the cheapest read-only call, like a list or a search. Never send or change anything to test access.

## Rules

- Ask the user before anything that sends messages, costs money, or changes data, and say how many records it touches. One approval covers a batch the user has seen.
- Never print API keys.
