curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/comments/Ut1fWU6XkqkMayHGnJZ
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/comments/Ut1fWU6XkqkMayHGnJZ",
{
method: "GET",
headers: {
Authorization: `Bearer ${API_KEY}`,
},
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
headers = {'Authorization': 'Bearer API_KEY'}
r = requests.get('https://api.ayrshare.com/api/comments/Ut1fWU6XkqkMayHGnJZ', headers=headers)
print(r.json())
<?php
$apiUrl = 'https://api.ayrshare.com/api/comments/Ut1fWU6XkqkMayHGnJZ'; // Replace with your post ID
$apiKey = 'API_KEY'; // Replace 'API_KEY' with your actual API key
$headers = [
'Content-Type: application/json',
'Authorization: Bearer ' . $apiKey,
];
$curl = curl_init($apiUrl);
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => $headers
]);
$response = curl_exec($curl);
if ($response === false) {
echo 'Curl error: ' . curl_error($curl);
} else {
echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
}
curl_close($curl);
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace CommentsGETRequest_csharp
{
class CommentsGET
{
private static readonly HttpClient client = new HttpClient();
static async Task Main(string[] args)
{
string API_KEY = "API_KEY";
string url = "https://api.ayrshare.com/api/comments/Ut1fWU6XkqkMayHGnJZ";
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + API_KEY);
try
{
HttpResponseMessage response = await client.GetAsync(url);
response.EnsureSuccessStatusCode();
string responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (HttpRequestException e)
{
Console.WriteLine($"Error: {e.Message}");
}
}
}
}
{
"bluesky": [
{
"comment": "Nice one this is",
"commentId": "at://did:plc:62musrcyanhro2lydyhlw7ci/app.bsky.feed.post/3lf4b4j3dqy2i",
"created": "2025-01-06T23:12:58.950Z",
"displayName": "Ayrshare",
"likeCount": 0,
"platform": "bluesky",
"profileImageUrl": "https://cdn.bsky.app/img/avatar/plain/did:plc:62musrcyanhro2lydyhlw7ci/bafkreiegtpqhpwgu6tww2ejsdil4ew3blmt6jh3wlq6zhanxo3wj2ib4du@jpeg",
"quoteCount": 0,
"replies": [],
"replyCount": 0,
"replyTo": "at://did:plc:n7atrjd22xgkmgwig6dzlhzd/app.bsky.feed.post/3lez7fwx45723",
"repostCount": 0,
"userName": "ayrshare.com"
}
],
"facebook": [
{ // The most recent 1,000 comments retrieved.
"comment": "What a great comment",
"commentId": "806720068141593_1849585385469876", // Facebook Social Comment ID
"commentCount": 1, // The number of replies to the comment
"commentUrl": "https://www.facebook.com/106148652329/posts/184958538876/", // URL to the comment
"created": "2024-02-27T19:55:28Z",
"from": { // If available. Facebook determines availability based on the user's security profile and settings.
"name": "John Smith",
"id": "5075334022535844"
},
"likeCount": 342,
"platform": "facebook",
"userLikes": false,
"replies": [ // Facebook replies to replies have the same parent id regardless of nesting.
{
"comment": "Nice Comment 2",
"commentId": "806720068141593_320599703877348",
"commentCount": 0,
"company": true,
"created": "2024-02-27T19:55:40Z",
"from": {
"name": "Sue Me",
"id": "5075334022535800"
},
"likeCount": 3,
"parent": {
"createdTime": "2024-02-27T19:55:28+0000",
"from": {
"name": "John Smith",
"id": "5075334022535844"
},
"message": "What a great comment",
"id": "806720068141593_1849585385469876"
},
"platform": "facebook",
"userLikes": false
}
]
}
],
"instagram": [
{ // The most recent 1,000 comments retrieved.
"comment": "Love this post.",
"commentId": "18030599567251077", // Instagram Social Comment ID
"created": "2022-10-13T00:52:47Z",
"from": { // If available. Instagram determines availability based on the user's security profile and settings.
"name": "WondrousTimes",
"id": "112775157855689"
},
"hidden": false, // Is the comment hidden
"likeCount": 1,
"parentId": "17999860012861", // The Instagram Social Post ID of the parent post. Only returned when using get by ID on a reply.
"platform": "instagram",
"postId": "18011025266302661", // The Instagram top level post ID (original post).
"replies": [
{
"comment": "@ayrshare Thanks",
"created": "2024-04-04T22:37:39Z",
"from": {
"id": "178414522127073334",
"username": "ayrshare"
},
"hidden": false,
"id": "18023114651100610", // Instagram Social Comment Id
"likeCount": 2,
"parentId": "18030599567251077",
"user": {
"id": "17841452212702234"
},
"username": "ayrshare"
}
],
"user": { // ID of Instagram user who created the comment.
"id": "112775157855689"
},
"userName": "ayrshare" // If available. Instagram determines availability based on the user's security profile and settings.
}
],
// Retrieve LinkedIn replies to comments by using the commentID with the Get Comments with Social Comment ID endpoint.
"linkedin": [
{
"comment": "New wonderful comment",
"commentId": "6961077099692445688", // LinkedIn Social Comment ID
"commentUrn": "urn:li:comment:(urn:li:activity:7141202289402236928,7141205176207503360)", // Social comment id from LinkedIn
"created": "2022-08-04T21:55:11Z",
"from": {
"name": "Sue Smith",
"id": "yb8P0Oq5l8",
"url": "https://www.linkedin.com/in/suesmith",
"description": "Co-Founder at Smiths"
},
"likeCount": 34,
"media": [
{
"type": "image",
"url": "https://media-exp1.licdn.com/dms/image/D4E2CAQH4RRMRaJSR"
}
],
"platform": "linkedin",
"profileImageUrl": "https://media-exp1.licdn.com/dms/image/C5103AQHORT70jVfK",
"userName": "suesmith"
},
{ // Comment from a company
"comment": "Love it",
"commentId": "urn:li:comment:(urn:li:activity:71860989603258818,7186100659052515329)",
"commentUrn": "urn:li:comment:(urn:li:activity:71860989603258818,7186100659052515329)",
"created": "2024-04-16T20:38:28Z",
"founded": 2020,
"from": {
"name": "Ayrshare",
"id": 22327643,
"url": "https://www.linkedin.com/company/22327643",
"description": "Social Media API"
},
"likeCount": 123,
"organizationType": "PRIVATELY_HELD",
"platform": "linkedin",
"userName": "ayrshare",
"website": "https://www.ayrshare.com"
}
],
"reddit": [
{
"comment": "Nice comment",
"commentId": "kaxeilk",
"created": "2023-11-27T03:09:06.000Z",
"from": {
"name": "suppercomment",
"id": "t2_3zaxa"
},
"commentUrl": "/r/test/comments/184szm7/reddit_post_title/kaxeilk/",
"subreddit": "test",
"ups": 1,
"isSubmitter": true
}
],
"threads": [
{
"comment": "An amazing comment!",
"commentId": "17890924860234841",
"commentUrl": "https://www.threads.com/@ayrshare/post/DI4pRHAto1",
"created": "2025-04-25T21:43:57+0000",
"hasReplies": false,
"isQuotePost": false,
"isReply": true,
"isReplyOwnedByMe": true,
"mediaType": "text_post",
"parentId": "17890643139123706",
"platform": "threads",
"postId": "17890643139123706",
"replies": [
{
"comment": "sweet",
"commentId": "17961516995911683",
"commentUrl": "https://www.threads.com/@ayrshare/post/DI4shgspzI1",
"created": "2025-04-25T22:12:22+0000",
"hasReplies": false,
"isQuotePost": false,
"isReply": true,
"isReplyOwnedByMe": true,
"mediaType": "text_post",
"parentId": "17890924860234841",
"platform": "threads",
"postId": "17890643139123706",
"replyAudience": "everyone",
"shortcode": "DI4shgspzI1",
"userName": "ayrshare"
}
],
"replyAudience": "everyone",
"shortcode": "DI4pRHAtoVu",
"userName": "ayrshare"
}
],
"tiktok": [
{
"comment": "The best comment",
"commentId": "7260964914699764523", // TikTok Social Comment ID
"created": "2023-07-28T20:12:23Z",
"displayName": "John Smith",
"liked": false, // Whether the user who posted the video has liked the comment.
"likeCount": 24,
"owner": true, // Whether the user who posted the video made the comment.
"pinned": false, // If the comment is pinned
"platform": "tiktok",
"profileImageUrl": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/f123c4b57",
"replies": [
{
"comment": "One reply",
"commentId": "72776074297628920", // TikTok Social Comment ID
"createTime": "2023-09-11 16:34:20",
"liked": false, // Whether the user who posted the video has liked the comment reply.
"likes": 0,
"owner": false, // Whether the user who posted the video made the comment reply.
"parentCommentId": "72776073973290774", // TikTok Parent Social Comment ID
"profileImageUrl": "https://p16-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/bcc6e6778x168.jpeg",
"status": "PUBLIC",
"userId": "51e0cb95a8b14f0f1020aa017",
"username": "ayrshare",
"videoId": "7260964048362310958" // TikTok Social Post ID
}
],
"status": "success",
"userId": "fc904564301a6d383fd19bd4982ba2682404876533c04741a8c3f270376cd3dd",
"username": "helmar1066",
"videoId": "7260964048362310958", // TikTok Social Post ID
"visibility": "public"
}
],
"twitter": [
{
"bookmarkCount": 2,
"comment": "@ayrshare Congrats on this",
"commentId": "1505595871831891068", // Twitter Social Comment ID
"created": "2022-05-14T21:56:14.000Z",
"description": "Eat great!",
"id": "1552209331030036480", // Twitter Social Post ID
"impressionCount": 134,
"likeCount": 341,
"name": "waffles",
"platform": "twitter",
"profileImageUrl": "https://pbs.twimg.com/profile_images/119426890464/lvQZPpt4_normal.png",
"publicMetrics": { // X public metrics of the user who posted the comment
"followersCount": 56,
"followingCount": 2242,
"tweetCount": 32,
"listedCount": 3,
"likeCount": 459,
"mediaCount": 244
},
"quoteCount": 2,
"referencedTweets": [ // ID of the tweet that was replied to
{
"type": "replied_to",
"id": "187203972440121733"
}
],
"replyCount": 3,
"replyTo": { // Who the comment was in reply to
"createdAt": "2012-01-18T21:13:15.000Z",
"description": "Social Media API",
"id": "467793290",
"location": "New York City",
"name": "Ayrshare",
"profileImageUrl": "https://pbs.twimg.com/profile_images/1851502252/ayrshare_normal.gif",
"publicMetrics": { // X public metrics of the user who the comment was in reply to
"followersCount": 46,
"followingCount": 1242,
"tweetCount": 12,
"listedCount": 2,
"likeCount": 439,
"mediaCount": 144
},
"url": "https://t.co/GQgCqytA",
"username": "anotherone"
},
"threadNumber": 1, // If thread, number in sequence
"userName": "waffles"
}
],
"youtube": [
{
"channelUrl": "http://www.youtube.com/channel/sp0CnxiNbUU0AJtuYKZwXQ",
"comment": "Two comments",
"commentId": "Ugx0tiPuoUpXfrY0qvV4AaABAg", // YouTube Social Comment ID
"created": "2022-05-24T19:45:49Z",
"isPublic": true, // This setting indicates whether the comment, including all of its comments and comment replies, is visible to all YouTube users.
"likeCount": 34,
"platform": "youtube",
"profileImageUrl": "https://yt3.ggpht.com/ytc/AKedOLT2hOZirBUGodAg31-QXaGPd9DmrkxR48UXAw=s48-c-k-c0x00ffffff-no-rj",
"replies": [
{
"comment": "amazing reply",
"commentId": "UgzJFjmrrRUr6nsRWi14AaABAg.9ssbUo6Es1n9ssbVwRn2iz",
"created": "2023-08-01T15:59:16Z",
"likeCount": 2,
"platform": "youtube",
"userName": "uman",
"profileImageUrl": "https://yt3.ggpht.com/ytc/AOPcoUDV_W7h3ZSEcFYrcEuXUPxVCTuF4NTw=s48-c-k-c0x00ffffff-no-rj",
"channelUrl": "http://www.youtube.com/channel/sp0CnxiNbUU0AJtuYKZwXQ",
"parentId": "UgzJFjmrrRUr6nsRWi14AaABAg"
}
],
"userName": "ayrshare"
},
{
"channelUrl": "http://www.youtube.com/channel/sp0CnxiNbUU0AJtuYKZwXQ",
"comment": "One comment",
"commentId": "Ugx0tiPuoUpXfrY0qvV4AaABAa", // YouTube Social Comment ID
"created": "2022-05-24T19:00:10Z",
"isPublic": true, // This setting indicates whether the comment, including all of its comments and comment replies, is visible to all YouTube users.
"likeCount": 123,
"platform": "youtube",
"profileImageUrl": "https://yt3.ggpht.com/ytc/AAKedOLT2hOZirBUGodAg31-QXaGPd9DmrkxR48UXAw=s48-c-k-c0x00ffffff-no-rj",
"userName": "ayrshare"
}
],
"status": "success",
"id": "Ut2fWU6XkqkMayHGnJZ7",
"lastUpdated": "2023-03-26T22:30:13.035Z",
"nextUpdate": "2023-03-26T22:41:13.035Z",
}
{
"action": "post",
"status": "error",
"code": 186,
"message": "Post ID not found. Please verify the top level ID returned from the /post endpoint is being sent.",
"id": "Ut2fWU6XkqkMayHGnJZ7"
}
Comments
Kommentare abrufen
Rufen Sie die Kommentare für eine gegebene Top-Level-Post-ID ab
GET
/
comments
/
:id
curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/comments/Ut1fWU6XkqkMayHGnJZ
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/comments/Ut1fWU6XkqkMayHGnJZ",
{
method: "GET",
headers: {
Authorization: `Bearer ${API_KEY}`,
},
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
headers = {'Authorization': 'Bearer API_KEY'}
r = requests.get('https://api.ayrshare.com/api/comments/Ut1fWU6XkqkMayHGnJZ', headers=headers)
print(r.json())
<?php
$apiUrl = 'https://api.ayrshare.com/api/comments/Ut1fWU6XkqkMayHGnJZ'; // Replace with your post ID
$apiKey = 'API_KEY'; // Replace 'API_KEY' with your actual API key
$headers = [
'Content-Type: application/json',
'Authorization: Bearer ' . $apiKey,
];
$curl = curl_init($apiUrl);
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => $headers
]);
$response = curl_exec($curl);
if ($response === false) {
echo 'Curl error: ' . curl_error($curl);
} else {
echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
}
curl_close($curl);
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace CommentsGETRequest_csharp
{
class CommentsGET
{
private static readonly HttpClient client = new HttpClient();
static async Task Main(string[] args)
{
string API_KEY = "API_KEY";
string url = "https://api.ayrshare.com/api/comments/Ut1fWU6XkqkMayHGnJZ";
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + API_KEY);
try
{
HttpResponseMessage response = await client.GetAsync(url);
response.EnsureSuccessStatusCode();
string responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (HttpRequestException e)
{
Console.WriteLine($"Error: {e.Message}");
}
}
}
}
{
"bluesky": [
{
"comment": "Nice one this is",
"commentId": "at://did:plc:62musrcyanhro2lydyhlw7ci/app.bsky.feed.post/3lf4b4j3dqy2i",
"created": "2025-01-06T23:12:58.950Z",
"displayName": "Ayrshare",
"likeCount": 0,
"platform": "bluesky",
"profileImageUrl": "https://cdn.bsky.app/img/avatar/plain/did:plc:62musrcyanhro2lydyhlw7ci/bafkreiegtpqhpwgu6tww2ejsdil4ew3blmt6jh3wlq6zhanxo3wj2ib4du@jpeg",
"quoteCount": 0,
"replies": [],
"replyCount": 0,
"replyTo": "at://did:plc:n7atrjd22xgkmgwig6dzlhzd/app.bsky.feed.post/3lez7fwx45723",
"repostCount": 0,
"userName": "ayrshare.com"
}
],
"facebook": [
{ // The most recent 1,000 comments retrieved.
"comment": "What a great comment",
"commentId": "806720068141593_1849585385469876", // Facebook Social Comment ID
"commentCount": 1, // The number of replies to the comment
"commentUrl": "https://www.facebook.com/106148652329/posts/184958538876/", // URL to the comment
"created": "2024-02-27T19:55:28Z",
"from": { // If available. Facebook determines availability based on the user's security profile and settings.
"name": "John Smith",
"id": "5075334022535844"
},
"likeCount": 342,
"platform": "facebook",
"userLikes": false,
"replies": [ // Facebook replies to replies have the same parent id regardless of nesting.
{
"comment": "Nice Comment 2",
"commentId": "806720068141593_320599703877348",
"commentCount": 0,
"company": true,
"created": "2024-02-27T19:55:40Z",
"from": {
"name": "Sue Me",
"id": "5075334022535800"
},
"likeCount": 3,
"parent": {
"createdTime": "2024-02-27T19:55:28+0000",
"from": {
"name": "John Smith",
"id": "5075334022535844"
},
"message": "What a great comment",
"id": "806720068141593_1849585385469876"
},
"platform": "facebook",
"userLikes": false
}
]
}
],
"instagram": [
{ // The most recent 1,000 comments retrieved.
"comment": "Love this post.",
"commentId": "18030599567251077", // Instagram Social Comment ID
"created": "2022-10-13T00:52:47Z",
"from": { // If available. Instagram determines availability based on the user's security profile and settings.
"name": "WondrousTimes",
"id": "112775157855689"
},
"hidden": false, // Is the comment hidden
"likeCount": 1,
"parentId": "17999860012861", // The Instagram Social Post ID of the parent post. Only returned when using get by ID on a reply.
"platform": "instagram",
"postId": "18011025266302661", // The Instagram top level post ID (original post).
"replies": [
{
"comment": "@ayrshare Thanks",
"created": "2024-04-04T22:37:39Z",
"from": {
"id": "178414522127073334",
"username": "ayrshare"
},
"hidden": false,
"id": "18023114651100610", // Instagram Social Comment Id
"likeCount": 2,
"parentId": "18030599567251077",
"user": {
"id": "17841452212702234"
},
"username": "ayrshare"
}
],
"user": { // ID of Instagram user who created the comment.
"id": "112775157855689"
},
"userName": "ayrshare" // If available. Instagram determines availability based on the user's security profile and settings.
}
],
// Retrieve LinkedIn replies to comments by using the commentID with the Get Comments with Social Comment ID endpoint.
"linkedin": [
{
"comment": "New wonderful comment",
"commentId": "6961077099692445688", // LinkedIn Social Comment ID
"commentUrn": "urn:li:comment:(urn:li:activity:7141202289402236928,7141205176207503360)", // Social comment id from LinkedIn
"created": "2022-08-04T21:55:11Z",
"from": {
"name": "Sue Smith",
"id": "yb8P0Oq5l8",
"url": "https://www.linkedin.com/in/suesmith",
"description": "Co-Founder at Smiths"
},
"likeCount": 34,
"media": [
{
"type": "image",
"url": "https://media-exp1.licdn.com/dms/image/D4E2CAQH4RRMRaJSR"
}
],
"platform": "linkedin",
"profileImageUrl": "https://media-exp1.licdn.com/dms/image/C5103AQHORT70jVfK",
"userName": "suesmith"
},
{ // Comment from a company
"comment": "Love it",
"commentId": "urn:li:comment:(urn:li:activity:71860989603258818,7186100659052515329)",
"commentUrn": "urn:li:comment:(urn:li:activity:71860989603258818,7186100659052515329)",
"created": "2024-04-16T20:38:28Z",
"founded": 2020,
"from": {
"name": "Ayrshare",
"id": 22327643,
"url": "https://www.linkedin.com/company/22327643",
"description": "Social Media API"
},
"likeCount": 123,
"organizationType": "PRIVATELY_HELD",
"platform": "linkedin",
"userName": "ayrshare",
"website": "https://www.ayrshare.com"
}
],
"reddit": [
{
"comment": "Nice comment",
"commentId": "kaxeilk",
"created": "2023-11-27T03:09:06.000Z",
"from": {
"name": "suppercomment",
"id": "t2_3zaxa"
},
"commentUrl": "/r/test/comments/184szm7/reddit_post_title/kaxeilk/",
"subreddit": "test",
"ups": 1,
"isSubmitter": true
}
],
"threads": [
{
"comment": "An amazing comment!",
"commentId": "17890924860234841",
"commentUrl": "https://www.threads.com/@ayrshare/post/DI4pRHAto1",
"created": "2025-04-25T21:43:57+0000",
"hasReplies": false,
"isQuotePost": false,
"isReply": true,
"isReplyOwnedByMe": true,
"mediaType": "text_post",
"parentId": "17890643139123706",
"platform": "threads",
"postId": "17890643139123706",
"replies": [
{
"comment": "sweet",
"commentId": "17961516995911683",
"commentUrl": "https://www.threads.com/@ayrshare/post/DI4shgspzI1",
"created": "2025-04-25T22:12:22+0000",
"hasReplies": false,
"isQuotePost": false,
"isReply": true,
"isReplyOwnedByMe": true,
"mediaType": "text_post",
"parentId": "17890924860234841",
"platform": "threads",
"postId": "17890643139123706",
"replyAudience": "everyone",
"shortcode": "DI4shgspzI1",
"userName": "ayrshare"
}
],
"replyAudience": "everyone",
"shortcode": "DI4pRHAtoVu",
"userName": "ayrshare"
}
],
"tiktok": [
{
"comment": "The best comment",
"commentId": "7260964914699764523", // TikTok Social Comment ID
"created": "2023-07-28T20:12:23Z",
"displayName": "John Smith",
"liked": false, // Whether the user who posted the video has liked the comment.
"likeCount": 24,
"owner": true, // Whether the user who posted the video made the comment.
"pinned": false, // If the comment is pinned
"platform": "tiktok",
"profileImageUrl": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/f123c4b57",
"replies": [
{
"comment": "One reply",
"commentId": "72776074297628920", // TikTok Social Comment ID
"createTime": "2023-09-11 16:34:20",
"liked": false, // Whether the user who posted the video has liked the comment reply.
"likes": 0,
"owner": false, // Whether the user who posted the video made the comment reply.
"parentCommentId": "72776073973290774", // TikTok Parent Social Comment ID
"profileImageUrl": "https://p16-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/bcc6e6778x168.jpeg",
"status": "PUBLIC",
"userId": "51e0cb95a8b14f0f1020aa017",
"username": "ayrshare",
"videoId": "7260964048362310958" // TikTok Social Post ID
}
],
"status": "success",
"userId": "fc904564301a6d383fd19bd4982ba2682404876533c04741a8c3f270376cd3dd",
"username": "helmar1066",
"videoId": "7260964048362310958", // TikTok Social Post ID
"visibility": "public"
}
],
"twitter": [
{
"bookmarkCount": 2,
"comment": "@ayrshare Congrats on this",
"commentId": "1505595871831891068", // Twitter Social Comment ID
"created": "2022-05-14T21:56:14.000Z",
"description": "Eat great!",
"id": "1552209331030036480", // Twitter Social Post ID
"impressionCount": 134,
"likeCount": 341,
"name": "waffles",
"platform": "twitter",
"profileImageUrl": "https://pbs.twimg.com/profile_images/119426890464/lvQZPpt4_normal.png",
"publicMetrics": { // X public metrics of the user who posted the comment
"followersCount": 56,
"followingCount": 2242,
"tweetCount": 32,
"listedCount": 3,
"likeCount": 459,
"mediaCount": 244
},
"quoteCount": 2,
"referencedTweets": [ // ID of the tweet that was replied to
{
"type": "replied_to",
"id": "187203972440121733"
}
],
"replyCount": 3,
"replyTo": { // Who the comment was in reply to
"createdAt": "2012-01-18T21:13:15.000Z",
"description": "Social Media API",
"id": "467793290",
"location": "New York City",
"name": "Ayrshare",
"profileImageUrl": "https://pbs.twimg.com/profile_images/1851502252/ayrshare_normal.gif",
"publicMetrics": { // X public metrics of the user who the comment was in reply to
"followersCount": 46,
"followingCount": 1242,
"tweetCount": 12,
"listedCount": 2,
"likeCount": 439,
"mediaCount": 144
},
"url": "https://t.co/GQgCqytA",
"username": "anotherone"
},
"threadNumber": 1, // If thread, number in sequence
"userName": "waffles"
}
],
"youtube": [
{
"channelUrl": "http://www.youtube.com/channel/sp0CnxiNbUU0AJtuYKZwXQ",
"comment": "Two comments",
"commentId": "Ugx0tiPuoUpXfrY0qvV4AaABAg", // YouTube Social Comment ID
"created": "2022-05-24T19:45:49Z",
"isPublic": true, // This setting indicates whether the comment, including all of its comments and comment replies, is visible to all YouTube users.
"likeCount": 34,
"platform": "youtube",
"profileImageUrl": "https://yt3.ggpht.com/ytc/AKedOLT2hOZirBUGodAg31-QXaGPd9DmrkxR48UXAw=s48-c-k-c0x00ffffff-no-rj",
"replies": [
{
"comment": "amazing reply",
"commentId": "UgzJFjmrrRUr6nsRWi14AaABAg.9ssbUo6Es1n9ssbVwRn2iz",
"created": "2023-08-01T15:59:16Z",
"likeCount": 2,
"platform": "youtube",
"userName": "uman",
"profileImageUrl": "https://yt3.ggpht.com/ytc/AOPcoUDV_W7h3ZSEcFYrcEuXUPxVCTuF4NTw=s48-c-k-c0x00ffffff-no-rj",
"channelUrl": "http://www.youtube.com/channel/sp0CnxiNbUU0AJtuYKZwXQ",
"parentId": "UgzJFjmrrRUr6nsRWi14AaABAg"
}
],
"userName": "ayrshare"
},
{
"channelUrl": "http://www.youtube.com/channel/sp0CnxiNbUU0AJtuYKZwXQ",
"comment": "One comment",
"commentId": "Ugx0tiPuoUpXfrY0qvV4AaABAa", // YouTube Social Comment ID
"created": "2022-05-24T19:00:10Z",
"isPublic": true, // This setting indicates whether the comment, including all of its comments and comment replies, is visible to all YouTube users.
"likeCount": 123,
"platform": "youtube",
"profileImageUrl": "https://yt3.ggpht.com/ytc/AAKedOLT2hOZirBUGodAg31-QXaGPd9DmrkxR48UXAw=s48-c-k-c0x00ffffff-no-rj",
"userName": "ayrshare"
}
],
"status": "success",
"id": "Ut2fWU6XkqkMayHGnJZ7",
"lastUpdated": "2023-03-26T22:30:13.035Z",
"nextUpdate": "2023-03-26T22:41:13.035Z",
}
{
"action": "post",
"status": "error",
"code": 186,
"message": "Post ID not found. Please verify the top level ID returned from the /post endpoint is being sent.",
"id": "Ut2fWU6XkqkMayHGnJZ7"
}
Rufen Sie Kommentare zu einem Beitrag über die Comments-API ab – anhand der Ayrshare Post ID, der Social Post ID, der Ayrshare Comment ID oder der Social Comment ID.
Weitere Informationen zu den verschiedenen ID-Typen finden Sie in der Übersicht der Comments-API.
Bei Verwendung der Ayrshare Post ID sind keine Query-Parameter erforderlich.
Weitere Details zu Kommentaren
- Die Kommentardaten werden für alle Plattformen alle 10 Minuten aktualisiert, mit Ausnahme von X. Aufgrund von Einschränkungen der X-API werden die Kommentardaten für X mithilfe einer Exponential-Backoff- Strategie aktualisiert, d. h. die Intervalle zwischen Aktualisierungen werden im Laufe der Zeit schrittweise länger.
- In der Facebook-Antwort haben Antworten auf Antworten immer denselben
parent.id. - Rufen Sie LinkedIn-Antworten auf Kommentare ab, indem Sie die Query-Parameter
"commentId": trueund"searchPlatformId": truesetzen und die Social Comment ID im Pfad-Parameter übergeben. - Facebook und Instagram geben bis zu die 1.000 neuesten Kommentare zu einem Beitrag zurück. Kontaktieren Sie uns für höhere Limits im Enterprise Plan.
- Für einen TikTok-Beitrag, der noch verarbeitet wird (dessen
idist"pending"), gibt Get Comments einen klaren „still processing”-Fehler (code: 288, HTTP400) zurück – statt eines allgemeinen Fehlers. Versuchen Sie es erneut, sobald dertikTokPublished- Webhook auslöst oder /history die aufgelöste Video-ID anzeigt.
Header-Parameter
Pfad-Parameter
Query-Parameter
Wenn Sie Kommentare zu einem über Ayrshare veröffentlichten Beitrag mit der Ayrshare Post
ID abrufen, lassen Sie dieses Feld weg – es
hat den Standardwert
false. Wenn Sie Kommentare mit der Social Post
ID oder der Social Comment
ID abrufen (also der von den sozialen
Netzwerken erzeugten ID), setzen Sie den Wert auf true.Wenn Sie Kommentare mit der Social Comment ID abrufen (also der
von den sozialen Netzwerken erzeugten Kommentar-ID), setzen Sie den Wert auf
true.Beim Abrufen von Kommentaren mit der Ayrshare Post ID oder der Social Post ID lassen Sie dieses Feld weg – es hat den Standardwert false.Wenn Sie den Query-Parameter
commentId verwenden, müssen Sie außerdem searchPlatformId auf true setzen.Erforderlich, wenn
searchPlatformId oder commentId true ist.Wann zu verwenden:- Bei Verwendung der Social Post ID und des
Felds
"searchPlatformId": true. Unterstützte Plattformen:bluesky,facebook,instagram,linkedin,threads,tiktok,twitter,youtube. - Bei Verwendung der Social Comment ID und der
Felder
"searchPlatformId": trueund"commentId": true. Unterstützte Plattformen:facebook,instagram,linkedin. - Bei Verwendung der Ayrshare Post ID lassen Sie dieses Feld weg – Kommentare werden von allen Plattformen zurückgegeben, auf denen der ursprüngliche Beitrag veröffentlicht wurde.
Beispiele für Comment-GET-Anfragen
// Ayrshare Post ID
GET /comments/:id
// Social Post ID
// Platforms: facebook, instagram, linkedin, tiktok, twitter, youtube
GET /comments/:id?searchPlatformId=true&platform=facebook
// Social Comment ID
// Platforms: facebook, instagram, linkedin
GET /comments/:id?commentId=true&searchPlatformId=true&platform=facebook
curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/comments/Ut1fWU6XkqkMayHGnJZ
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/comments/Ut1fWU6XkqkMayHGnJZ",
{
method: "GET",
headers: {
Authorization: `Bearer ${API_KEY}`,
},
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
headers = {'Authorization': 'Bearer API_KEY'}
r = requests.get('https://api.ayrshare.com/api/comments/Ut1fWU6XkqkMayHGnJZ', headers=headers)
print(r.json())
<?php
$apiUrl = 'https://api.ayrshare.com/api/comments/Ut1fWU6XkqkMayHGnJZ'; // Replace with your post ID
$apiKey = 'API_KEY'; // Replace 'API_KEY' with your actual API key
$headers = [
'Content-Type: application/json',
'Authorization: Bearer ' . $apiKey,
];
$curl = curl_init($apiUrl);
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => $headers
]);
$response = curl_exec($curl);
if ($response === false) {
echo 'Curl error: ' . curl_error($curl);
} else {
echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
}
curl_close($curl);
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace CommentsGETRequest_csharp
{
class CommentsGET
{
private static readonly HttpClient client = new HttpClient();
static async Task Main(string[] args)
{
string API_KEY = "API_KEY";
string url = "https://api.ayrshare.com/api/comments/Ut1fWU6XkqkMayHGnJZ";
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + API_KEY);
try
{
HttpResponseMessage response = await client.GetAsync(url);
response.EnsureSuccessStatusCode();
string responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (HttpRequestException e)
{
Console.WriteLine($"Error: {e.Message}");
}
}
}
}
{
"bluesky": [
{
"comment": "Nice one this is",
"commentId": "at://did:plc:62musrcyanhro2lydyhlw7ci/app.bsky.feed.post/3lf4b4j3dqy2i",
"created": "2025-01-06T23:12:58.950Z",
"displayName": "Ayrshare",
"likeCount": 0,
"platform": "bluesky",
"profileImageUrl": "https://cdn.bsky.app/img/avatar/plain/did:plc:62musrcyanhro2lydyhlw7ci/bafkreiegtpqhpwgu6tww2ejsdil4ew3blmt6jh3wlq6zhanxo3wj2ib4du@jpeg",
"quoteCount": 0,
"replies": [],
"replyCount": 0,
"replyTo": "at://did:plc:n7atrjd22xgkmgwig6dzlhzd/app.bsky.feed.post/3lez7fwx45723",
"repostCount": 0,
"userName": "ayrshare.com"
}
],
"facebook": [
{ // The most recent 1,000 comments retrieved.
"comment": "What a great comment",
"commentId": "806720068141593_1849585385469876", // Facebook Social Comment ID
"commentCount": 1, // The number of replies to the comment
"commentUrl": "https://www.facebook.com/106148652329/posts/184958538876/", // URL to the comment
"created": "2024-02-27T19:55:28Z",
"from": { // If available. Facebook determines availability based on the user's security profile and settings.
"name": "John Smith",
"id": "5075334022535844"
},
"likeCount": 342,
"platform": "facebook",
"userLikes": false,
"replies": [ // Facebook replies to replies have the same parent id regardless of nesting.
{
"comment": "Nice Comment 2",
"commentId": "806720068141593_320599703877348",
"commentCount": 0,
"company": true,
"created": "2024-02-27T19:55:40Z",
"from": {
"name": "Sue Me",
"id": "5075334022535800"
},
"likeCount": 3,
"parent": {
"createdTime": "2024-02-27T19:55:28+0000",
"from": {
"name": "John Smith",
"id": "5075334022535844"
},
"message": "What a great comment",
"id": "806720068141593_1849585385469876"
},
"platform": "facebook",
"userLikes": false
}
]
}
],
"instagram": [
{ // The most recent 1,000 comments retrieved.
"comment": "Love this post.",
"commentId": "18030599567251077", // Instagram Social Comment ID
"created": "2022-10-13T00:52:47Z",
"from": { // If available. Instagram determines availability based on the user's security profile and settings.
"name": "WondrousTimes",
"id": "112775157855689"
},
"hidden": false, // Is the comment hidden
"likeCount": 1,
"parentId": "17999860012861", // The Instagram Social Post ID of the parent post. Only returned when using get by ID on a reply.
"platform": "instagram",
"postId": "18011025266302661", // The Instagram top level post ID (original post).
"replies": [
{
"comment": "@ayrshare Thanks",
"created": "2024-04-04T22:37:39Z",
"from": {
"id": "178414522127073334",
"username": "ayrshare"
},
"hidden": false,
"id": "18023114651100610", // Instagram Social Comment Id
"likeCount": 2,
"parentId": "18030599567251077",
"user": {
"id": "17841452212702234"
},
"username": "ayrshare"
}
],
"user": { // ID of Instagram user who created the comment.
"id": "112775157855689"
},
"userName": "ayrshare" // If available. Instagram determines availability based on the user's security profile and settings.
}
],
// Retrieve LinkedIn replies to comments by using the commentID with the Get Comments with Social Comment ID endpoint.
"linkedin": [
{
"comment": "New wonderful comment",
"commentId": "6961077099692445688", // LinkedIn Social Comment ID
"commentUrn": "urn:li:comment:(urn:li:activity:7141202289402236928,7141205176207503360)", // Social comment id from LinkedIn
"created": "2022-08-04T21:55:11Z",
"from": {
"name": "Sue Smith",
"id": "yb8P0Oq5l8",
"url": "https://www.linkedin.com/in/suesmith",
"description": "Co-Founder at Smiths"
},
"likeCount": 34,
"media": [
{
"type": "image",
"url": "https://media-exp1.licdn.com/dms/image/D4E2CAQH4RRMRaJSR"
}
],
"platform": "linkedin",
"profileImageUrl": "https://media-exp1.licdn.com/dms/image/C5103AQHORT70jVfK",
"userName": "suesmith"
},
{ // Comment from a company
"comment": "Love it",
"commentId": "urn:li:comment:(urn:li:activity:71860989603258818,7186100659052515329)",
"commentUrn": "urn:li:comment:(urn:li:activity:71860989603258818,7186100659052515329)",
"created": "2024-04-16T20:38:28Z",
"founded": 2020,
"from": {
"name": "Ayrshare",
"id": 22327643,
"url": "https://www.linkedin.com/company/22327643",
"description": "Social Media API"
},
"likeCount": 123,
"organizationType": "PRIVATELY_HELD",
"platform": "linkedin",
"userName": "ayrshare",
"website": "https://www.ayrshare.com"
}
],
"reddit": [
{
"comment": "Nice comment",
"commentId": "kaxeilk",
"created": "2023-11-27T03:09:06.000Z",
"from": {
"name": "suppercomment",
"id": "t2_3zaxa"
},
"commentUrl": "/r/test/comments/184szm7/reddit_post_title/kaxeilk/",
"subreddit": "test",
"ups": 1,
"isSubmitter": true
}
],
"threads": [
{
"comment": "An amazing comment!",
"commentId": "17890924860234841",
"commentUrl": "https://www.threads.com/@ayrshare/post/DI4pRHAto1",
"created": "2025-04-25T21:43:57+0000",
"hasReplies": false,
"isQuotePost": false,
"isReply": true,
"isReplyOwnedByMe": true,
"mediaType": "text_post",
"parentId": "17890643139123706",
"platform": "threads",
"postId": "17890643139123706",
"replies": [
{
"comment": "sweet",
"commentId": "17961516995911683",
"commentUrl": "https://www.threads.com/@ayrshare/post/DI4shgspzI1",
"created": "2025-04-25T22:12:22+0000",
"hasReplies": false,
"isQuotePost": false,
"isReply": true,
"isReplyOwnedByMe": true,
"mediaType": "text_post",
"parentId": "17890924860234841",
"platform": "threads",
"postId": "17890643139123706",
"replyAudience": "everyone",
"shortcode": "DI4shgspzI1",
"userName": "ayrshare"
}
],
"replyAudience": "everyone",
"shortcode": "DI4pRHAtoVu",
"userName": "ayrshare"
}
],
"tiktok": [
{
"comment": "The best comment",
"commentId": "7260964914699764523", // TikTok Social Comment ID
"created": "2023-07-28T20:12:23Z",
"displayName": "John Smith",
"liked": false, // Whether the user who posted the video has liked the comment.
"likeCount": 24,
"owner": true, // Whether the user who posted the video made the comment.
"pinned": false, // If the comment is pinned
"platform": "tiktok",
"profileImageUrl": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/f123c4b57",
"replies": [
{
"comment": "One reply",
"commentId": "72776074297628920", // TikTok Social Comment ID
"createTime": "2023-09-11 16:34:20",
"liked": false, // Whether the user who posted the video has liked the comment reply.
"likes": 0,
"owner": false, // Whether the user who posted the video made the comment reply.
"parentCommentId": "72776073973290774", // TikTok Parent Social Comment ID
"profileImageUrl": "https://p16-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/bcc6e6778x168.jpeg",
"status": "PUBLIC",
"userId": "51e0cb95a8b14f0f1020aa017",
"username": "ayrshare",
"videoId": "7260964048362310958" // TikTok Social Post ID
}
],
"status": "success",
"userId": "fc904564301a6d383fd19bd4982ba2682404876533c04741a8c3f270376cd3dd",
"username": "helmar1066",
"videoId": "7260964048362310958", // TikTok Social Post ID
"visibility": "public"
}
],
"twitter": [
{
"bookmarkCount": 2,
"comment": "@ayrshare Congrats on this",
"commentId": "1505595871831891068", // Twitter Social Comment ID
"created": "2022-05-14T21:56:14.000Z",
"description": "Eat great!",
"id": "1552209331030036480", // Twitter Social Post ID
"impressionCount": 134,
"likeCount": 341,
"name": "waffles",
"platform": "twitter",
"profileImageUrl": "https://pbs.twimg.com/profile_images/119426890464/lvQZPpt4_normal.png",
"publicMetrics": { // X public metrics of the user who posted the comment
"followersCount": 56,
"followingCount": 2242,
"tweetCount": 32,
"listedCount": 3,
"likeCount": 459,
"mediaCount": 244
},
"quoteCount": 2,
"referencedTweets": [ // ID of the tweet that was replied to
{
"type": "replied_to",
"id": "187203972440121733"
}
],
"replyCount": 3,
"replyTo": { // Who the comment was in reply to
"createdAt": "2012-01-18T21:13:15.000Z",
"description": "Social Media API",
"id": "467793290",
"location": "New York City",
"name": "Ayrshare",
"profileImageUrl": "https://pbs.twimg.com/profile_images/1851502252/ayrshare_normal.gif",
"publicMetrics": { // X public metrics of the user who the comment was in reply to
"followersCount": 46,
"followingCount": 1242,
"tweetCount": 12,
"listedCount": 2,
"likeCount": 439,
"mediaCount": 144
},
"url": "https://t.co/GQgCqytA",
"username": "anotherone"
},
"threadNumber": 1, // If thread, number in sequence
"userName": "waffles"
}
],
"youtube": [
{
"channelUrl": "http://www.youtube.com/channel/sp0CnxiNbUU0AJtuYKZwXQ",
"comment": "Two comments",
"commentId": "Ugx0tiPuoUpXfrY0qvV4AaABAg", // YouTube Social Comment ID
"created": "2022-05-24T19:45:49Z",
"isPublic": true, // This setting indicates whether the comment, including all of its comments and comment replies, is visible to all YouTube users.
"likeCount": 34,
"platform": "youtube",
"profileImageUrl": "https://yt3.ggpht.com/ytc/AKedOLT2hOZirBUGodAg31-QXaGPd9DmrkxR48UXAw=s48-c-k-c0x00ffffff-no-rj",
"replies": [
{
"comment": "amazing reply",
"commentId": "UgzJFjmrrRUr6nsRWi14AaABAg.9ssbUo6Es1n9ssbVwRn2iz",
"created": "2023-08-01T15:59:16Z",
"likeCount": 2,
"platform": "youtube",
"userName": "uman",
"profileImageUrl": "https://yt3.ggpht.com/ytc/AOPcoUDV_W7h3ZSEcFYrcEuXUPxVCTuF4NTw=s48-c-k-c0x00ffffff-no-rj",
"channelUrl": "http://www.youtube.com/channel/sp0CnxiNbUU0AJtuYKZwXQ",
"parentId": "UgzJFjmrrRUr6nsRWi14AaABAg"
}
],
"userName": "ayrshare"
},
{
"channelUrl": "http://www.youtube.com/channel/sp0CnxiNbUU0AJtuYKZwXQ",
"comment": "One comment",
"commentId": "Ugx0tiPuoUpXfrY0qvV4AaABAa", // YouTube Social Comment ID
"created": "2022-05-24T19:00:10Z",
"isPublic": true, // This setting indicates whether the comment, including all of its comments and comment replies, is visible to all YouTube users.
"likeCount": 123,
"platform": "youtube",
"profileImageUrl": "https://yt3.ggpht.com/ytc/AAKedOLT2hOZirBUGodAg31-QXaGPd9DmrkxR48UXAw=s48-c-k-c0x00ffffff-no-rj",
"userName": "ayrshare"
}
],
"status": "success",
"id": "Ut2fWU6XkqkMayHGnJZ7",
"lastUpdated": "2023-03-26T22:30:13.035Z",
"nextUpdate": "2023-03-26T22:41:13.035Z",
}
{
"action": "post",
"status": "error",
"code": 186,
"message": "Post ID not found. Please verify the top level ID returned from the /post endpoint is being sent.",
"id": "Ut2fWU6XkqkMayHGnJZ7"
}
⌘I
