---
title: "Get User Affiliates - API Reference"
description: "Retrieve all affiliated profiles of a Twitter/X user. Flat-rate $0.0002 per affiliated profile, flexible rate limits and no subscriptions."
source: "https://docs.socialdata.tools/reference/get-user-affiliates/"
---

Verified organization profiles (i.e. users with the gold checkmark) occasionally have affiliated accounts listed under the “Affiliates” tab on their profile page. The endpoint returns an array of user profiles affiliated with this organization.

GET https://api.socialdata.tools/twitter/user/{user\_id}/affiliates?cursor={cursor}

## Headers

**Authorization** `string` — required

Authorization Bearer header containing your SocialData API key

Example: Bearer YOUR\_API\_KEY

## Path Parameters

**user\_id** `integer` — required

The numeric ID of the desired user.

Example: 1729591119699124560

## Query Parameters

**cursor** `string` — optional

Cursor value obtained from next\_cursor response property. Omit this value to retrieve the first page. Always remember to urlencode the value

Example: DAACCgACGC12FhmAJxAKAAMYLXYWGX\_Y8AgABAAAAAILAAUAAADoRW1QQzZ3QUFBZlEvZ0d...

> **Caution**
> 
> When using languages where the `user_id` value exceeds the default Integer type limit (e.g., JavaScript), you should store `user_id` as a String. Use the `id_str` property returned by the API for these values

## Code Examples

#### curl

```shellscript
curl "https://api.socialdata.tools/twitter/user/783214/affiliates" \
    -H 'Authorization: Bearer API_KEY' \
    -H 'Accept: application/json'
```

#### JavaScript

```js
const userId = '783214';
const API_KEY = 'YOUR_API_KEY_HERE';

fetch(`https://api.socialdata.tools/twitter/user/${userId}/affiliates`, {
    method: 'GET',
    headers: {
        'Authorization': `Bearer ${API_KEY}`,
        'Accept': 'application/json'
    }
})
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
```

#### Python

```python
import requests

userId = '783214'
API_KEY = 'YOUR_API_KEY_HERE'

url = f'https://api.socialdata.tools/twitter/user/{userId}/affiliates'

headers = {
    'Authorization': f'Bearer {API_KEY}',
    'Accept': 'application/json'
}

response = requests.get(url, headers=headers)

if response.status_code == 200:
    data = response.json()
    print(data)
else:
    print(f"Error: {response.status_code}")
    print(response.text)
```

#### PHP

```php
$userId = '783214';
$API_KEY = 'YOUR_API_KEY_HERE';

$url = "https://api.socialdata.tools/twitter/user/{$userId}/affiliates";

$ch = curl_init();

curl_setopt_array($ch, [
    CURLOPT_URL => $url,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer $API_KEY",
        "Accept: application/json"
    ]
]);

$response = curl_exec($ch);
$data = json_decode($response, true);
print_r($data);

curl_close($ch);
```

## Example Responses

#### 200

```json
{
    "users": [
        {
            "id": 1076061,
            "id_str": "1076061",
            "name": "Keith Coleman 🌱😀🙌",
            "screen_name": "kcoleman",
            "location": "San Francisco, CA",
            "url": null,
            "description": "VP Product @X. Previously CEO at Yes Inc, @google 🙌",
            "protected": false,
            "verified": true,
            "followers_count": 30521,
            "friends_count": 825,
            "listed_count": 334,
            "favourites_count": 14063,
            "statuses_count": 2734,
            "created_at": "2007-03-13T08:18:45.000000Z",
            "profile_banner_url": "https:\/\/pbs.twimg.com\/profile_banners\/1076061\/1478574872",
            "profile_image_url_https": "https:\/\/pbs.twimg.com\/profile_images\/1093367487566012416\/9Wc1J-Pk_normal.jpg",
            "can_dm": true
        },
        // ...
    ],
    "next_cursor": "DAAHCgABGPytdBi__-wLAAIAAAAIMTUxMzM0ODEIAAMAAAACAAA"
}
```

#### 402

```json
{
    "status": "error",
    "message": "Insufficient balance"
}
```

#### 404

```json
{
    "status": "error",
    "message": "User not found"
}
```

#### 500

```json
{
    "status": "error",
    "message": "Failed to fetch data from Twitter"
}
```

## Response Codes

-   **200 OK** - request succeeded
-   **402 Payment Required** - not enough credits to perform this request
-   **404 Not Found** - requested user not found
-   **422 Unprocessable Content** - validation failed (e.g. one of the required parameters was not provided)
-   **500 Internal Error** - API internal error, typically means that SocialData API failed to obtain the requested information and you should try again later

## Related endpoints

-   [Get user profile](https://docs.socialdata.tools/reference/get-user-profile/)
-   [Get multiple user profiles by IDs](https://docs.socialdata.tools/reference/get-multiple-user-profiles/)
-   [Get user extended bio](https://docs.socialdata.tools/reference/get-user-extended-bio/)
-   [Get similar profiles](https://docs.socialdata.tools/reference/get-user-similar-profiles/)

## Before you integrate

-   [Authentication](https://docs.socialdata.tools/getting-started/authentication/)
-   [Rate limits](https://docs.socialdata.tools/getting-started/rate-limits/)
-   [Errors](https://docs.socialdata.tools/getting-started/errors/)
-   [Pricing](https://docs.socialdata.tools/getting-started/pricing/)
