Skip to content

Get Segment Fans

Retrieve all social profiles from fans within a specific segment. This endpoint should be called after obtaining segment IDs from the Artist Segments Endpoint endpoint.

Endpoint

GET https://api.recoupable.com/api/segment/fans

Parameters

NameTypeRequiredDescription
segment_idstringYesThe unique identifier of the segment to fetch fans 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/segment/fans?segment_id=YOUR_SEGMENT_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",
  "fans": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "username": "@superfan",
      "avatar": "https://example.com/avatar1.jpg",
      "profile_url": "https://twitter.com/superfan",
      "segment_id": "123e4567-e89b-12d3-a456-426614174002",
      "segment_name": "Twitter Followers",
      "fan_social_id": "123e4567-e89b-12d3-a456-426614174005",
      "region": "US",
      "bio": "Music lover and digital art collector",
      "follower_count": 1234,
      "following_count": 567,
      "updated_at": "2024-03-06T15:33:27Z"
    },
    {
      "id": "123e4567-e89b-12d3-a456-426614174001",
      "username": "artcollector",
      "avatar": "https://example.com/avatar2.jpg",
      "profile_url": "https://instagram.com/artcollector",
      "segment_id": "123e4567-e89b-12d3-a456-426614174002",
      "segment_name": "Twitter Followers",
      "fan_social_id": "123e4567-e89b-12d3-a456-426614174006",
      "region": "UK",
      "bio": "Supporting emerging artists 🎨",
      "follower_count": 5678,
      "following_count": 432,
      "updated_at": "2024-03-06T12:22:15Z"
    }
  ],
  "pagination": {
    "total_count": 156,
    "page": 1,
    "limit": 20,
    "total_pages": 8
  }
}

Response Properties

Response Object

PropertyTypeDescription
statusstringStatus of the request ("success" or "error")
fansarrayList of social profiles from fans in the segment
fans[].idstringUnique identifier for the fan_segments record
fans[].usernamestringUsername or handle on the platform
fans[].avatarstringURL to the fan's avatar/profile image
fans[].profile_urlstringFull URL to the fan's profile on the platform
fans[].segment_idstringUUID of the fan's segments record
fans[].segment_namestringName of the segment (e.g., "Twitter Followers")
fans[].fan_social_idstringUUID of the fan's socials media profile account
fans[].regionstringGeographic region or location of the fan
fans[].biostringFan's biography or profile description
fans[].follower_countnumberNumber of followers the fan has
fans[].following_countnumberNumber of accounts the fan is following
fans[].updated_atstringISO timestamp of when the fan data was last updated
paginationobjectPagination metadata for the response
pagination.total_countnumberTotal number of records available
pagination.pagenumberCurrent page number
pagination.limitnumberNumber of records per page
pagination.total_pagesnumberTotal number of pages available

Workflow Guide

This endpoint is part of a workflow involving the Artist Segments endpoint:

  1. First, call the Artist Segments Endpoint with an artist_account_id to retrieve available segments
  2. From the response, select the desired segment_id value
  3. Use that segment_id to call this Segment Fans endpoint

Example workflow:

// Step 1: Get all segments for an artist
const segmentsResponse = await getArtistSegments(
  "10fd2b53-3fb8-4d75-bd23-f28520a3c7fc"
);
 
// Step 2: Use a segment ID to get fans for a specific segment
const segmentId = segmentsResponse.segments[0].segment_id;
const fansResponse = await getSegmentFans(segmentId);
 
// Now you have fans specific to that segment
console.log(
  `Fans in segment ${segmentsResponse.segments[0].segment_name}:`,
  fansResponse.fans
);