By User Ids
GET
/tw-v2/user/by-idsDescription
Retrieve comprehensive user profile information for multiple users in a single request using their platform user IDs. Returns detailed user data including statistics, verification status, and profile metadata for up to 50 users at once.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| userIds | string | required | Comma-separated list of platform user IDs to retrieve (maximum 50 IDs per request). |
Code Examples
const params = new URLSearchParams({
userIds: '10017528,123456789'
});
const response = await fetch(`https://api.tweetapi.com/tw-v2/user/by-ids?${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": "10017528",
"username": "sample_user_96991",
"name": "Sample User 96991",
"bio": "Sample profile bio for Sample User 96991.",
"location": null,
"website": null,
"pinnedTweetIds": [
"2008402643216600030"
],
"avatar": "https://example.com/images/sample-avatar-96991.jpg",
"banner": "https://example.com/images/sample-banner-96991.jpg",
"profileImageShape": "Circle",
"verified": false,
"isBlueVerified": true,
"verifiedType": null,
"verifiedSince": null,
"isIdentityVerified": false,
"isProtected": false,
"possiblySensitive": false,
"profileInterstitialType": null,
"withheldInCountries": [],
"professional": {
"type": "Creator",
"category": [],
"restId": "9002120522450210227"
},
"businessAccount": null,
"creatorSubscriptionsCount": 0,
"hasHiddenSubscriptions": false,
"highlightsInfo": null,
"hasGraduatedAccess": true,
"isProfileTranslatable": false,
"hasCustomTimelines": true,
"isTranslator": false,
"affiliatesHighlightedLabel": {
"label": {
"url": {
"url": "https://example.com/link-94089/profile-41921/X",
"urlType": "DeepLink"
},
"badge": {
"url": "https://example.com/link-94089/profile-29900/media/sample-media-25883.jpg"
},
"description": "Sample description for documentation 53418.",
"userLabelType": "BusinessLabel",
"userLabelDisplayType": "Badge"
}
},
"defaultProfile": false,
"defaultProfileImage": false,
"followerCount": 226995859,
"followingCount": 1218,
"tweetCount": 86745,
"listedCount": 164447,
"mediaCount": 4162,
"favoritesCount": 174838,
"createdAt": "2009-06-02T20:12:29.000Z"
},
{
"id": "1001596317",
"username": "sample_user_76083",
"name": "Sample User 76083",
"bio": "Sample profile bio for Sample User 76083.",
"location": "Sample City 778",
"website": "https://example.com/link-94089/profile-76083",
"pinnedTweetIds": [
"2001487922093177253"
],
"avatar": "https://example.com/images/sample-avatar-76083.jpg",
"banner": "https://example.com/images/sample-banner-76083.jpg",
"profileImageShape": "Circle",
"verified": false,
"isBlueVerified": true,
"verifiedType": null,
"verifiedSince": null,
"isIdentityVerified": false,
"isProtected": false,
"possiblySensitive": false,
"profileInterstitialType": null,
"withheldInCountries": [],
"professional": {
"type": "Creator",
"category": [],
"restId": "9005853162840217067"
},
"businessAccount": null,
"creatorSubscriptionsCount": 0,
"hasHiddenSubscriptions": false,
"highlightsInfo": null,
"hasGraduatedAccess": true,
"isProfileTranslatable": false,
"hasCustomTimelines": true,
"isTranslator": false,
"affiliatesHighlightedLabel": {},
"defaultProfile": false,
"defaultProfileImage": false,
"followerCount": 734417,
"followingCount": 2230,
"tweetCount": 161547,
"listedCount": 7510,
"mediaCount": 17594,
"favoritesCount": 149690,
"createdAt": "2013-07-08T09:31:59.000Z"
}
]
}API Playground
GET
/tw-v2/user/by-idsPress ⌘ + Enter to execute
curl -X GET "https://api.tweetapi.com/tw-v2/user/by-ids" \
-H "X-API-Key: YOUR_API_KEY"Response
Click "Try It!" to see the response