# Retrieve number of profiles based on set of segment rules Retrieve the number of profiles produced by a set of segment rules. Endpoint: POST /audiences/{audienceId}/segments/queries Version: 1.0.0 Security: TdApikeyAuth ## Path parameters: - `audienceId` (integer, required) Master Segment id of the segment ## Request fields (application/json): - `columns` (array) - `kind` (integer) 0: batch, 1: realtime, 2: funnel_stage - `rule` (any) - `funnel_stage` (object) required if creating segment as a rule of funnel_stage - `funnel_stage.funnel_id` (integer) - `funnel_stage.stage_id` (integer) - `pageSize` (integer) - `maxPage` (integer) - `enableMv` (string) "true", "false" - `filterString` (string) Example: "Alex" - `realtime` (boolean) use instead ## Response 200 fields (application/json): - `id` (string) - `queryId` (string) Same value as . - `status` (string) Enum: "success", "killed", "error", "running" - `count` (integer,null) Number of profiles produced by the given segment rules - `maxPage` (integer,null) - `error` (string,null) - `jobid` (string) - `countJobid` (string) - `customerGroupCount` (integer,null) Number of customer groups related by the given segment rules ## Response 400 fields (application/json): - `code` (string, required) - `message` (string, required) ## Response 401 fields (application/json): - `code` (string, required) - `message` (string, required) ## Response 403 fields (application/json): - `code` (string, required) - `message` (string, required) ## Response 404 fields (application/json): - `code` (string, required) - `message` (string, required) ## Response 4XX fields (application/json): - `code` (string, required) - `message` (string, required) ## Response 5XX fields (application/json): - `status` (integer, required) Error status - `error` (string, required) Error message - `details` (string) Detailed error message