By User Ids
GET
/tw-v2/user/by-idsDescription
Retrieve comprehensive user profile information using a Twitter/X user ID. Returns detailed user data including statistics, verification status, and profile metadata.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| userIds | string | required | Array of Twitter/X user IDs to retrieve |
Code Examples
const params = new URLSearchParams({
userIds: '44196397,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": "44196397",
"username": "elonmusk",
"name": "Elon Musk",
"bio": "https://t.co/9qhgzJ69UQ",
"location": null,
"website": null,
"pinnedTweetIds": [
"1973288477988143277"
],
"avatar": "https://pbs.twimg.com/profile_images/1936002956333080576/kqqe2iWO_400x400.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": null,
"creatorSubscriptionsCount": 0,
"hasHiddenSubscriptions": false,
"highlightsInfo": null,
"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": 226995859,
"followingCount": 1218,
"tweetCount": 86745,
"listedCount": 164447,
"mediaCount": 4162,
"favoritesCount": 174838,
"createdAt": "2009-06-02T20:12:29.000Z"
},
{
"id": "1577241403",
"username": "levelsio",
"name": "@levelsio",
"bio": "💸https://t.co/sQ0aiU7v02 $336K/m\n📸https://t.co/lAyoqmSBRX $150K/m\n🛰https://t.co/ZHSvI2wjyW $33K/m\n🏡https://t.co/1oqUgfD6CZ $30K/m\n🌍https://t.co/UXK5AFqCaQ $7K/m\n👙https://t.co/RyXpqGuFM3 $14K/m\n💾https://t.co/M1hEUBAynC $6K/m",
"location": "📕 My book $8K/m 👉",
"website": "http://readMAKE.com",
"pinnedTweetIds": [
"1457315274466594817"
],
"avatar": "https://pbs.twimg.com/profile_images/1589756412078555136/YlXMBzhp_400x400.jpg",
"banner": "https://pbs.twimg.com/profile_banners/1577241403/1665964220/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": "1800203633688027410"
},
"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