# List comments for a post or thread

POST https://services.leadconnectorhq.com/social-media-posting/comments/{platform}/list

Paginated list of comments scoped to a post (`parentId` = postId) or a comment thread (`parentId` = commentId). Use `skip`/`limit` for pagination, `sortBy` for ordering, `originIds` to filter by connected account, and `search` for keyword search.

## Authentication

Send `Authorization: Bearer <token>` using:

- **Sub-Account token: OAuth access token or Private Integration Token.** Scopes: `socialplanner/comments.readonly`

## Parameters

### Header Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `Version` | string | Yes | API Version |

### Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `platform` | string | Yes | Supported Comments Platforms |

### Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `locationId` | string | Yes | Location ID |

## OpenAPI Specification

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "LeadConnector API",
    "version": "v3"
  },
  "servers": [
    {
      "url": "https://services.leadconnectorhq.com"
    }
  ],
  "paths": {
    "/social-media-posting/comments/{platform}/list": {
      "post": {
        "summary": "List comments for a post or thread",
        "operationId": "listCommentsForAPostOrThread",
        "description": "Paginated list of comments scoped to a post (`parentId` = postId) or a comment thread (`parentId` = commentId). Use `skip`/`limit` for pagination, `sortBy` for ordering, `originIds` to filter by connected account, and `search` for keyword search.",
        "parameters": [
          {
            "name": "Version",
            "in": "header",
            "description": "API Version",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "v3"
              ]
            }
          },
          {
            "name": "platform",
            "required": true,
            "in": "path",
            "description": "Supported Comments Platforms",
            "schema": {
              "example": "facebook",
              "enum": [
                "facebook",
                "instagram",
                "linkedin",
                "community",
                "tiktok",
                "bluesky",
                "youtube",
                "threads"
              ],
              "type": "string"
            }
          },
          {
            "name": "locationId",
            "required": true,
            "in": "query",
            "description": "Location ID",
            "schema": {
              "example": "1234",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommentsGetListBodyDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentsGetListResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedDTO"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnprocessableDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Location-Access": [
              "socialplanner/comments.readonly"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account.",
        "type": "http"
      },
      "Agency-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency (OR) Private Integration Token of Agency.",
        "type": "http"
      },
      "Agency-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency.",
        "type": "http"
      }
    },
    "schemas": {
      "CommentsGetListBodyDTO": {
        "type": "object",
        "properties": {
          "fromDate": {
            "type": "string",
            "description": "Start of the published-date window (ISO 8601). If provided, `toDate` is also required, and `fromDate` must be ≤ `toDate`. Omit both to disable date filtering.",
            "example": "2026-05-22T05:32:49.463Z"
          },
          "toDate": {
            "type": "string",
            "description": "End of the published-date window (ISO 8601). If provided, `fromDate` is also required.",
            "example": "2026-05-29T05:32:49.463Z"
          },
          "originIds": {
            "description": "Origin IDs of connected accounts to filter by",
            "example": [
              "1234",
              "5678",
              "9101"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "type": "string",
            "description": "Sort by top comments or latest comments",
            "example": "top",
            "default": "latest",
            "enum": [
              "top",
              "latest"
            ]
          },
          "search": {
            "type": "string",
            "description": "Search",
            "example": "1234"
          },
          "skip": {
            "type": "number",
            "description": "Pagination offset — number of comments to skip (zero-based). Must be ≥ 0.",
            "example": 0,
            "default": 0,
            "minimum": 0
          },
          "limit": {
            "type": "number",
            "description": "Pagination page size — number of comments to return. Must be between 1 and 100.",
            "example": 10,
            "default": 10,
            "minimum": 1,
            "maximum": 100
          },
          "parentId": {
            "type": "string",
            "description": "Parent ID — pass the internal post ID (for replies under a specific post) or the internal comment ID (for replies under a specific comment). Omit to list all top-level comments for the location filtered by `originIds`. Must be a valid 24-character internal ID, not the native platform ID.",
            "example": "6975b186f3442844ec07665b"
          }
        },
        "required": [
          "originIds"
        ],
        "title": "CommentsGetListBodyDTO"
      },
      "CommentsGetListResponseDTO": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Success or Failure",
            "example": true
          },
          "statusCode": {
            "type": "number",
            "description": "Status Code",
            "example": 201
          },
          "message": {
            "type": "string",
            "description": "Message",
            "example": "Fetched Comments"
          },
          "results": {
            "description": "Comments and pagination metadata",
            "example": {
              "comments": [
                {
                  "_id": "507f1f77bcf86cd799439011",
                  "platform": "facebook",
                  "platformCommentId": "122129390871181019_974705035458625",
                  "postId": "6a169db95c78177a5c24ef7c",
                  "originId": "956033194258752",
                  "isParentThread": true,
                  "isPost": false,
                  "message": "Nice post!",
                  "attachments": [
                    {
                      "type": "image/jpeg",
                      "url": "https://example.com/image.jpg"
                    }
                  ],
                  "author": {
                    "id": "123456789",
                    "name": "John Doe",
                    "profilePic": "https://example.com/avatar.jpg"
                  }
                }
              ],
              "meta": {
                "total": 42,
                "totalUnread": 7,
                "skip": 0,
                "limit": 10,
                "hasMore": true
              }
            },
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "comments": {
                    "description": "List of comments",
                    "example": [
                      {
                        "_id": "507f1f77bcf86cd799439011",
                        "platform": "facebook",
                        "platformCommentId": "122129390871181019_974705035458625",
                        "postId": "6a169db95c78177a5c24ef7c",
                        "originId": "956033194258752",
                        "isParentThread": true,
                        "isPost": false,
                        "message": "Nice post!",
                        "attachments": [
                          {
                            "type": "image/jpeg",
                            "url": "https://example.com/image.jpg"
                          }
                        ],
                        "author": {
                          "id": "123456789",
                          "name": "John Doe",
                          "profilePic": "https://example.com/avatar.jpg"
                        }
                      }
                    ],
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "_id": {
                          "type": "string",
                          "description": "Internal comment ID",
                          "example": "507f1f77bcf86cd799439011"
                        },
                        "platform": {
                          "type": "string",
                          "description": "Platform the comment was posted on",
                          "example": "facebook"
                        },
                        "platformCommentId": {
                          "type": "string",
                          "description": "Native platform comment ID",
                          "example": "122129390871181019_974705035458625"
                        },
                        "platformParentId": {
                          "type": "string",
                          "description": "Native platform parent ID (the post or comment this is a reply to)",
                          "example": "956033194258752_122129390871181019"
                        },
                        "platformPostId": {
                          "type": "string",
                          "description": "Native platform post ID",
                          "example": "122129390871181019"
                        },
                        "postId": {
                          "type": "string",
                          "description": "Internal post ID",
                          "example": "6a169db95c78177a5c24ef7c"
                        },
                        "originId": {
                          "type": "string",
                          "description": "Connected account / page ID on the native platform",
                          "example": "956033194258752"
                        },
                        "isParentThread": {
                          "type": "boolean",
                          "description": "True if this comment is a top-level comment on the post; false if it is a reply to another comment",
                          "example": true
                        },
                        "isPost": {
                          "type": "boolean",
                          "description": "True if this record represents the root post (not a comment)",
                          "example": false
                        },
                        "content": {
                          "type": "string",
                          "description": "Comment content. May be empty or missing for attachment-only comments.",
                          "example": "Nice post!"
                        },
                        "attachments": {
                          "description": "Attachments on the comment",
                          "example": [
                            {
                              "type": "image/jpeg",
                              "url": "https://example.com/image.jpg"
                            }
                          ],
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "description": "Attachment MIME type or platform-specific type",
                                "example": "image/jpeg"
                              },
                              "url": {
                                "type": "string",
                                "description": "Attachment URL",
                                "example": "https://example.com/image.jpg"
                              },
                              "thumbnail": {
                                "type": "string",
                                "description": "Thumbnail URL",
                                "example": "https://example.com/thumb.jpg"
                              },
                              "videoUrl": {
                                "type": "string",
                                "description": "Video URL (when attachment is a video)",
                                "example": "https://example.com/video.mp4"
                              }
                            },
                            "title": "CommentAttachmentDTO"
                          }
                        },
                        "author": {
                          "description": "Author of the comment. May be partial or missing for some sync paths.",
                          "example": {
                            "id": "123456789",
                            "name": "John Doe",
                            "profilePic": "https://example.com/avatar.jpg"
                          },
                          "allOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Platform author ID",
                                  "example": "123456789"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Author display name",
                                  "example": "John Doe"
                                },
                                "profilePic": {
                                  "type": "string",
                                  "description": "Author profile picture URL",
                                  "example": "https://example.com/avatar.jpg"
                                }
                              },
                              "title": "CommentAuthorDTO"
                            }
                          ]
                        },
                        "level": {
                          "type": "number",
                          "description": "Comment depth (0 = post, 1 = comment, 2 = reply)",
                          "example": 1
                        },
                        "likeCount": {
                          "type": "number",
                          "description": "Number of likes on the comment",
                          "example": 0
                        },
                        "reactionCount": {
                          "type": "number",
                          "description": "Number of reactions on the comment",
                          "example": 0
                        },
                        "replyCount": {
                          "type": "number",
                          "description": "Number of replies to the comment",
                          "example": 0
                        },
                        "shareCount": {
                          "type": "number",
                          "description": "Number of shares of the comment",
                          "example": 0
                        },
                        "repostCount": {
                          "type": "number",
                          "description": "Number of reposts of the comment (platform-specific)",
                          "example": 0
                        },
                        "quoteCount": {
                          "type": "number",
                          "description": "Number of quote posts (platform-specific)",
                          "example": 0
                        },
                        "previewLink": {
                          "type": "string",
                          "description": "Direct link to view the comment on the native platform",
                          "example": "https://www.facebook.com/.../posts/..."
                        },
                        "isRead": {
                          "type": "boolean",
                          "description": "Whether the comment has been read",
                          "example": false
                        },
                        "isDeleted": {
                          "type": "boolean",
                          "description": "Whether the comment was deleted",
                          "example": false
                        },
                        "isEdited": {
                          "type": "boolean",
                          "description": "Whether the comment was edited",
                          "example": false
                        },
                        "publishedAt": {
                          "format": "date-time",
                          "type": "string",
                          "description": "Time the comment was published on the native platform. May be missing for legacy or webhook-synced records.",
                          "example": "2026-04-01T10:00:00.000Z"
                        },
                        "createdAt": {
                          "format": "date-time",
                          "type": "string",
                          "description": "Time the comment record was created in the system",
                          "example": "2026-04-01T10:00:00.000Z"
                        },
                        "updatedAt": {
                          "format": "date-time",
                          "type": "string",
                          "description": "Time the comment record was last updated in the system",
                          "example": "2026-04-01T10:00:00.000Z"
                        }
                      },
                      "required": [
                        "_id",
                        "platform",
                        "postId",
                        "originId",
                        "isPost",
                        "likeCount",
                        "reactionCount",
                        "replyCount",
                        "shareCount",
                        "repostCount",
                        "quoteCount",
                        "isRead",
                        "isDeleted",
                        "isEdited"
                      ],
                      "title": "CommentItemDTO"
                    }
                  },
                  "meta": {
                    "description": "Pagination metadata",
                    "example": {
                      "total": 42,
                      "totalUnread": 7,
                      "skip": 0,
                      "limit": 10,
                      "hasMore": true
                    },
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "total": {
                            "type": "number",
                            "description": "Total comments matching the query",
                            "example": 42
                          },
                          "totalUnread": {
                            "type": "number",
                            "description": "Total unread comments matching the query",
                            "example": 7
                          },
                          "skip": {
                            "type": "number",
                            "description": "Pagination skip",
                            "example": 0
                          },
                          "limit": {
                            "type": "number",
                            "description": "Pagination limit",
                            "example": 10
                          },
                          "hasMore": {
                            "type": "boolean",
                            "description": "True if more pages exist beyond this batch",
                            "example": true
                          }
                        },
                        "required": [
                          "total",
                          "skip",
                          "limit",
                          "hasMore"
                        ],
                        "title": "CommentsListMetaDTO"
                      }
                    ]
                  }
                },
                "required": [
                  "comments",
                  "meta"
                ],
                "title": "CommentsGetListResultsDTO"
              }
            ]
          }
        },
        "required": [
          "success",
          "statusCode",
          "message",
          "results"
        ],
        "title": "CommentsGetListResponseDTO"
      },
      "BadRequestDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 400
          },
          "message": {
            "type": "string",
            "example": "Bad Request"
          }
        },
        "title": "BadRequestDTO"
      },
      "UnauthorizedDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 401
          },
          "message": {
            "type": "string",
            "example": "Invalid token: access token is invalid"
          },
          "error": {
            "type": "string",
            "example": "Unauthorized"
          }
        },
        "title": "UnauthorizedDTO"
      },
      "UnprocessableDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 422
          },
          "message": {
            "example": [
              "Unprocessable Entity"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "error": {
            "type": "string",
            "example": "Unprocessable Entity"
          }
        },
        "title": "UnprocessableDTO"
      }
    }
  }
}
```

## Code Examples

**cURL**

```bash
curl -L -X POST 'https://services.leadconnectorhq.com/social-media-posting/comments/<platform>/list?locationId=<LOCATIONID>' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Version: v3' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "fromDate": "2026-05-22T05:32:49.463Z",
  "toDate": "2026-05-29T05:32:49.463Z",
  "originIds": [
    "1234",
    "5678",
    "9101"
  ],
  "sortBy": "top",
  "search": "1234",
  "skip": 0,
  "limit": 10,
  "parentId": "6975b186f3442844ec07665b"
}'
```

**Node.js**

```javascript
const options = {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <TOKEN>',
    Version: 'v3',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
      "fromDate": "2026-05-22T05:32:49.463Z",
      "toDate": "2026-05-29T05:32:49.463Z",
      "originIds": [
        "1234",
        "5678",
        "9101"
      ],
      "sortBy": "top",
      "search": "1234",
      "skip": 0,
      "limit": 10,
      "parentId": "6975b186f3442844ec07665b"
  })
};

