X (Twitter)
Profile
Get an X account’s name, bio, avatar and counters.
Endpoint
GET
/s/twitter/profileSend your API key in the X-API-Key header. twitter is the usual service slug; use the one shown on your subscription if it differs.
Query parameters
| Name | Description |
|---|---|
usernamerequired | Account name, with or without the leading @.Example: NASA |
Example request
curl '/s/twitter/profile?username=NASA' \
-H 'X-API-Key: YOUR_API_KEY'Example response
The result is in data. Fields the platform didn't report are left out. Field reference: response shapes.
{
"data": {
"platform": "twitter",
"id": "11348282",
"username": "NASA",
"name": "NASA",
"bio": "Explore the universe and discover our home planet.",
"avatar": "https://pbs.twimg.example/profile_images/nasa_400x400.jpg",
"externalUrl": "https://www.nasa.gov",
"links": [
{
"url": "https://www.nasa.gov"
}
],
"verified": true,
"private": false,
"followers": 89000000,
"following": 180,
"postCount": 72000
}
}Notes
- Suspended or missing accounts return 404.