Skip to content

Get user followers

GET
/twitter/user/followers
const url = 'https://api.relayxapi.com/twitter/user/followers?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 that follow a user, newest follower first.

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

Successful Response

Media typeapplication/json
Example
{
"followers": [
{
"type": "user",
"userName": "example_user1",
"url": "https://x.com/example_user1",
"id": "1000000000000000001",
"name": "Example User 1",
"isBlueVerified": true,
"description": "Example bio.",
"location": "",
"followers": 1125359,
"following": 1956,
"statusesCount": null,
"createdAt": "Sat Dec 12 15:26:42 +0000 2020",
"profilePicture": "https://pbs.twimg.com/profile_images/example/avatar_normal.jpg",
"coverPicture": null,
"canDm": true,
"pinnedTweetIds": [],
"profile_bio": null
},
{
"type": "user",
"userName": "example_user2",
"url": "https://x.com/example_user2",
"id": "1000000000000000002",
"name": "Example User 2",
"isBlueVerified": true,
"description": "Example bio.",
"location": "",
"followers": 1239563,
"following": 343,
"statusesCount": null,
"createdAt": "Wed Feb 13 05:57:32 +0000 2008",
"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": "1877311720608910701|2103482112584712120"
}

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"
}
]
}