On Facebook, you are identified by a number like 7435423976 that will never change, even after changing your name or your URL shortcut.

Does Twitter have the same never-changing identifier?

Twitter users have a name (for instance "JohnDoe4ever"), but they can change it, so it is not a good identifier. Is there a hidden, better one?

1 Answer 1


Yes, each Twitter Account is assigned a user_id.

Taken from the Twitter API Documentation


The ID of the user for whom to return results for. Helpful for disambiguating when a valid user ID is also a valid screen name.


It's also useful to know that you can get the user_id by displaying a users tweet via the /statuses/show/{tweetId} API Call

This will display results similar to this:

Sample Twitter API Results

As you can see the user_id is provided along with the individual tweet information.

The {tweetId} can be found by clicking on the time stamp of any tweet. The {tweetId} will be long number at the end of the URL.

  • Thanks a lot! I guess that's exactly what I need, I will look into this user_id now.
    – nic
    Commented Apr 6, 2011 at 11:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.