There are two identifiers you can use to fetch a profile from The Swarm database:

  • Profile IDs (ids) previously received from Search endpoint

  • LinkedIn usernames (linkedinNames)

Using both will return a union of both lists after deduplication.

curl \
--location 'https://bee.theswarm.com/profiles/fetch' \
--header 'Content-Type: application/json' \
--header 'x-api-key: $API_KEY' \
--data \
`{
  "ids": [
    "569a18b6-6a04-4728-9034-ad6ae0537f09",
    "41dfd52f-e9da-4381-80a2-b514cf75c134"
  ],
  "linkedinNames": [
    "michal-bil"
  ]
}` 

By default the Fetch endpoint returns the connectors or team members connected to a given profile. If there is no team members connected to a profile the connections object is an empty array.

In the example below, the first profile is connected to one of the team members; the second one has no connectors.

curl \
--location 'https://bee.theswarm.com/profiles/fetch' \
--header 'Content-Type: application/json' \
--header 'x-api-key: $API_KEY' \
--data \
`{
  "ids": [
    "569a18b6-6a04-4728-9034-ad6ae0537f09",
    "b8d4ba05-5158-4d80-a0a7-c8e650f7c95c"
  ]
}` 
{
  "results": [
    {
      "id": "b8d4ba05-5158-4d80-a0a7-c8e650f7c95c",
      "connections": [
        {
          "userId": "68576a63-c8c3-4c92-88e8-b89a532ae3fa",
          "userEmail": "krzysztof@theswarm.com",
          "userLinkedinName": "",
          "createdAt": "2024-03-22T15:15:17.525907Z",
          "sources": [
            {
              "origin": "plugin",
              "network": "linkedin"
            }
          ],
          "connectionStrength": 0.1084125480166015,
          "manualStrength": null,
          "strengthNormalized": 1
        }
      ]
    },
    {
      "id": "569a18b6-6a04-4728-9034-ad6ae0537f09",
      "connections": []
    }
  ]
}