Get Social Post Comments
curl --request GET \
--url https://api.example.com/social/post/{post_id}/commentsimport requests
url = "https://api.example.com/social/post/{post_id}/comments"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/social/post/{post_id}/comments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/social/post/{post_id}/comments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/social/post/{post_id}/comments"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/social/post/{post_id}/comments")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/social/post/{post_id}/comments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodySocial
Get Social Post Comments
Get comments for a social post.
GET
/
social
/
post
/
{post_id}
/
comments
Get Social Post Comments
curl --request GET \
--url https://api.example.com/social/post/{post_id}/commentsimport requests
url = "https://api.example.com/social/post/{post_id}/comments"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/social/post/{post_id}/comments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/social/post/{post_id}/comments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/social/post/{post_id}/comments"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/social/post/{post_id}/comments")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/social/post/{post_id}/comments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyReturns comments for a published social post with a fixed normalized shape. Responses are bounded so they are safe to consume from agents and automation jobs.
Use the
When
post_id returned by POST /social/post.
Comments and nested replies are sorted by created_at descending. Comments without created_at are returned after comments with timestamps. Ties are ordered by platform, then comment_id, then platform_comment_id. Top-level comments are sorted before pagination.
Request
curl -X GET "https://api.mosaic.so/social/post/2d8ca860-f8e0-4f3f-9f2c-337ead6ed91e/comments" \
-H "Authorization: Bearer mk_your_api_key"
Query Parameters
| Field | Type | Required | Description |
|---|---|---|---|
social_connection_id | string (uuid) | No | Get comments using one specific connected account. Useful when a post targets multiple accounts on the same platform. |
limit | integer | No | Maximum comments to return. Defaults to 100; maximum is 1000. |
cursor | string | No | Cursor returned by the previous response. |
Platform Support
Comments are supported forx, linkedin, instagram, facebook, tiktok, and youtube.
Comment Object
Every item incomments and every item in comments[].replies has exactly these normalized fields:
| Field | Type | Description |
|---|---|---|
comment_id | string or null | Mosaic-normalized comment ID. |
platform_comment_id | string or null | Native comment ID from the destination platform. |
platform | string or null | One of x, linkedin, instagram, facebook, tiktok, youtube. |
social_connection_id | string or null | Connected account used for the lookup. |
text | string or null | Comment text. |
created_at | string or null | Creation timestamp. null if the source response does not include it. |
comment_url | string or null | Direct comment URL. null if the source response does not include it. |
like_count | number or null | Like count. null if the source response does not include it. |
reply_count | number or null | Reply count. null if the source response does not include it. |
parent_comment_id | string or null | Parent comment ID for replies. null for top-level comments or when the source response does not include it. |
author | object or null | Fixed author object. null if the source response does not include author metadata. |
media | array | Media attachments on the comment. Always an array. |
replies | array | Nested comments. Always an array. |
raw | object or null | Unnormalized platform-specific comment payload. |
author is not null, it has exactly these fields: id, name, username, profile_url, and profile_image_url. Each value is a string or null.
Every item in media has exactly these fields: type, url, thumbnail_url, mime_type, alt_text, and raw. type is one of image, video, gif, audio, document, or unknown.
Response
{
"post_id": "2d8ca860-f8e0-4f3f-9f2c-337ead6ed91e",
"platform": "linkedin",
"social_connection_id": "7f9388af-26e8-4e68-a52b-6b9a0ef3a017",
"comments": [
{
"comment_id": "comment_123",
"platform_comment_id": "urn:li:comment:123",
"platform": "linkedin",
"social_connection_id": "7f9388af-26e8-4e68-a52b-6b9a0ef3a017",
"text": "Looks great.",
"created_at": "2026-03-10T17:12:00Z",
"comment_url": "https://www.linkedin.com/feed/update/urn:li:activity:7351291821454032896?commentUrn=...",
"like_count": 12,
"reply_count": 2,
"parent_comment_id": null,
"author": {
"id": null,
"name": "Mosaic",
"username": "mosaic-so",
"profile_url": "https://www.linkedin.com/company/mosaic-so",
"profile_image_url": null
},
"media": [
{
"type": "image",
"url": "https://media.example.com/comment-image.jpg",
"thumbnail_url": null,
"mime_type": null,
"alt_text": null,
"raw": {
"type": "image",
"url": "https://media.example.com/comment-image.jpg"
}
}
],
"replies": [
{
"comment_id": "comment_reply_456",
"platform_comment_id": "urn:li:comment:456",
"platform": "linkedin",
"social_connection_id": "7f9388af-26e8-4e68-a52b-6b9a0ef3a017",
"text": "Thanks!",
"created_at": "2026-03-10T17:20:00Z",
"comment_url": null,
"like_count": null,
"reply_count": null,
"parent_comment_id": "comment_123",
"author": null,
"media": [],
"replies": [],
"raw": {
"comment": "Thanks!",
"created": "2026-03-10T17:20:00Z"
}
}
],
"raw": {
"comment": "Looks great.",
"commentUrn": "urn:li:comment:123",
"created": "2026-03-10T17:12:00Z",
"likeCount": 12
}
}
],
"pagination": {
"limit": 100,
"returned": 1,
"total_available": 1,
"has_more": false,
"next_cursor": null,
"sort": "created_at_desc"
},
"metadata": {
"status": "success"
}
}
Pagination
- Comments are available after the post is published.
- Normalized comment fields are fixed. Platform-specific fields are only returned inside
raw. - Image, video, and other comment attachments are normalized into
media; the original attachment payload remains inmedia[].raw. - Pagination cursors are based on the sorted response window.
- This endpoint paginates the comments available in the current response window. It is not a guaranteed complete historical archive for posts with very high comment volume.
- Some platforms return only a recent comments window, and comment data can update asynchronously.
- This endpoint reads comments. It does not create, reply to, hide, or delete comments.
Was this page helpful?