API · LinkedIn
GET /linkedin/posts/{post}/comments
Every comment on a LinkedIn post with its author, headline and likes, most relevant or newest first, paginated.
| |
|---|
| Request | GET /v1/linkedin/posts/{post}/comments |
| Operation id | linkedin.post.comments |
| Cost | 5 credits, refunded if the call fails |
| Auth | API key: Authorization: Bearer <key> or x-api-key. |
Every comment on a LinkedIn post with its author, headline and likes, most relevant or newest first, paginated.
| Name | Type | Required | Description |
|---|
post | string | yes | The post: its URL, activity id, or urn (urn:li:activity|ugcPost|share:<id>), as linkedin_post_get takes. Example: 7400000000000000001. |
| Name | Type | Required | Description |
|---|
sort | "relevance" | "newest" | no | relevance (LinkedIn’s default) or newest. One of relevance, newest. |
after | string | no | Cursor: the previous page’s after, unchanged. |
account | string | no | Optional: the id of a LinkedIn account you connected (POST /v1/linkedin/accounts). The read then runs as that account (what it can see, its network distance) instead of on the shared pool. Example: csn_01JDX9EXAMPLE0000000000. |
| Status | Meaning | Schema |
|---|
200 | A page of comments. | LinkedInCommentsPage |
400 | Invalid input. Nothing was charged. | Error |
401 | Missing or invalid API key. | Error |
402 | Not enough credits, a spend cap was reached, or payment is required. | Error |
403 | The target is private, or the account is suspended. | Error |
404 | LinkedIn has no such public page, or it was removed. | Error |
429 | Too many requests. Wait for Retry-After seconds. | Error |
503 | LinkedIn is temporarily unavailable. Retryable; nothing was charged. | Error |
| Field | Type | Description |
|---|
total | integer | null | |
data | LinkedInComment[] | |
after | string | null | Pass as after for the next page; null at the end. |
Errors use one shape everywhere; see Errors for every code and what to do.