---
title: "Person Segment Query"
method: POST
path: "/person/segment-query"
tags: ["Audience Segments"]
---

# Person Segment Query

`POST /person/segment-query`

## Request

- Base URL: `https://api.mixrank.com/v2/json/YOUR_API_KEY`
- URL: `https://api.mixrank.com/v2/json/YOUR_API_KEY/person/segment-query`
- Auth: none declared

Retrieve MixRank person IDs matching a combination of features, such as industry or country. Obtain filter IDs from <a href="#tag/audience-segments/GET/segment-features/{segment}">feature lookup</a>; feature IDs are filter values, not person IDs. Use comma for AND, | for OR, ~ for NOT and parentheses for grouping. ~(123,456)|789 matches records lacking at least one of 123 and 456, or possessing 789. Queries accept at most 530 features.

Returns a token for an asynchronous export of up to 10,000 IDs. Poll <a href="#tag/audience-segments/GET/segment-result">the export result</a> with that token: 204 means pending, 200 downloads Zstandard-compressed CSV containing one row of sorted IDs. Empty output is the literal none. A _truncated suffix before .csv.zst indicates additional matches. Exports can only be downloaded by the submitting user.

Required permissions for your API key's user: `persons.segment.query`.

## Request body `application/x-www-form-urlencoded`

- object
  - `query` string, required: Required boolean feature-ID expression; at most 530 features.

## Response `200`

Successful response.

- object
  - `token` string

## Other responses

- `400`: Missing or invalid required parameter.
- `403`: Invalid key or insufficient endpoint permissions.
- `429`: Concurrent request limit exceeded.
- `500`: Internal API error.

---

[API](https://skmtc.dev/mixrank/apis/mixrank-api.md) - [All operations](https://skmtc.dev/mixrank/apis/mixrank-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mixrank/apis/mixrank-api/revisions/786d3fcfe918?raw)
