API referenceLinkedin posts
GET
/api/v1/posts/{postId}/comments

The post's own comments (replies are a comment's, with comment_id), newest first by default, a page of limit. Pass cursor back for the next page; null on the last.

Authorization

X-API-KEY<token>

Your API key from the console (gw_live_…).

In: header

Path Parameters

postId*string

The post's social_id (urn:li:activity:… or urn:li:ugcPost:…), as a post read gives it.

Query Parameters

account_id*string

The LinkedIn account (lg_…) to act as.

Length1 <= length
limit?integer

Comments per page, 1 to 50. Default 50.

Range1 <= value <= 50
Default50
cursor?string

The cursor the previous page answered, passed back unchanged, for the next page. Leave it out for the first page; a null cursor means there is no next page. Opaque: its form differs by route.

sort_by?string

MOST_RECENT (the default, newest first) or MOST_RELEVANT (LinkedIn's relevance order). Ignored with comment_id: a comment's replies come oldest first.

Default"MOST_RECENT"

Value in

  • "MOST_RECENT"
  • "MOST_RELEVANT"
comment_id?string

A comment's id from this list, or its number alone: the replies of that comment instead of the post.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/posts/urn:li:activity:7390000000000000000/comments?account_id=lg_3f9c2a7b1d"
{  "object": "CommentList",  "items": [    {      "object": "Comment",      "id": "urn:li:fsd_comment:(7390000000000000123,urn:li:activity:7390000000000000000)",      "post_id": "urn:li:activity:7390000000000000000",      "author": "Jane Doe",      "author_details": {        "id": "ACoAAB1a2b3c4d5e6f",        "headline": "Head of Sales at Example Corp",        "profile_url": "https://www.linkedin.com/in/jane-doe",        "profile_picture_url": null,        "network_distance": null      },      "date": "2026-10-31T09:30:00.000Z",      "text": "Great news!",      "reaction_counter": 2,      "reply_counter": 1,      "is_reply": false    }  ],  "cursor": null,  "paging": {    "page_count": 1  }}