---
title: "Search for profiles ids"
method: POST
path: "/v2/profiles/search"
tags: ["profiles"]
---

# Search for profiles ids

`POST /v2/profiles/search`

Search for profiles ids using the [ElasticSearch Query DSL](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html) format

## Request body

- object
  - `query` object, required — Search query in the [ElasticSearch Query DSL](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html) format. [Find mapping here](https://docs.theswarm.com/docs/mappings/profile-v2)
  - `limit` integer — Limit the number of results. If you want to use stable_pagination this parameter must be set to 1000
  - `paginationToken` string — Pagination token received in the previous response
  - `stable_pagination` boolean — When set to true, ensures that pagination results remain consistent, even if the underlying data changes during retrieval. This is useful for retrieving large result sets reliably across multiple requests
  - `inNetworkOnly` boolean — When set to true, restricts search results to profiles that are connected to your team's network. This parameter filters the query to only return profiles that have established connections with connectors of your organization.

## Response `200`

A list of profile ids matching provided query

- object
  - `ids` string[], required — List of profile ids
  - `totalCount` integer, required — Total number of profiles matching the query
  - `paginationToken` string — Pagination token for the next request

## 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)
