---
title: "Aggregate profile field values"
method: POST
path: "/v2/profiles/aggregate"
tags: ["profiles"]
---

# Aggregate profile field values

`POST /v2/profiles/aggregate`

Return distinct values for a single profile field matching a text query (e.g. autocomplete for locations or current job titles).

## Request body

- object
  - `query` string, required — Text to match (minimum 3 characters)
  - `field` 'location' | 'currentJobTitle', required — Field to aggregate

## Response `200`

Aggregated values

- object
  - `field` string, required — The aggregated field
  - `values` string[], required — Distinct values for the field

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden
- `5XX` — Unexpected error

---

[API](https://skmtc.dev/theswarm/apis/swarm-api.md) · [All operations](https://skmtc.dev/theswarm/apis/swarm-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/theswarm/swarm-api/revisions/130f0025ff6c/schema)
