Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 4 down vote accepted

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.

share|improve this answer
Thank you Brock! – Zagorulkin Dmitry Jul 31 '12 at 18:27
You're welcome. – Brock Adams Aug 2 '12 at 9:43

You must log in to answer this question.

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