Get user followings
GET
/twitter/user/followings
const url = 'https://api.relayxapi.com/twitter/user/followings?userName=example';const options = { method: 'GET', headers: { 'X-API-Key': '<api-key>' },};
try { const res = await fetch(url, options); const data = await res.json(); console.log(data);} catch (err) { console.error(err);}curl --request GET \ --url 'https://api.relayxapi.com/twitter/user/followings?userName=example' \ --header 'X-API-Key: <api-key>'import requests
res = requests.get( "https://api.relayxapi.com/twitter/user/followings", params={"userName": "example"}, headers={"X-API-Key": "<api-key>"},)print(res.json())Page through the accounts a user follows, newest first.
Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters”userName
required
Username
string
cursor
Cursor
string
pageSize
Pagesize
integer
Header Parameters
Section titled “Header Parameters”x-api-key
X-Api-Key
string
Responses
Section titled “ Responses ”Successful Response
Media typeapplication/json
Example
{ "followings": [ { "type": "user", "userName": "example_user3", "url": "https://x.com/example_user3", "id": "1000000000000000003", "name": "Example User 3", "isBlueVerified": true, "description": "Example bio.", "location": "", "followers": 1552978, "following": 1, "statusesCount": null, "createdAt": "Tue Oct 11 17:17:44 +0000 2011", "profilePicture": "https://pbs.twimg.com/profile_images/example/avatar_normal.jpg", "coverPicture": null, "canDm": true, "pinnedTweetIds": [], "profile_bio": null }, { "type": "user", "userName": "example_user4", "url": "https://x.com/example_user4", "id": "1000000000000000004", "name": "Example User 4", "isBlueVerified": true, "description": "Example bio.", "location": "", "followers": 5525288, "following": 1, "statusesCount": null, "createdAt": "Thu Dec 11 21:24:28 +0000 2014", "profilePicture": "https://pbs.twimg.com/profile_images/example/avatar_normal.jpg", "coverPicture": null, "canDm": true, "pinnedTweetIds": [], "profile_bio": null } ], "status": "success", "message": "", "has_next_page": true, "next_cursor": "0|2103482116405723131"}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}