curl https://api.infinipost.co/v1/posts/post_abc123/comments?limit=10 \
-H "Authorization: Bearer YOUR_API_KEY"
const response = await fetch('https://api.infinipost.co/v1/posts/post_abc123/comments?limit=10', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();
{
"data": [
{
"id": "cmt_xyz789",
"postId": "post_abc123",
"username": "user123",
"text": "Amazing content! 🔥",
"likes": 45,
"replies": 3,
"createdAt": "2024-04-21T20:25:00Z"
},
{
"id": "cmt_abc456",
"postId": "post_abc123",
"username": "user456",
"text": "Love this!",
"likes": 12,
"replies": 0,
"createdAt": "2024-04-21T20:26:00Z"
}
],
"total": 47,
"hasMore": true
}
Engagement
Get Comments
Retrieve comments for a post
GET
/
v1
/
posts
/
{id}
/
comments
curl https://api.infinipost.co/v1/posts/post_abc123/comments?limit=10 \
-H "Authorization: Bearer YOUR_API_KEY"
const response = await fetch('https://api.infinipost.co/v1/posts/post_abc123/comments?limit=10', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();
{
"data": [
{
"id": "cmt_xyz789",
"postId": "post_abc123",
"username": "user123",
"text": "Amazing content! 🔥",
"likes": 45,
"replies": 3,
"createdAt": "2024-04-21T20:25:00Z"
},
{
"id": "cmt_abc456",
"postId": "post_abc123",
"username": "user456",
"text": "Love this!",
"likes": 12,
"replies": 0,
"createdAt": "2024-04-21T20:26:00Z"
}
],
"total": 47,
"hasMore": true
}
Path Parameters
string
required
The post ID.
Query Parameters
number
default:"50"
Number of comments to return (max 100).
number
default:"0"
Number of comments to skip for pagination.
Response
array
Array of comment objects.
number
Total number of comments.
boolean
Whether there are more comments beyond this page.
curl https://api.infinipost.co/v1/posts/post_abc123/comments?limit=10 \
-H "Authorization: Bearer YOUR_API_KEY"
const response = await fetch('https://api.infinipost.co/v1/posts/post_abc123/comments?limit=10', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();
{
"data": [
{
"id": "cmt_xyz789",
"postId": "post_abc123",
"username": "user123",
"text": "Amazing content! 🔥",
"likes": 45,
"replies": 3,
"createdAt": "2024-04-21T20:25:00Z"
},
{
"id": "cmt_abc456",
"postId": "post_abc123",
"username": "user456",
"text": "Love this!",
"likes": 12,
"replies": 0,
"createdAt": "2024-04-21T20:26:00Z"
}
],
"total": 47,
"hasMore": true
}
⌘I