Skip to content

Get user info by screen name

GET
/twitter/user/info
const url = 'https://api.relayxapi.com/twitter/user/info?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);
}

Look up a single profile by its @handle — bio, counts, verification state, avatar and banner.

userName
required
Username
string
x-api-key
X-Api-Key
string

Successful Response

Media typeapplication/json
Example
{
"status": "success",
"msg": "",
"data": {
"type": "user",
"userName": "jack",
"url": "https://x.com/jack",
"id": "12",
"name": "jack",
"isBlueVerified": true,
"description": "no state is the best state",
"location": null,
"followers": 12300495,
"following": 3,
"statusesCount": 30996,
"createdAt": "Tue Mar 21 20:50:14 +0000 2006",
"profilePicture": "https://pbs.twimg.com/profile_images/1661201415899951105/azNjKOSH_normal.jpg",
"coverPicture": "https://pbs.twimg.com/profile_banners/12/1742427520",
"canDm": true,
"pinnedTweetIds": [],
"profile_bio": {
"description": "no state is the best state",
"entities": {
"description": {},
"url": {
"urls": [
{
"display_url": "primal.net/jack",
"expanded_url": "http://primal.net/jack",
"indices": [
0,
23
],
"url": "https://t.co/ZEpOg6rn5L"
}
]
}
}
}
}
}

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