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/v2/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/v2/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": [
{
"user_id": "68576a63-c8c3-4c92-88e8-b89a532ae3fa",
"user_email": "krzysztof@theswarm.com",
"user_linkedin_name": "",
"created_at": "2024-03-22T15:15:17.525907Z",
"sources": [
{
"origin": "plugin",
"network": "linkedin"
}
],
"connection_strength": 0.1084125480166015,
"manual_strength": null,
"strength_normalized": 1
}
]
},
{
"id": "569a18b6-6a04-4728-9034-ad6ae0537f09",
"connections": []
}
]
}