X / Twitter Users Lookup API
Look up to 100 X (Twitter) profiles by numeric user ID in one call — followers, bio, avatar, verification. JSON, $0.01 per call.
/v1/twitter/usersFetch up to 100 X profiles by numeric user ID in a single $0.01 call — the cheapest way to refresh follower counts for a list of accounts. Each user has the same fields as the Twitter User API. IDs that don't exist or are suspended are left out of the result.
Usage
const res = await fetch('https://api.yepapi.com/v1/twitter/users', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({"user_ids": ["44196397", "11348282"]}),
});
const { data } = await res.json();
console.log(data);curl -X POST https://api.yepapi.com/v1/twitter/users \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"user_ids": ["44196397", "11348282"]}'import requests
res = requests.post(
"https://api.yepapi.com/v1/twitter/users",
headers={"x-api-key": "YOUR_API_KEY"},
json={"user_ids": ["44196397", "11348282"]},
)
print(res.json()["data"])Request Body
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
user_ids | string[] | Yes | 1–100 numeric user IDs, as an array or a comma-separated string | — |
Response
{
"ok": true,
"data": {
"users": [
{
"avatar": "https://pbs.twimg.com/profile_images/2103567689515954176/aR-Kjpp4_400x400.jpg",
"banner": "https://pbs.twimg.com/profile_banners/44196397/1774145451",
"created_at": "2009-06-02T20:12:29+00:00",
"description": "https://t.co/ZdBx5WABYx",
"followers_count": 241500263,
"following_count": 1422,
"id": "44196397",
"is_blue_verified": true,
"likes_count": 256477,
"listed_count": 171203,
"location": null,
"media_count": 4752,
"name": "Elon Musk",
"pinned_tweet_ids": [
"2116039632743702637"
],
"protected": false,
"tweet_count": 111332,
"url": "https://x.com/elonmusk",
"username": "elonmusk",
"verified": false,
"verified_type": null,
"website": null
},
{
"avatar": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg",
"banner": "https://pbs.twimg.com/profile_banners/11348282/1788992290",
"created_at": "2007-12-19T20:20:32+00:00",
"description": "Making the seemingly impossible, possible. ✨",
"followers_count": 92298686,
"following_count": 115,
"id": "11348282",
"is_blue_verified": true,
"likes_count": 17049,
"listed_count": 96842,
"location": "Pale Blue Dot",
"media_count": 28221,
"name": "NASA",
"pinned_tweet_ids": [
"2116263878807998722"
],
"protected": false,
"tweet_count": 74477,
"url": "https://x.com/NASA",
"username": "NASA",
"verified": false,
"verified_type": null,
"website": "http://www.nasa.gov/"
}
]
}
}Response Fields
| Field | Type | Description |
|---|---|---|
ok | boolean | Whether the request succeeded |
data.users | object[] | Profiles found |
data.users[].id | string | Numeric user ID — use it as user_id on timeline endpoints |
data.users[].username | string | Handle without @ |
data.users[].name | string | Display name |
data.users[].description | string | null | Bio |
data.users[].location | string | null | Location from the profile |
data.users[].website | string | null | Website link from the profile |
data.users[].created_at | string | Account creation, ISO 8601 |
data.users[].avatar | string | null | Profile image URL (400×400) |
data.users[].banner | string | null | Banner image URL |
data.users[].url | string | x.com profile URL |
data.users[].followers_count | number | Followers |
data.users[].following_count | number | Accounts followed |
data.users[].tweet_count | number | Posts, including replies and reposts |
data.users[].likes_count | number | Posts liked |
data.users[].media_count | number | Photos and videos posted |
data.users[].listed_count | number | Lists the account is on |
data.users[].is_blue_verified | boolean | Has a blue check |
data.users[].verified | boolean | Legacy verification flag |
data.users[].verified_type | string | null | Business, Government, or null |
data.users[].protected | boolean | Posts are protected (private) |
data.users[].pinned_tweet_ids | string[] | IDs of pinned posts |
Caching
Responses are cached for 1 hour.
Errors
| Status | Code | When |
|---|---|---|
400 | VALIDATION_ERROR | user_ids is empty, has more than 100 IDs, or contains a non-numeric ID |
404 | NOT_FOUND | None of the IDs matched an active account |
429 | RATE_LIMITED_UPSTREAM | Too many requests in a short burst — retry after a few seconds |
502 / 503 | UPSTREAM_ERROR / SERVICE_UNAVAILABLE | Temporary problem fetching data from X — retry later |
Failed calls are not charged.
Related Endpoints
- Twitter User API — one profile by username
- Twitter Followers API — an account's followers
X / Twitter About Account API
Get the About this account panel for any X (Twitter) profile — country the account is based in, username changes, verified since, connection type, and affiliation. JSON, $0.01 per call.
Tweet Scraper API (Twitter User Tweets)
Tweet scraper and Twitter scraper API — get any X (Twitter) account's tweets with full text, likes, retweets, views, and media, paginated. JSON, $0.01 per call.