try {
  const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/comments/<platform>/list?locationId=<LOCATIONID>', options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**Python**

```python
import requests

url = "https://services.leadconnectorhq.com/social-media-posting/comments/{platform}/list"

headers = {
    "Authorization": "Bearer <TOKEN>",
    "Version": "v3"
}

params = {
    "locationId": "<LOCATIONID>"
}

payload = {
    "fromDate": "2026-05-22T05:32:49.463Z",
    "toDate": "2026-05-29T05:32:49.463Z",
    "originIds": [
        "1234",
        "5678",
        "9101"
    ],
    "sortBy": "top",
    "search": "1234",
    "skip": 0,
    "limit": 10,
    "parentId": "6975b186f3442844ec07665b"
}

response = requests.post(url, params=params, json=payload, headers=headers)
print(response.json())
```

**PHP**

```php
<?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://services.leadconnectorhq.com/social-media-posting/comments/<platform>/list?locationId=<LOCATIONID>',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer <TOKEN>',
    'Version: v3',
    'Content-Type: application/json',
  ],
  CURLOPT_POSTFIELDS => '{
  "fromDate": "2026-05-22T05:32:49.463Z",
  "toDate": "2026-05-29T05:32:49.463Z",
  "originIds": [
    "1234",
    "5678",
    "9101"
  ],
  "sortBy": "top",
  "search": "1234",
  "skip": 0,
  "limit": 10,
  "parentId": "6975b186f3442844ec07665b"
}',
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

**Java**

```java
HttpResponse<String> response = Unirest
  .post("https://services.leadconnectorhq.com/social-media-posting/comments/<platform>/list?locationId=<LOCATIONID>")
  .header("Authorization", "Bearer <TOKEN>")
  .header("Version", "v3")
  .header("Content-Type", "application/json")
  .body("{\"fromDate\":\"2026-05-22T05:32:49.463Z\",\"toDate\":\"2026-05-29T05:32:49.463Z\",\"originIds\":[\"1234\",\"5678\",\"9101\"],\"sortBy\":\"top\",\"search\":\"1234\",\"skip\":0,\"limit\":10,\"parentId\":\"6975b186f3442844ec07665b\"}")
  .asString();
```

**Go**

```go
package main

import (
  "fmt"
  "net/http"
  "io"
  "strings"
)

func main() {
  url := "https://services.leadconnectorhq.com/social-media-posting/comments/<platform>/list?locationId=<LOCATIONID>"
  payload := strings.NewReader(`{
  "fromDate": "2026-05-22T05:32:49.463Z",
  "toDate": "2026-05-29T05:32:49.463Z",
  "originIds": [
    "1234",
    "5678",
    "9101"
  ],
  "sortBy": "top",
  "search": "1234",
  "skip": 0,
  "limit": 10,
  "parentId": "6975b186f3442844ec07665b"
}`)
  req, _ := http.NewRequest("POST", url, payload)
  req.Header.Add("Authorization", "Bearer <TOKEN>")
  req.Header.Add("Version", "v3")

  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}
```

**Ruby**

```ruby
require 'uri'
require 'net/http'

url = URI("https://services.leadconnectorhq.com/social-media-posting/comments/<platform>/list?locationId=<LOCATIONID>")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <TOKEN>"
request["Version"] = "v3"
request["Content-Type"] = "application/json"
request.body = '{
  "fromDate": "2026-05-22T05:32:49.463Z",
  "toDate": "2026-05-29T05:32:49.463Z",
  "originIds": [
    "1234",
    "5678",
    "9101"
  ],
  "sortBy": "top",
  "search": "1234",
  "skip": 0,
  "limit": 10,
  "parentId": "6975b186f3442844ec07665b"
}'

response = http.request(request)
puts response.read_body
```

**PowerShell**

```powershell
$headers = @{
  "Authorization" = "Bearer <TOKEN>"
  "Version" = "v3"
}

$body = '{
  "fromDate": "2026-05-22T05:32:49.463Z",
  "toDate": "2026-05-29T05:32:49.463Z",
  "originIds": [
    "1234",
    "5678",
    "9101"
  ],
  "sortBy": "top",
  "search": "1234",
  "skip": 0,
  "limit": 10,
  "parentId": "6975b186f3442844ec07665b"
}'

$response = Invoke-RestMethod -Uri 'https://services.leadconnectorhq.com/social-media-posting/comments/<platform>/list?locationId=<LOCATIONID>' -Method 'POST' -Headers $headers -Body $body -ContentType 'application/json'
$response | ConvertTo-Json
```
