Social Media
X User Profile
Get an X user's profile by handle — display name, bio, follower and following counts, verification, location, website, avatar, and pinned tweet ids — as JSON. Costs 1 credit per request.
POST/api/v1/x/user
Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is your Scavio API key (e.g. Bearer sk_live_your_key).
Body
application/jsonscreen_namestringrequiredAn X handle without the @.
Example: elonmusk
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
results = client.x.user(screen_name="elonmusk")
print(results)Response
"user_id": "44196397",
"screen_name": "elonmusk",
"name": "Elon Musk",
"description": "Chief Twit",
"followers_count": 189400000,
"friends_count": 1042,
"statuses_count": 68900,
"media_count": 4210,
"blue_verified": true,
"verified_type": "Business",
"protected": false,
"location": "Texas",
"website": "https://x.ai",
"avatar": "https://pbs.twimg.com/profile_images/1683325380441128960/yRsRRjGO_normal.jpg",
"header_image": "https://pbs.twimg.com/profile_banners/44196397/1690621312",
"created_at": "Tue Jun 02 20:12:29 +0000 2009",
},
"response_time": 760,
"credits_used": 1,
"credits_remaining": 4816
}