POST COMMENTS API
Every Comment on a Post, With Who Wrote It
Send a post URL and get its comments as JSON: the commenter, the text, the time, reaction counts and the replies under each one. Sort newest first or by relevance, and page through with a cursor.
POST/api/v1/post/comments
{
"cursor": null,
"message": {
"comments": [
{
"commenter": { "title": "Example Co", ... },
"text": "Awesome work Pratik Dani",
"replies_count": 0
}
],
"total": 2
}
}What is the Datamagnet Post Comments API?
The Datamagnet Post Comments API returns the comments on a post as structured JSON, from the post URL. Each comment includes the commenter’s name, headline and profile link, the text, the time it was posted, reaction counts, and the replies under it. Comments come newest first or by relevance, and a page cursor walks the full list.
- Input
- Post URL
- Cost
- 10 credits per page
- Freshness
- Live at request time
One request
Authenticate with your API key as a bearer token and send a JSON body. This is the request behind the sample response.
POST /api/v1/post/comments- Input: Post URL
- Cost: 10 credits per page
curl -X POST \
"https://api.datamagnet.co/api/v1/post/comments" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"url": "https://www.linkedin.com/feed/update/urn:li:activity:7321383686006882304", "sort": "recent"}'→ 200 OK · 10 credits
{ "cursor": null, "message": { "comments": [ { "commenter": { "title": "Example Co", "subtitle": "22,134 followers", "navigation_url": "https://www.linkedin.com/company/example-co/posts" }, "text": "Awesome work Pratik Dani", "timestamp": 1745566104897, "pinned": false, "replies_count": 0, "top_replies": [] } ], "total": 2 }}
What you get
The main fields in the response. The Post Comments reference documents every field.
| Field | Type | Description |
|---|---|---|
commenter.title | string | Name of the person or page that commented. |
commenter.subtitle | string | The commenter’s headline. |
commenter.navigation_url | string | Link to the commenter’s profile or page (/in/, /company/ or /school/). |
commenter.is_post_author | boolean | null | true when the commenter wrote the post. |
text | string | Text of the comment. |
times | string | ISO 8601 time the comment was posted. timestamp holds the same in milliseconds. |
permalink | string | Direct link to the comment. |
reactions_count | integer | null | Total reactions on the comment, with a by-type breakdown in reaction_type_counts. |
replies_count | integer | Number of replies to the comment. |
top_replies | array | Replies to the comment, in the same shape as a comment. |
mentions | array | People and companies tagged in the comment. |
total | integer | Number of top-level comments on the post. Replies are not counted here. |
Use cases
Lead lists from engagement
Everyone who commented on a competitor’s launch or an industry post, with a profile link you can pass to the People API for the full profile.
Read the conversation
Feed comment and reply text into analysis or an AI agent to find questions, objections and recurring themes under a post.
Track replies on your posts
Sort by recent to pick up new comments on your own posts, and use is_post_author to separate your replies from everyone else’s.
Frequently asked questions
Pull your first comments with 10 free credits
No credit card required. Get an API key and turn a post’s comments into a list in a few minutes.
- 10 credits per page
- Charged only on success
- Replies nested under each comment
Interactive Demo
~15 minutes
Get your API key
1 minPOST a post URL
1 minPage until cursor is null
Instant