ApiLinkedin posts
Get reactions from a post (v2 - with vanity names)
Retrieve reactions from a LinkedIn post using the SDUI endpoint. Returns vanity names (actorPublicIdentifier) and proper profile URLs. Uses cursor-based pagination via pageToken instead of offset-based start.
POST
/posts/reactions/v2Authentication requiredPosts
Code Examples
curl -X POST 'https://api.connectsafely.ai/linkedin/posts/reactions/v2' \ -H 'Authorization: Bearer <your_api_key>' \ -H 'Content-Type: application/json' \ -d '{"postUrl":"https://linkedin.com/posts/example-post"}'Parameters
No parameters.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
accountId | string | No | LinkedIn account ID to use. If not provided, uses the default account. |
postUrl | string | Yes | Full URL of the LinkedIn post to get reactions from |
count | number | No | Number of reactions per page (default 10) |
pageToken | string | No | Cursor token for next page (from previous response pagination.nextPageToken) |
Example
{
"postUrl": "https://linkedin.com/posts/example-post"
}Responses
| Status | Description |
|---|---|
| 200 | Reactions retrieved successfully |
| 400 | Bad request - Missing required fields or no valid URN found |
| 401 | Unauthorized - Invalid or missing API key |
200 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | |
postUrl | string | URL of the post |
accountId | string | LinkedIn account ID used for the request |
reactions | array | |
pagination | object | |
postDetails | object |
200 Example
{
"success": true,
"postUrl": "https://www.linkedin.com/feed/update/urn:li:activity:7430667226199830528/",
"accountId": "696ce9e780e0483585e4e553",
"reactions": [
{
"actorUrn": null,
"postUrn": "urn:li:activity:7430667226199830528",
"reactionType": "LIKE",
"actorType": "profile",
"actorName": "John Doe",
"actorHeadline": "Software Engineer at Tech Company",
"actorPublicIdentifier": "john-doe-123",
"actorProfilePicture": "https://media.licdn.com/dms/image/...",
"actorProfileUrl": "https://www.linkedin.com/in/john-doe-123/",
"connectionDegree": "1st"
}
],
"pagination": {
"start": 0,
"count": 10,
"total": 156,
"hasNextPage": true,
"nextStart": null,
"nextPageToken": "CiAyMDhhZjk1Y2E4MDE5YWQwNDI2ZTZhZTJhNTM2NzkzMBAK"
},
"postDetails": {
"activityUrn": "urn:li:activity:7430667226199830528",
"ugcPostUrn": null,
"shareUrn": "urn:li:share:7430667225633550337",
"featuredActivityUrn": null,
"content": "Post content here..."
}
}400 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | |
error | string |
400 Example
{
"success": true,
"error": "example_value"
}401 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
401 Example
{
"error": "Unauthorized - Invalid credentials"
}