Skip to main content
POST
Post Comments

Post Comments

Cost: 10 credits / successful request. This endpoint retrieves comments from a LinkedIn post. Simply provide the LinkedIn post URL and the API will extract the activity ID automatically and return paginated comments.

Post comments endpoint

This endpoint allows you to get comments from any LinkedIn post by providing its URL.

Required attributes

string
required
The LinkedIn post URL. Supports multiple URL formats:
  • https://www.linkedin.com/posts/username_slug-activity-7430615551086850048-XXXX
  • https://www.linkedin.com/posts/username_slug-ugcPost-7430527985071595520-XXXX
  • https://www.linkedin.com/feed/update/urn:li:activity:7430615551086850048

Optional attributes

integer
default:"1"
Page number for pagination. Use the cursor value from the previous response to get the next page.

Response

The post comments model

Properties

integer | null
The next page number for pagination. Pass this value as the page parameter in your next request. Returns null when there are no more pages.
object
The response payload containing comments.

Pagination

To paginate through all comments:
  1. Make an initial request without the page parameter (defaults to page 1).
  2. Check the cursor field in the response.
  3. If cursor is not null, make another request with page set to the cursor value.
  4. Repeat until cursor returns null.
Example