Skip to content

Get Social Posts

Retrieve all social media posts from a specific social profile. This endpoint should be called after obtaining social IDs from the Artist Socials Endpoint.

Endpoint

GET https://api.recoupable.com/api/social/posts

Parameters

NameTypeRequiredDescription
social_idstringYesThe unique identifier of the social profile to fetch posts for
latestFirstbooleanNoSort posts by most recent first (default: true)
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/social/posts?social_id=YOUR_SOCIAL_ID&latestFirst=true&page=1&limit=20" \
  -H "Content-Type: application/json"

Response Format

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

{
  "status": "success",
  "posts": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "post_id": "123e4567-e89b-12d3-a456-426614174001",
      "social_id": "123e4567-e89b-12d3-a456-426614174002",
      "post_url": "https://twitter.com/artistname/status/123456789",
      "updated_at": "2024-04-01T15:33:27Z"
    },
    {
      "id": "123e4567-e89b-12d3-a456-426614174003",
      "post_id": "123e4567-e89b-12d3-a456-426614174004",
      "social_id": "123e4567-e89b-12d3-a456-426614174002",
      "post_url": "https://twitter.com/artistname/status/123456790",
      "updated_at": "2024-03-30T20:15:45Z"
    }
  ],
  "pagination": {
    "total_count": 42,
    "page": 1,
    "limit": 20,
    "total_pages": 3
  }
}

Response Properties

Response Object

PropertyTypeDescription
statusstringStatus of the request ("success" or "error")
postsarrayList of social media posts
posts[].idstringUUID of the social's social_posts record
posts[].post_idstringUUID of the social's posts record
posts[].social_idstringUUID of the social's socials record
posts[].post_urlstringDirect URL to the post on the platform
posts[].updated_atstringISO timestamp of when the post data was last updated
paginationobjectPagination metadata for the response
pagination.total_countnumberTotal number of posts available
pagination.pagenumberCurrent page number
pagination.limitnumberNumber of posts per page
pagination.total_pagesnumberTotal number of pages available

Workflow Guide

This endpoint is part of a workflow involving the Artist Socials 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 this Social Posts endpoint
  4. Optionally use a post's ID to retrieve comments with the 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: Optionally, get comments for a specific post
const postId = postsResponse.posts[0].post_id;
const commentsResponse = await getPostComments(postId);