Free tool

Twitter ID Finder

Convert an X (Twitter) username to its permanent numeric user ID, or a user ID back to the current @handle. Paste one account or a whole list, then copy the IDs or the full results as CSV.

One per line. Numbers are read as user IDs; write @12345 for an all-digit username.

Why use the user ID instead of the username

A username is a label the owner can change at any time, and a freed-up handle can be claimed by someone else. The user ID is fixed when the account is created and never changes, so it is the reliable key for API calls, allowlists, blocklists, giveaway entries and any dataset you keep over time.

Accounts created since late 2013 have Snowflake IDs, which store their creation time. Paste one into the Tweet ID to Date converter to see when the account was created, to the millisecond.

Get user IDs with the API

To convert usernames in code, send a list to POST /twitter/users. Each account comes back with userId, profile fields and counts.

curl -X POST https://api.twexapi.io/twitter/users \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '["NASA", "elonmusk"]'

# → { "code": 200, "data": [ { "userId": "11348282", "username": "NASA", ... }, ... ] }

To go from IDs to usernames, use POST /twitter/users/by_ids. IDs that match no account are left out of the response.

curl -X POST https://api.twexapi.io/twitter/users/by_ids \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '["783214"]'

# → { "code": 200, "data": [ { "id": "783214", "screen_name": "X", ... } ] }

A profile read uses 5 Credits, about $0.05 per 1,000 accounts. New accounts get 20,000 free Credits, enough for about 4,000 lookups.

FAQ

How do I find a Twitter user ID from a username?

Paste the @username or profile link above and select Find IDs. The tool returns the account’s permanent numeric user ID with its name, follower count and join year, so you can check it is the right account.

Can I convert a user ID back to a username?

Yes. Paste the numeric ID, or a link such as x.com/i/user/783214, and the tool shows the account’s current @handle. Mixed lists of usernames and IDs work too.

Does a user ID change when someone changes their username?

No. The handle can be renamed at any time, but the user ID stays the same for the life of the account. That is why APIs, allowlists and blocklists store the ID.

How many accounts can I convert at once?

Without an account the free preview converts the first 3 accounts of each paste. Signed in, you can convert up to 200 per paste using your own Credits; new accounts get 20,000 free Credits.

Why does an account show as not found?

The username may be misspelled, the account may have been renamed, deleted or suspended, or the ID may belong to no account. Protected accounts are still found, because the ID and handle are public.

Is TwexAPI affiliated with X?

No. TwexAPI is an independent third-party provider of public social data and is not affiliated with or endorsed by X Corp.

Related

Twitter ID Finder: Convert X Username to User ID and Back | TwexAPI