---
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.

Filter with a `where` selector or `filter_by_cohort`, and include `project_id`. Each response holds at most `page_size` records; page with the `session_id` from the first response and 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

Before doing anything else, make one read-only call to confirm access.

## Rules

- Ask the user before anything that sends messages, costs money, or changes data.
- Never print API keys.
