Skip to content

Get Post Comments

Retrieve comments for a specific social media post. This endpoint should be called after obtaining post IDs from the Social Posts Endpoint.

Endpoint

GET https://api.recoupable.com/api/post/comments

Parameters

NameTypeRequiredDescription
post_idstringYesThe unique identifier of the post to fetch comments for
pagenumberNoThe page number to retrieve (default: 1)
limitnumberNoThe number of records per page (default: 20, max: 100)

Request Examples

cURL
curl -X GET "https://api.recoupable.com/api/post/comments?post_id=YOUR_POST_ID&page=1&limit=20" \
  -H "Content-Type: application/json"

Response Format

The API returns JSON responses. Here's an example success response:

{
  "status": "success",
  "comments": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "post_id": "123e4567-e89b-12d3-a456-426614174001",
      "social_id": "123e4567-e89b-12d3-a456-426614174002",
      "comment": "Great post! Looking forward to more content.",
      "commented_at": "2024-04-01T14:30:00Z",
      "username": "@superfan",
      "avatar": "https://example.com/avatar1.jpg",
      "profile_url": "https://twitter.com/superfan",
      "post_url": "https://twitter.com/artistname/status/123456789",
      "region": "US",
      "bio": "Music lover and digital art collector",
      "follower_count": 1234,
      "following_count": 567
    },
    {
      "id": "123e4567-e89b-12d3-a456-426614174003",
      "post_id": "123e4567-e89b-12d3-a456-426614174001",
      "social_id": "123e4567-e89b-12d3-a456-426614174004",
      "comment": "This is amazing! 🔥",
      "commented_at": "2024-04-01T15:15:00Z",
      "username": "artcollector",
      "avatar": "https://example.com/avatar2.jpg",
      "profile_url": "https://instagram.com/artcollector",
      "post_url": "https://twitter.com/artistname/status/123456789",
      "region": "UK",
      "bio": "Supporting emerging artists 🎨",
      "follower_count": 5678,
      "following_count": 432
    }
  ],
  "pagination": {
    "total_count": 75,
    "page": 1,
    "limit": 20,
    "total_pages": 4
  }
}

Response Properties

Response Object

PropertyTypeDescription
statusstringStatus of the request ("success" or "error")
commentsarrayList of comments for the specified post
comments[].idstringUUID of the comment record
comments[].post_idstringUUID of the post this comment belongs to
comments[].social_idstringUUID of the social profile that made the comment
comments[].commentstringText content of the comment
comments[].commented_atstringISO timestamp of when the comment was posted
comments[].usernamestringUsername of the commenter
comments[].avatarstring | nullURL to the commenter's avatar image
comments[].profile_urlstringURL to the commenter's profile
comments[].post_urlstringURL to the post where the comment was made
comments[].regionstring | nullGeographic region of the commenter
comments[].biostring | nullCommenter's biography or description
comments[].follower_countnumber | nullNumber of followers the commenter has
comments[].following_countnumber | nullNumber of accounts the commenter follows
paginationobjectPagination metadata for the response
pagination.total_countnumberTotal number of comments available
pagination.pagenumberCurrent page number
pagination.limitnumberNumber of comments per page
pagination.total_pagesnumberTotal number of pages available

Workflow Guide

This endpoint is part of a workflow involving the Social Posts endpoint:

  1. First, call the Artist Socials endpoint with an artist_account_id to retrieve social profiles
  2. From the response, select the desired social_id value
  3. Use that social_id to call the Social Posts endpoint
  4. From the Social Posts response, select the post_id for the post you want comments for
  5. Use that post_id to call this Post Comments endpoint

Example workflow:

// Step 1: Get all social profiles for an artist
const socialsResponse = await getArtistSocials(
  "10fd2b53-3fb8-4d75-bd23-f28520a3c7fc"
);
 
// Step 2: Select a social profile to get posts from
const socialId = socialsResponse.socials[0].social_id;
 
// Step 3: Get posts for the selected social profile
const postsResponse = await getSocialPosts(socialId, true);
 
// Step 4: Get comments for a specific post
const postId = postsResponse.posts[0].post_id;
const commentsResponse = await getPostComments(postId);
 
// Now you have comments for the specific post
console.log(`Comments for post:`, commentsResponse.comments);