Retrieve profile's affiliated users

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

Endpoint

GET https://api.socialdata.tools/twitter/user/[user_id]/affiliates

Endpoint parameters

Name
Description
Example

user_id (Required)

The ID of the user for whom to return results.

783214

cursor

(Optional)

Cursor value obtained from next_cursor response property. Used to retrieve the next page of results Omit this value to retrieve the first page

DAACCgACGC12FhmAJxAKAAMYLXYWGX_Y8AgABAAAAAILAAUAAADoRW1QQzZ3QUFBZlEvZ0d...

Common Issues and Best Practices

  • In languages where the user_id value exceeds the default Integer type limit (e.g., Node.js), store user_id as a string. Use the id_str property returned by the API for these values

  • Always URL-encode the cursor value when passing it back to the API for subsequent requests

Response codes

  • HTTP 200 OK - succeeded

  • HTTP 402 Payment Required - not enough credits to perform this request

  • HTTP 404 Not Found - requested user profile does not exist

  • HTTP 422 Unprocessable Content - validation failed (e.g. one of the required parameters was not provided)

  • HTTP 500 Internal Server Error - other error, typically means that SocialData API failed to obtain the requested information and you should try again later

Rate limits

By default each user has a limit of 120 requests per minute shared across all endpoints. Please reach out to support@socialdata.tools if you need to raise your rate limit.

Example request

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

Example response

// If succeeded: 
{
    "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"
}

// If failed:
{
    "status":"error",
    "message":"User with screenname [...] not found on Twitter"
}

Last updated