Facebook Pixel

Get Post Reactions

Get reactions (likes) from a LinkedIn post with pagination

POST/linkedin/posts/reactions

Get Post Reactions

Get reactions (likes) from a LinkedIn post with pagination

Authentication requiredLinkedIn Posts

Code Examples

curl -X POST 'https://api.connectsafely.ai/linkedin/posts/reactions' \
-H 'Authorization: Bearer <your_api_key>' \
-H 'Content-Type: application/json' \
-d '{"postUrl":"https://www.linkedin.com/posts/john-doe-123_...","count":10,"start":0}'

Parameters

No parameters.

Request Body

FieldTypeRequiredDescription
accountIdstringNoLinkedIn account ID (uses default if not provided)
postUrlstringYesLinkedIn post URL
countnumberNoNumber of reactions to fetch per page (1-100, default: 10)
startnumberNoStarting position for pagination (0-based, default: 0)

Example

{
  "postUrl": "https://www.linkedin.com/posts/john-doe-123_...",
  "count": 10,
  "start": 0
}

Responses

StatusDescription
200Successful response
400Invalid request (e.g., missing postUrl or could not extract post details)
401Unauthorized
500Server error

200 Example

{
  "success": true,
  "postUrl": "https://www.linkedin.com/posts/john-doe-123_...",
  "accountId": "507f1f77bcf86cd799439011",
  "reactions": [
    {
      "actorUrn": "urn:li:fsd_profile:ACoAADtQ_A0BqjLXV5xVsYvTsG9pQE8YbbcQAM4",
      "postUrn": "urn:li:activity:7406515737848209408",
      "reactionType": "LIKE",
      "actorType": "profile",
      "actorName": "Shudhanshu Yadav",
      "actorHeadline": "React JS Frontend Developer at Techlene Software Solutions Pvt. Ltd.",
      "actorPublicIdentifier": "shudhanshu-yadav",
      "actorProfilePicture": "https://media.licdn.com/dms/image/v2/D4D35AQG5Lx6JDGko3Q/profile-framedphoto-shrink_200_200/0/1765279668620?e=1766552400&v=beta&t=N5Rozvl4EJXhkvClVvCChh0uncLs6nZEsQ7TuMUGvoU",
      "actorProfileUrl": "https://www.linkedin.com/in/ACoAADtQ_A0BqjLXV5xVsYvTsG9pQE8YbbcQAM4",
      "connectionDegree": "2nd"
    }
  ],
  "pagination": {
    "start": 0,
    "count": 10,
    "total": 165,
    "hasNextPage": true,
    "nextStart": 10
  },
  "postDetails": {
    "activityUrn": "urn:li:activity:7406515737848209408",
    "ugcPostUrn": "urn:li:ugcPost:...",
    "shareUrn": null,
    "featuredActivityUrn": null,
    "content": "Post content here..."
  }
}

Reaction Types

The API supports fetching all reaction types that LinkedIn provides:

  • LIKE - Standard like reaction
  • PRAISE - Praise reaction
  • APPRECIATION - Appreciation reaction
  • EMPATHY - Empathy reaction
  • INTEREST - Interest reaction
  • ENTERTAINMENT - Entertainment reaction

Pagination

Use the count and start parameters to paginate through reactions:

  • First page: {"postUrl": "...", "count": 10, "start": 0}
  • Second page: {"postUrl": "...", "count": 10, "start": 10}
  • Third page: {"postUrl": "...", "count": 10, "start": 20}

The response includes pagination.hasNextPage and pagination.nextStart to help you fetch the next page.

Notes

  • The endpoint automatically resolves short LinkedIn URLs
  • If a post has 0 reactions, the API will return early with an empty reactions array to save resources
  • The API tries multiple URN formats internally to ensure reliable data retrieval
  • Profile pictures are returned in 200x200 or 400x400 resolution
  • Connection degree indicates relationship: "1st" (connection), "2nd" (2nd degree), "3rd+" (3rd+ degree)