What is a Twitter user ID?
Every X (Twitter) account has two identifiers. The @handle is the name people see and type, and the owner can change it whenever they like. The user ID is a number X assigns when the account is created. It never changes, and no two accounts share one. X uses the ID behind the scenes to tie an account to its posts, followers and lists, which is why renaming an account doesn't break any of them.
User IDs are whole numbers up to 64 bits long. The earliest accounts have tiny IDs: Jack Dorsey's @jack is 12. Accounts created in recent years have IDs 18 or 19 digits long.
Why the ID never changes, but the handle does
A handle is just a label. You can change yours in Settings at any time, and the old one can then be claimed by someone else. That makes handles a poor way to keep track of an account: a list of handles saved last year may now point to different people, or to nothing at all. The ID survives every rename. Store the ID and you can always find the account again, whatever it's called now.
This matters whenever you keep a list of accounts: an allowlist or blocklist, a set of competitors you follow, a research dataset, or accounts linked to customers in your own app. Save the ID, and show the handle.
How to find a Twitter ID manually
The finder above is the quickest way. If you'd rather do it yourself, these methods work:
- 01Use the finder above
Type the handle, paste the profile link, or paste a user ID. You get the ID (or the current handle) in a second, with a copy button.
- 02Your own ID: your data archive
In X, go to Settings → Your account → Download an archive of your data. When the archive arrives, its account file lists your accountId.
- 03Any account: developer tools
Open the profile on x.com, open your browser's developer tools, go to the Network tab and reload. Find the request named UserByScreenName. Its response contains rest_id, which is the user ID.
- 04ID to profile
Open x.com/i/user/ followed by the ID. X opens the profile that owns that ID, whatever its handle is today.
Using a user ID in the API
Many X API endpoints that act on an account, such as reading its posts or followers, take the user ID rather than the handle, because the ID is stable. The API returns IDs as strings, not numbers, and you should keep them that way. A 19-digit ID is bigger than the largest whole number JavaScript can store exactly (2⁵³, about 9 quadrillion), so reading it as a number can quietly change its last digits. Store IDs as text in your code and your database.
Don't confuse a user ID with a post ID. Each post has its own ID: the number after /status/ in a post link.
Run it from code
Need IDs for many accounts, or building a bot or AI agent? The same lookup is one call to the twitr.sh X API. It's paid per call in USDC, with no API key and no signup:
curl -X POST https://twitr.sh/api/tools/x_read \
-H 'content-type: application/json' \
-d '{"resource":"get-user","username":"nasa"}'
# → HTTP 402 with the exact price; pay with any x402 / MPP wallet and retryThe response is the full profile, and its id field is the user ID. To go the other way, pass the numeric ID as username. To look up to 100 accounts by ID in one call, use "resource":"batch-users" with an ids list. Agents in Claude Code, Cursor or any MCP client can call it as the x_read tool. See the x_read reference, all X tools and pricing.
More free X tools
Check whether an account is hidden from search with the shadowban checker, see who follows who with the follow checker, or read any thread as plain text with the thread reader.
Questions
- How do I find a Twitter user ID?
- Enter the username or paste the profile link into the finder above. It shows the numeric user ID with a copy button, plus the account's name, followers and join date. You don't need to log in.
- What is the difference between a Twitter ID and a username?
- The username (the @handle) is the name people see and type. The owner can change it at any time. The user ID is a number X assigns when the account is created. It never changes and no other account can have it.
- Does a Twitter user ID ever change?
- No. The ID stays the same for the life of the account, through every handle change and display-name change. That's why apps and scripts store the ID, not the handle.
- Can I find a username from a Twitter ID?
- Yes. Paste the numeric ID into the finder and it shows the handle that account uses right now. You can also open x.com/i/user/ followed by the ID to go straight to the profile.
- How do I find my own Twitter ID?
- Enter your own handle above. Or download your data archive from Settings → Your account → Download an archive of your data; the archive's account file lists your accountId.
- Why are some Twitter IDs short and others very long?
- IDs are 64-bit numbers handed out over time. The earliest accounts have very small IDs (@jack's is 12). Accounts created in recent years have IDs 18 or 19 digits long.
- Why do APIs return Twitter IDs as strings?
- Long IDs are bigger than the largest whole number JavaScript can store exactly (2⁵³, about 9 quadrillion). Read as a number, a 19-digit ID can silently lose its last digits. Strings keep it exact, so store IDs as text.
- Can I find the ID of a private or suspended account?
- Private (protected) accounts keep their posts hidden, but their profile basics are public, so the finder shows their ID. X hides most details of suspended accounts, so those may show as suspended or not be found.
- Is a user ID the same as a tweet ID?
- No. Each post has its own ID, the number after /status/ in a post link. A user ID identifies the account; a post ID identifies one post.
- Is the Twitter ID finder free?
- Yes. You get 3 free checks a day across the twitr.sh free tools, with no login. Lookups are cached for 24 hours, so looking up the same account again is instant and doesn't use a check. Signed-in users can run extra lookups for $0.02 each from their twitr.sh balance.
Last updated October 1, 2026