Get LinkedIn Post Comments

View all LinkedIn Data API endpoints →

Supply post_id with optional post_type, page and sort_order. The documented data entries include id, urn, comment, commenter, created_at, num_replies, replies, previous_replies_token, reaction_counts and edit, pin or author flags. page, total and has_more describe the comment page. Retain parent comment IDs and returned reply continuation data when a separate request is needed for additional replies.

API Features

Post-scoped discussion pages post_id identifies the discussion; page selects a comment page.
Comment ordering choices sort_order supports relevance or recent, separate from post-search sorting values.
Commenter and moderation context The sample includes commenter details with is_author, is_edited and is_pinned flags.
Reply-thread handoff fields Keep comment id and previous_replies_token for get-comments-replies when more thread context is available.

Live API Demo

GET /api/project/linkedin-scraper/get-post-comments

Request cost is temporarily unavailable. No price is assumed.

View pricing

API Response (JSON)

{}
curl -X GET 'https://api.opendata-api.com/api/project/linkedin-scraper/get-post-comments?key=<API_KEY>&post_id=<post_id>&page=1&post_type=activity&sort_order=relevance'
📢
Need Help?
If you encounter API issues or need other API requirements, please contact us.
Contact Us

Use Cases

Frequently asked questions

How do I retrieve more replies for a comment?

Keep post_id, the returned comment id and previous_replies_token. Send those through get-comments-replies using its replies_cursor public input for the returned continuation value.

Which post_type and sort_order values are supported?

post_type supports activity or ugc and defaults to activity. sort_order supports relevance or recent and defaults to relevance. Preserve the selected post's type rather than guessing one for unrelated records.

Related operations

Guides

View Subscription Plans →