By Usernames
GET
/tw-v2/user/by-usernamesDescription
Retrieve comprehensive user profile information for multiple users in a single request using their Twitter/X usernames. Returns detailed user data including statistics, verification status, and profile metadata for up to 200 users at once.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| usernames | string | required | Comma-separated list of Twitter/X usernames without @ symbol (maximum 200 usernames per request). The @ symbol is automatically stripped if provided. |
Code Examples
const usernames = ['elonmusk', 'SpaceX', 'Tesla'];
const params = new URLSearchParams({
usernames: usernames.join(',')
});
const response = await fetch(`https://api.tweetapi.com/tw-v2/user/by-usernames?${params}`, {
method: 'GET',
headers: {
'X-API-Key': 'YOUR_API_KEY'
}
});
const data = await response.json();
console.log(data);
Response
Success Response (200 OK)
200
{
"data": [
{
"id": "44196397",
"username": "elonmusk",
"name": "Elon Musk",
"bio": "",
"location": null,
"website": null,
"pinnedTweetIds": [
"1998463583831617855"
],
"avatar": "https://pbs.twimg.com/profile_images/1995407795835772928/Wp7m4L9h_normal.jpg",
"banner": "https://pbs.twimg.com/profile_banners/44196397/1739948056/1500x500",
"profileImageShape": "Circle",
"verified": false,
"isBlueVerified": true,
"verifiedType": null,
"verifiedSince": null,
"isIdentityVerified": false,
"isProtected": false,
"possiblySensitive": false,
"profileInterstitialType": null,
"withheldInCountries": [],
"professional": {
"type": "Creator",
"category": [],
"restId": "1679729435447275522"
},
"businessAccount": {
"affiliatesCount": 0
},
"creatorSubscriptionsCount": 232,
"hasHiddenSubscriptions": true,
"highlightsInfo": {
"canHighlight": true,
"highlightedTweetsCount": "827"
},
"hasGraduatedAccess": true,
"isProfileTranslatable": false,
"hasCustomTimelines": true,
"isTranslator": false,
"affiliatesHighlightedLabel": {
"label": {
"url": {
"url": "https://twitter.com/X",
"urlType": "DeepLink"
},
"badge": {
"url": "https://pbs.twimg.com/profile_images/1955359038532653056/OSHY3ewP_bigger.jpg"
},
"description": "X",
"userLabelType": "BusinessLabel",
"userLabelDisplayType": "Badge"
}
},
"defaultProfile": false,
"defaultProfileImage": false,
"followerCount": 229682771,
"followingCount": 1245,
"tweetCount": 91086,
"listedCount": 165562,
"mediaCount": 4262,
"favoritesCount": 189194,
"createdAt": "2009-06-02T20:12:29.000Z"
},
{
"id": "34743251",
"username": "SpaceX",
"name": "SpaceX",
"bio": "SpaceX designs, manufactures and launches the world's most advanced rockets and spacecraft",
"location": "Earth",
"website": "http://spacex.com",
"pinnedTweetIds": [
"1983926856504971268"
],
"avatar": "https://pbs.twimg.com/profile_images/1697749409851985920/HbrI04tM_normal.jpg",
"banner": "https://pbs.twimg.com/profile_banners/34743251/1681251194/1500x500",
"profileImageShape": "Square",
"verified": false,
"isBlueVerified": true,
"verifiedType": "Business",
"verifiedSince": "2012-01-11T16:12:34.088Z",
"isIdentityVerified": false,
"isProtected": false,
"possiblySensitive": false,
"profileInterstitialType": null,
"withheldInCountries": [],
"professional": {
"type": "Business",
"category": [],
"restId": "1681839322029502464"
},
"businessAccount": {
"affiliatesCount": 16
},
"creatorSubscriptionsCount": 1,
"hasHiddenSubscriptions": false,
"highlightsInfo": {
"canHighlight": true,
"highlightedTweetsCount": "113"
},
"hasGraduatedAccess": true,
"isProfileTranslatable": false,
"hasCustomTimelines": true,
"isTranslator": false,
"affiliatesHighlightedLabel": {},
"defaultProfile": false,
"defaultProfileImage": false,
"followerCount": 40396663,
"followingCount": 120,
"tweetCount": 10896,
"listedCount": 43884,
"mediaCount": 4235,
"favoritesCount": 519,
"createdAt": "2009-04-23T21:53:30.000Z"
}
]
}API Playground
GET
/tw-v2/user/by-usernamesPress ⌘ + Enter to execute
curl -X GET "https://api.tweetapi.com/tw-v2/user/by-usernames" \
-H "X-API-Key: YOUR_API_KEY"Response
Click "Try It!" to see the response