st.retrievePostComments
This action allows you to retrieve comments for a certain post.
Constraints
⏺️
Root Start: allowed, when
postUrl parameter is provided.⬆️
Parent Actions: st.openPost.
⬇️
Child Actions: N/A.
Parameters
{
"actionType": "st.retrievePostComments",
"postUrl": "https://www.linkedin.com/posts/post1",
"replies": true,
"limit": 10,
"sort": "mostRelevant",
"label": "post1Comments"
}
postUrl(required for root start, forbidden for parent start) – LinkedIn URL of the post.replies(optional, default:false) – when set totrue, the action includes replies to the comments in the results.limit(optional) – number of comments to retrieve. Also applies to the replies ifrepliesset totrue. Defaults to 10, with a maximum value of 500.sort(optional, default:mostRelevant) – enum representing comments sorting. Options:mostRelevant– show most relevant comments first.mostRecent– show most recent comments first.
label(optional) – custom label for tracking this action in workflow completion.
Result options
- Successful comments retrieval:
{
"actionType": "st.retrievePostComments",
"label": "post1Comments",
"success": true,
"data": [
{
"commenterUrl": "https://www.linkedin.com/in/john-doe",
"commenterName": "John Doe",
"commenterHeadline": "Product Manager",
"commenterType": "person",
"time": "3d",
"text": "Great work!",
"image": null,
"isReply": false,
"reactionsCount": 3,
"repliesCount": 2
},
{
"commenterUrl": "https://www.linkedin.com/in/person1",
"commenterName": "Jane Doe",
"commenterHeadline": "Helping companies to use AI",
"commenterType": "person",
"time": "3d",
"text": "Agree with you!",
"image": null,
"isReply": true,
"reactionsCount": 0,
"repliesCount": 0
},
{
"commenterUrl": "https://www.linkedin.com/company/company1",
"commenterName": "CloseAI",
"commenterHeadline": "2548 followers",
"commenterType": "company",
"time": "1w",
"text": null,
"image": "https://static.linkedin.com/image1.jpg",
"isReply": false,
"reactionsCount": 8,
"repliesCount": 4
}
]
}
label– included only if specified in the action parameters.data– array of comments.commenterUrl– public URL of the person or company.commenterName– full name of the person or company.commenterHeadline– headline of the person or company.commenterType– commenter type. Enum with the following values:person– commenter is a person.company– commenter is a company.
time– free-form string indicating comment time. For example:6d,2wor1y.text– text content of the comment, if available.image– URL of the comment's image, if available.isReply– boolean value indicates if this comment is a reply to another comment.reactionsCount– number of reactions on the comment.repliesCount– number of replies on the comment. Always returns0ifisReplyis true.
- Failed comments retrieval:
{
"actionType": "st.retrievePostComments",
"success": false,
"label": "post1"
"error": {
"type": "postNotFound",
"message": "The provided URL is not an existing LinkedIn post."
}
}
label– included only if specified in the action parameters.error.type– enum with the following possible values:postNotFound– provided URL is not an existing LinkedIn post.