TwitterAPIs Docs
API ReferenceUser Reads

Twitter Users by IDs API | Bulk Profile Lookup

Resolve many numeric user IDs into full user objects in a single request. Send up to 100 comma-separated IDs. Unresolvable IDs (suspended or deleted) are omitted rather than returned as nulls, and the response reports how many were requested and how many resolved. Cost: $0.0008 per call.

Users by IDs resolves up to 100 numeric Twitter/X user IDs into full user objects in a single request: bio, follower and following counts, verification, location, and avatar for each. Use it instead of looping User Info by ID when you hold many IDs, since one call replaces one call per user. It bills $0.0008 per user actually resolved, not per request.

GET
/users/by_ids

Authorization

bearerAuth
AuthorizationBearer <token>

Pass your API key as a bearer token on every request: Authorization: Bearer <API_KEY>.

In: header

Query Parameters

user_ids*string

Comma-separated numeric user IDs, up to 100. Duplicates are collapsed.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/users/by_ids?user_ids=745273%2C44196397"
{  "users": [    {      "id": "745273",      "username": "naval",      "name": "Naval",      "followers_count": 2100000,      "verified": true    }  ],  "requested": 2,  "resolved": 1}
{  "error": "bad_request",  "message": "Missing or malformed parameter. Fix the request before retrying."}
{  "error": "unauthorized",  "message": "The API key is missing, malformed, or revoked. Check the Authorization header."}
{  "error": "insufficient_credits",  "message": "Your balance is exhausted. Top up your credits to continue."}
{  "error": "not_found",  "message": "The resource does not exist, for example a deleted tweet or a private account."}
{  "error": "rate_limited",  "message": "Too many requests. Back off and retry with exponential backoff."}
{  "error": "server_error",  "message": "Something failed on our side. Retry with backoff; if it persists, contact support."}

Pricing

UnitPrice
Per call$0.0008
Per 1,000 calls$0.80

When to use

Use it to hydrate a list of IDs you already store, for example refreshing follower counts for a tracked cohort in one call instead of one call per account.

FAQ

How many IDs can I send at once?

Up to 100 per call. A request with more is rejected with a 400; it is never silently truncated, so you can never mistake a shortened list for a complete answer.

How is it billed?

Per user actually resolved, not per request. Ten IDs that all resolve bill as ten reads, the same as ten single lookups, so batching saves round trips rather than money.

What happens to IDs that no longer exist?

Suspended or deleted accounts are omitted from users. Compare the requested and resolved counts in the response, or diff the returned ids against the ones you sent, to see which were dropped.

Does it return the same fields as the single lookup?

Yes. Each entry is the same full user object User Info by ID returns.

Are duplicate IDs charged twice?

No. Duplicates are collapsed before the upstream call, so a repeated ID is resolved and billed once.