Skip to content

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);
}

Page through the accounts a user follows, newest first.

userName
required
Username
string
cursor
Cursor
string
pageSize
Pagesize
integer
x-api-key
X-Api-Key
string

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>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}