API Reference/Endpoints
List comments on a post
GET/api/linkedin/gateway/posts/{post_id}/comments
Pages through the top-level comments on a post. Point comment_id at one of those comments instead to page through its replies.
Authentication
Send your personal API key as a bearer token. A missing, malformed or revoked key returns 401.
Path parameters
FieldTypeDescription
post_id *stringThe post's social_id, not necessarily the id visible in its URL.
Query parameters
FieldTypeDescription
account_id *stringA connected account's id.
comment_idstringList replies to this comment instead of the post's top-level comments.
sort_by"MOST_RECENT" | "MOST_RELEVANT"Defaults to MOST_RECENT.
limitnumber1–100. Defaults to 100.
cursorstringFrom the previous page's cursor field, to continue paging.
Response fields
FieldTypeDescription
object"CommentList"Always this value.
itemsarrayComments (or replies, when comment_id was set), newest or most-relevant first.
cursorstring | nullPass back as cursor to fetch the next page. Null once exhausted.
total_itemsnumber | nullTotal comments available, when the provider reports one.
pagingobjectProvider-level paging detail: { start, page_count, total_count }.
Errors
·401 Unauthorized. The key is missing, malformed or has been rotated.·403 Forbidden. The account_id doesn't belong to this key.·404 Not Found. No post — or, if comment_id was set, no comment — exists for that id.