Skip to main content
POST
/
v3
/
profiles
/
search
Search for profiles ids
curl --request POST \
  --url https://bee.theswarm.com/v3/profiles/search \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "query": {
    "match": {
      "profile_info.job_title": {
        "query": "Data Scientist"
      }
    }
  },
  "limit": 100,
  "pagination_token": "<string>",
  "stable_pagination": false,
  "in_network_only": false
}
'
{
  "ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "total_count": 123,
  "pagination_token": "<string>"
}
The Search Profiles endpoint searches the profile database based on attributes using OpenSearch DSL. See OpenSearch Mapping for available fields. Search returns up to 1000 results per page.
Replace "query" with your OpenSearch DSL query. The response contains a list of profile IDs that can be used in the Fetch Profile endpoint.
Response example
{
  "ids": [
    "00007d1c-a048-480a-8c14-1f33a161a3db",
    "0000ad61-2eda-4061-a20e-793d41016f03"
  ],
  "total_count": 125867,
  "pagination_token": "eyJzZWFyY2hfYWZ0ZXIiOlt7ImZpZWxkIjoiX3Njb3JlIiwidmFsdWUiOjF9LHsiZmllbGQiOiJwcm9maWxlX2luZm8uaWQiLCJ2YWx1ZSI6IjAwMDE2MTU4LWYyY2EtNDYzZC05YWEzLTIyOWZkMzk0ZWQ0MSJ9XX0="
}
For query examples, see Search endpoint examples.

Pagination

The response includes a pagination_token to fetch the next page. See Pagination for full details. The from parameter must be >= 0.
Migrating from v2? v3 uses snake_case for all field names. The v2 equivalents were paginationToken, totalCount, and inNetworkOnly. See the Migrating to v3 guide.

Authorizations

x-api-key
string
header
required

Body

application/json
query
object
required

Search query in the ElasticSearch Query DSL format. Find mapping here

Example:
{
"match": {
"profile_info.job_title": { "query": "Data Scientist" }
}
}
limit
integer
default:100

Limit the number of results. If you want to use stable_pagination this parameter must be set to 1000

Required range: 0 <= x <= 1000
pagination_token
string

Pagination token received in the previous response

stable_pagination
boolean
default:false

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

in_network_only
boolean
default:false

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

A list of profile ids matching provided query

ids
string<uuid>[]
required

List of profile ids

total_count
integer
required

Total number of profiles matching the query

pagination_token
string

Pagination token for the next request