Get All Post Comments

Get all comments from a LinkedIn post with automatic pagination

POST/linkedin/posts/comments/all

Get All Post Comments

Get all comments from a LinkedIn post with automatic pagination

Authentication requiredLinkedIn Posts

Code Examples

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

Parameters

No parameters.

Request Body

FieldTypeRequiredDescription
accountIdstringNoLinkedIn account ID (uses default if not provided)
postUrlstringYesLinkedIn post URL
maxCommentsnumberNoMaximum total comments to fetch (10-5000, default: 1000)
batchSizenumberNoNumber of comments to fetch per batch (10-100, default: 50)

Example

{
  "postUrl": "https://www.linkedin.com/posts/john-doe-123_..."
}

Responses

StatusDescription
200Successful response

200 Example

{
  "success": true,
  "postUrl": "https://www.linkedin.com/posts/john-doe-123_...",
  "accountId": "507f1f77bcf86cd799439011",
  "comments": [
    {
      "commentText": "Great post!",
      "commenterName": "Jane Smith",
      "commenterProfileId": "jane-smith-456",
      "createdAt": "2024-01-15T10:30:00Z"
    }
  ],
  "summary": {
    "totalComments": 1,
    "fetchDurationMs": 1500,
    "maxCommentsLimit": 1000,
    "batchSize": 50,
    "truncated": false
  }
}