How do I can find someone's userid if I have only their username?

For example, my real username is: Zagorulkin Dmitry

My Stack Overflow userid is: 1321404

Are there any API methods for this kind of task?

1 Answer 1


To find user_id(s) for a username, use the inname parameter of the /users query.
You will have to repeat this query call for every Stack Exchange site that you are interested in. For example:

If you only want the user_id, create a filter to that effect. For those two example queries, I used a filter to return just the user_id and the account_id; resulting in:





The account_id is useful, because once you know it, you can use
/users/{accountId}/associated to get all of the user's associated account info.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .