Get All Post Comments
Get all comments from a LinkedIn post with automatic pagination
POST
/linkedin/posts/comments/allGet 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
| Field | Type | Required | Description |
|---|---|---|---|
accountId | string | No | LinkedIn account ID (uses default if not provided) |
postUrl | string | Yes | LinkedIn post URL |
maxComments | number | No | Maximum total comments to fetch (10-5000, default: 1000) |
batchSize | number | No | Number of comments to fetch per batch (10-100, default: 50) |
Example
{
"postUrl": "https://www.linkedin.com/posts/john-doe-123_..."
}Responses
| Status | Description |
|---|---|
| 200 | Successful 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
}
}