Skip to content

User Affiliates

GET/tw-v2/user/affiliates

1 API unit per call · How billing works

Description

Retrieve the accounts affiliated with a business profile, as shown on its Affiliates tab. Returns a paginated list of users.

Usage notes

Returns X's default affiliate group. Named business teams are not supported. A profile with no affiliates returns an empty list. A short page does not mean the end: keep passing nextCursor until it is null.

A request costs one API unit. 400, 401, 403, 429 and 5xx errors are free; a 404 is billed.

Query Parameters

ParameterDescription
userIdstringrequiredUnique Twitter user ID (e.g., '10017528')
cursorstringoptionalPagination cursor from the previous response's nextCursor. Omit for the first page.

Code Examples

const params = new URLSearchParams({
  userId: '10017528'
});

const response = await fetch(`https://api.tweetapi.com/tw-v2/user/affiliates?${params}`, {
  method: 'GET',
  headers: {
    'X-API-Key': 'YOUR_API_KEY'
  }
});

const data = await response.json();
console.log(data);

Response

Success Response (200 OK)

Synthetic example:

200
{
  "data": [
    {
      "id": "1000000000000000001",
      "username": "sample_user_00001",
      "name": "Sample User",
      "bio": "Sample bio",
      "location": "Sample City",
      "website": null,
      "pinnedTweetIds": [],
      "avatar": "https://example.com/images/sample-avatar.jpg",
      "banner": "https://example.com/images/sample-banner.jpg",
      "profileImageShape": null,
      "verified": false,
      "isBlueVerified": false,
      "verifiedType": null,
      "verifiedSince": null,
      "isIdentityVerified": false,
      "isProtected": false,
      "possiblySensitive": false,
      "profileInterstitialType": null,
      "withheldInCountries": [],
      "professional": null,
      "businessAccount": null,
      "creatorSubscriptionsCount": 0,
      "hasHiddenSubscriptions": false,
      "highlightsInfo": null,
      "hasGraduatedAccess": false,
      "isProfileTranslatable": false,
      "hasCustomTimelines": false,
      "isTranslator": false,
      "affiliatesHighlightedLabel": null,
      "defaultProfile": false,
      "defaultProfileImage": false,
      "followerCount": 1200,
      "followingCount": 34,
      "tweetCount": 560,
      "listedCount": 0,
      "mediaCount": 78,
      "favoritesCount": 90,
      "createdAt": "2023-01-02T00:00:00.000Z"
    }
  ],
  "pagination": {
    "nextCursor": "NEXT_CURSOR",
    "prevCursor": null
  }
}

A profile with no affiliates, or the last page, can be empty:

200
{
  "data": [],
  "pagination": {
    "nextCursor": null,
    "prevCursor": null
  }
}

Errors

Errors return { statusCode, message } with a non-2xx HTTP status.

400
{
  "statusCode": 400,
  "message": "Request validation failed"
}

TweetAPI is a third-party API and is not affiliated with X Corp.