Get Post Comments
GET /get-post-comments
Get the list of comments on a LinkedIn post.
Pricing
2 credits per call.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
post_urn | string | Yes | LinkedIn post URN (e.g., urn:li:activity:1234567890) |
sort_by | string | No | Sort order: recent or relevant (default: recent) |
start | integer | No | Starting offset (default: 0) |
Example Request
- cURL
- Python
- Node.js
curl --request GET \
--url 'https://api.infoplug.io/get-post-comments?post_urn=urn:li:activity:1234567890' \
--header 'X-INFOPLUG-API-KEY: YOUR_API_KEY'
import requests
url = "https://api.infoplug.io/get-post-comments"
params = {
"post_urn": "urn:li:activity:1234567890"
}
headers = {
"X-INFOPLUG-API-KEY": "YOUR_API_KEY"
}
response = requests.get(url, headers=headers, params=params)
print(response.json())
const response = await fetch(
'https://api.infoplug.io/get-post-comments?post_urn=urn:li:activity:1234567890',
{
headers: {
'X-INFOPLUG-API-KEY': 'YOUR_API_KEY'
}
}
);
const data = await response.json();
console.log(data);
Example Response
- 200 OK
- 400 Bad Request
- 401 Unauthorized
{
"data": {
"comments": [
{
"commenter_name": "Bob Johnson",
"commenter_linkedin_url": "https://www.linkedin.com/in/bobjohnson/",
"commenter_headline": "Software Engineer at Startup Inc",
"text": "Great insights! Thanks for sharing.",
"posted_at": "2024-01-15T12:30:00Z",
"reactions_count": 10,
"replies_count": 2
}
],
"paging": {
"start": 0,
"count": 50,
"total": 75
}
}
}
{
"message": "invalid_parameter",
"parameter": "post_urn",
"details": "Post URN is required"
}
{
"message": "unauthorized",
"details": "Invalid or missing API key"
}
Related Endpoints
- Search Posts - Search for posts
- Get Post Reactions - Get reactions on a post