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);}curl --request GET \ --url 'https://api.relayxapi.com/twitter/user/info?userName=example' \ --header 'X-API-Key: <api-key>'import requests
res = requests.get( "https://api.relayxapi.com/twitter/user/info", params={"userName": "example"}, headers={"X-API-Key": "<api-key>"},)print(res.json())Look up a single profile by its @handle — bio, counts, verification state, avatar and banner.
Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters”userName
required
Username
string
Header Parameters
Section titled “Header Parameters”x-api-key
X-Api-Key
string
Responses
Section titled “ Responses ”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>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}