Editor’s note: This was #1 on the Best of 2014 list.
GitHub can be a powerful tool for sourcing software engineering talent. For the uninitiated, GitHub is a software project hosting service on which software engineers create a profile, host their code, or contribute to other projects. GitHub profiles often include an email address, twitter handle, and/or link to a personal website. Due to this, and as previously posted on SourceCon, even a simple site: search on GitHub’s domain produces some serious results. However, some of the best profiles simply have no contact information aside from a (hopefully) real name and a GitHub username.
Traditionally, you may cross reference a GitHub profile with LinkedIn, run the username through namechk and see where else they hangout, or even try to deduce an email address with the Rapportive plugin. You may even go so far as to hunt them down on OKCupid. As it turns out, you can get almost any GitHub user’s email address directly through GitHub’s own API from the comfort of your own browser in five simple steps.
1. Copy and paste the next line into your browser (feel free to bookmark it):
https://api.github.com/users/xxxxxxx/events/public
2. Find the GitHub username for which you want the email:
3. Replace the xxxxxxx in the URL with the person’s GitHub username.
4. Hit Enter.
5. Press Ctrl+F and search for “email”.
According to GitHub, this information is publicly available. However, you would likely only see it if you were an Engineer committing code to your candidate’s public repository through the Git system. In essence, this works by calling up said public information through GitHub’s API in your browser.
Article Continues Below
While this method works for the vast majority of usernames, there are a few who have opted not to store their personal email address on their public repositories. However, of the many usernames used in testing this method, I only ran into 3 that were masked.
On a side note, if the user has a popular public repository you may return multiple email addresses belonging to the various contributors to the repository. You can clear through these by searching for the name on the account (such as “Fredrik”) instead of “email”. Although on second thought, you may wish to engage the other contributors as well.
Special thanks to @RStrandid, @MarkNexus, and @Panhawk
Matthew – nice! I love getting into code – just don’t have the time to do it these days. Kudos to all involved with the discovery – steve
Thanks, Steve. Diving into the code is always fun but you’re right, it takes an insane amount of time. To be honest the original method I had required a person to navigate a unix command line or install a unix-style terminal in Windows, which for the average user is no simple feat.
Glad you enjoyed it.
That is rad. Good work!
This is great, nice find – let’s hope they don’t close this loophole the way LinkedIn did last year on with an API trick that used to let you view someone’s full profile regardless of degrees away!
Prior to posting this it was submitted as a hole and they said they did not want to fix it. Fingers crossed.
Here’s some information on how to hide your email address from GitHub: http://stackoverflow.com/a/18186072
If you use Chrome as your browser you can add the Context Menu Search plugin and this as one of your search engines https://api.github.com/users/%s/events/public after that all you have to do is highlight the username on github and right click. The link to the plugin is here. https://chrome.google.com/webstore/detail/context-menu-search/ocpcmghnefmdhljkoiapafejjohldoga
Wow Fantastic
This no longer works….
But thanks for the information.
Evan, do you have a new option that does work ?
just checked – nope, it does not
Umm, it worked for me and it’s 2017.
It works for me if I add a slash at the end of the URL. It has to be “…public/” and not “…public”
Hey Guys! Its my duty to inform that apparently Github has modified this and its no longer available .. I know.. Bummer!
Jonathan
This stiill works for users with certain settings.
Thanks, because there are people that users want to contact them to help and fix issues. Many thanks really.
So the original url does not work any more however, the following URL does work
https://api.github.com/users/XXXXX
XXX=user name
Great Article Matthew. I’d just like to point out, for those who are not technically inclined, there are a number of apps already which are able to connect email addresses to social profiles – or the other way around. One example I know of is http://www.FindAnyEmail.net, and I believe they also report on GitHub accounts, as well as other popular social networks. There is also Rapportive – the Chrome Add-on, which is indispensable if you are a gmail user.
How to prevent it:
https://help.github.com/articles/keeping-your-email-address-private/
Good tip! Just wish our house recruiter knew how to work github.
don’t tell this to recruiters please.
Is it inappropriate for me to say “I could kiss you right now”?
Thanks!
Thanks
This does not work anymore. This page has published a new script for this: https://www.facebook.com/nerdsunity/
dude u just linked some facebook page. ever heard of permalinks?
No longer works. Just browse someone’s commit history and add .patch to a commit URL, you’ll likely get their email address from there.
I created Chrome plugin that does it automatically. Enjoy 😉 https://goo.gl/4MdvGN
for £10
I wonder which stupid person would pay 15$ per month for such a stupid plugin. You should read more about “open source” my friend.
Checkout https://recruit.now.sh for a free tool that does this automatically
link dead
How to make it work for Github accounts with private emails? https://api.github.com/users/angularjs-gdit/events/public doesn’t seem to work.
Hey Pavel,
I may be wrong, but I think the whole idea of private email is like private repository. People should not be able to see your thing if it is private.
According to https://github.com/blog/2346-private-emails-now-more-private, private email are not suppose to be expose to the public.
Through the GitHub API, you could not get their private email which makes sense for security reason.
I do not think anyone could get just anybody private email without some hacking.
Hope this helps!
How to Find Almost Any GitHub User’s Email Address
thanks.
Thank you!
Thank you – it works – for some users and not others.
https://api.github.com/users/alhelal/events/public
For this you can’t anything.
If you look for bulk email export, check out https://www.getmydeveloper.com/findit/search.html it works pretty well 🙂
Thank you for this. Really nice peice of work. Creation of backlinks made easy because of you. Thanks!
All the contents you mentioned in post is too good and can be very useful. I will keep it in mind, thanks for sharing the information keep updating, looking forward for more posts.Thanks
http://www.maninerd.com
http://www.maniwebify.com
http://www.onlinequranacademy.co
http://www.hitscorner.com
Please consider https://www.getmydeveloper.com