YepAPI
Twitter / X API

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.

POST/v1/twitter/users
$0.01/call

Fetch 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

ParameterTypeRequiredDescriptionDefault
user_idsstring[]Yes1–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

FieldTypeDescription
okbooleanWhether the request succeeded
data.usersobject[]Profiles found
data.users[].idstringNumeric user ID — use it as user_id on timeline endpoints
data.users[].usernamestringHandle without @
data.users[].namestringDisplay name
data.users[].descriptionstring | nullBio
data.users[].locationstring | nullLocation from the profile
data.users[].websitestring | nullWebsite link from the profile
data.users[].created_atstringAccount creation, ISO 8601
data.users[].avatarstring | nullProfile image URL (400×400)
data.users[].bannerstring | nullBanner image URL
data.users[].urlstringx.com profile URL
data.users[].followers_countnumberFollowers
data.users[].following_countnumberAccounts followed
data.users[].tweet_countnumberPosts, including replies and reposts
data.users[].likes_countnumberPosts liked
data.users[].media_countnumberPhotos and videos posted
data.users[].listed_countnumberLists the account is on
data.users[].is_blue_verifiedbooleanHas a blue check
data.users[].verifiedbooleanLegacy verification flag
data.users[].verified_typestring | nullBusiness, Government, or null
data.users[].protectedbooleanPosts are protected (private)
data.users[].pinned_tweet_idsstring[]IDs of pinned posts

Caching

Responses are cached for 1 hour.

Errors

StatusCodeWhen
400VALIDATION_ERRORuser_ids is empty, has more than 100 IDs, or contains a non-numeric ID
404NOT_FOUNDNone of the IDs matched an active account
429RATE_LIMITED_UPSTREAMToo many requests in a short burst — retry after a few seconds
502 / 503UPSTREAM_ERROR / SERVICE_UNAVAILABLETemporary problem fetching data from X — retry later

Failed calls are not charged.

On this page