V2 endpoints

Search Network V2 POST

The Search endpoint facilitates searching for profiles within the profile database based on their attributes. Utilizing OpenSearch as the underlying database technology, this endpoint accepts requests with OpenSearch domain-specific language (DSL), enabling powerful and flexible search queries.

See OpenSearch Mapping for the Search endpoint.

Search returns 1000 results per page.

Example Usage

curl \

--location 'https://bee.theswarm.com/v2/profiles/search' \

--header 'Content-Type: application/json' \

--header 'x-api-key: $API_KEY' \

--data \

`{

  "query": {

    "exists": {

      "field": "profile_info.emails"

    }

  },

  "limit": 5

}`

Note: Replace "query" with your OpenSearch DSL query defining the search criteria. The response will contain a list of profile IDs matching the search criteria, that can be later used in the Fetch endpoint

{

  "ids": [

    "00007d1c-a048-480a-8c14-1f33a161a3db",

    "0000ad61-2eda-4061-a20e-793d41016f03",

    "0000fdfd-98f8-4bf3-adf8-b8a18a3c64f9",

    "000103f7-79eb-412e-9839-40a4d04858c3",

    "00016158-f2ca-463d-9aa3-229fd394ed41"

  ],

  "totalCount": 125867,

  "paginationToken": "eyJzZWFyY2hfYWZ0ZXIiOlt7ImZpZWxkIjoiX3Njb3JlIiwidmFsdWUiOjF9LHsiZmllbGQiOiJwcm9maWxlX2luZm8uaWQiLCJ2YWx1ZSI6IjAwMDE2MTU4LWYyY2EtNDYzZC05YWEzLTIyOWZkMzk0ZWQ0MSJ9XX0="

}

For more examples, refer to Examples.

Pagination

When making requests to the Search endpoint, pagination can be utilized to retrieve large sets of search results efficiently. As shown in the above API response, it will contain a pagination token that should be used in subsequent requests to fetch the next page of results.

Below is an example query that will query the next 5 records using the pagination token:

curl \

--location 'https://bee.theswarm.com/profiles/search' \

--header 'Content-Type: application/json' \

--header 'x-api-key: $API_KEY' \

--data \

`{

  "query": {

    "exists": {

      "field": "profile_info.emails"

    }

  },

  "limit": 5,

  "paginationToken": "eyJzZWFyY2hfYWZ0ZXIiOlt7ImZpZWxkIjoiX3Njb3JlIiwidmFsdWUiOjF9LHsiZmllbGQiOiJwcm9maWxlX2luZm8uaWQiLCJ2YWx1ZSI6IjAwMDE2MTU4LWYyY2EtNDYzZC05YWEzLTIyOWZkMzk0ZWQ0MSJ9XX0="

}`

Fetch Profile V2 POST

The Fetch endpoint within the API facilitates the retrieval of specific profiles from the database based on their unique identifiers (profile IDs or LinkedIn usernames). This endpoint is designed to provide detailed information about individual profiles stored in the database, allowing users to access profile connections, lists, notes, and tags.

Example Usage

curl \

--location 'https://bee.theswarm.com/v2/profiles/fetch' \

--header 'Content-Type: application/json' \

--header 'x-api-key: $API_KEY' \

--data \

{

  "ids": [

    "b8d4ba05-5158-4d80-a0a7-c8e650f7c95c"

  ],

  "fields": [

    "connections",

    "lists",

    "notes",

    "tags",

    "profile_info"

  ]

}

By default, the response contains the profile connections or team members that are connected to the profile. The API user may specify additional data about the profile in the fields object that accepts the following values:

Mind that investorData is no longer allowed in the list of fields to fetch. investor_data form now on is nested in the profile_info. More details in Models > Profile.

connectionsList of team members who are connected to the given profile. The connection details are included (see Models > Profile)
tagsTags assigned to the profile
listsLists the profile is assigned to
notesList of notes assigned to the profile. Private notes are not included.
profile_infoDetailed profile data, e.g. work experience, education, etc.

To see a full response of the Fetch endpoint see Models > Profile

V1 endpoints (to be sunset soon)

Search Network POST

The Search endpoint facilitates searching for profiles within the profile database based on their attributes. Utilizing OpenSearch as the underlying database technology, this endpoint accepts requests with OpenSearch domain-specific language (DSL), enabling powerful and flexible search queries.

See OpenSearch Mapping for the Search endpoint.

Search returns 1000 results per page.

Example usage

curl \

--location 'https://bee.theswarm.com/profiles/search' \

--header 'Content-Type: application/json' \

--header 'x-api-key: $API_KEY' \

--data \

`{

  "query": {

    "exists": {

      "field": "profile_info.emails"

    }

  },

  "limit": 5

}`

Note: Replace "query" with your OpenSearch DSL query defining the search criteria. The response will contain a list of profile IDs matching the search criteria, that can be later used in the Fetch endpoint

{

  "ids": [

    "00007d1c-a048-480a-8c14-1f33a161a3db",

    "0000ad61-2eda-4061-a20e-793d41016f03",

    "0000fdfd-98f8-4bf3-adf8-b8a18a3c64f9",

    "000103f7-79eb-412e-9839-40a4d04858c3",

    "00016158-f2ca-463d-9aa3-229fd394ed41"

  ],

  "totalCount": 125867,

  "paginationToken": "eyJzZWFyY2hfYWZ0ZXIiOlt7ImZpZWxkIjoiX3Njb3JlIiwidmFsdWUiOjF9LHsiZmllbGQiOiJwcm9maWxlX2luZm8uaWQiLCJ2YWx1ZSI6IjAwMDE2MTU4LWYyY2EtNDYzZC05YWEzLTIyOWZkMzk0ZWQ0MSJ9XX0="

}

For more examples, refer to Examples.

Fetch Profile POST

The Fetch endpoint within the API facilitates the retrieval of specific profiles from the database based on their unique identifiers (profile IDs or LinkedIn usernames). This endpoint is designed to provide detailed information about individual profiles stored in the database, allowing users to access profile connections, lists, notes, and tags.

Example Usage

curl \

--location 'https://bee.theswarm.com/profiles/fetch' \

--header 'Content-Type: application/json' \

--header 'x-api-key: $API_KEY' \

--data \

{

  "ids": [

    "b8d4ba05-5158-4d80-a0a7-c8e650f7c95c"

  ],

  "fields": [

    "connections",

    "lists",

    "notes",

    "tags",

    "profileInfo",

    "investorData"

  ]

}

By default, the response contains the profile connections or team members that are connected to the profile. The API user may specify additional data about the profile in the fields object that accepts the following values:

connectionsList of team members who are connected to the given profile. The connection details are included (see Models > Profile)
tagsTags assigned to the profile
listsLists the profile is assigned to
notesList of notes assigned to the profile. Private notes are not included.
profileInfoDetailed profile data, e.g. work experience, education, etc.
investorDataThe investor data of the profile

To see a full response of the Fetch endpoint see Models > Profile