Skip to content

Instantly share code, notes, and snippets.

@mike-pete
Created July 9, 2020 03:10
Show Gist options
  • Save mike-pete/0082e925ce8e85c2d1b7535cd2d73c1d to your computer and use it in GitHub Desktop.
Save mike-pete/0082e925ce8e85c2d1b7535cd2d73c1d to your computer and use it in GitHub Desktop.
##########
# GitHub #
##########
GitHub's APIs are AWESOME! They give you access to soooo much information, it's insane!
Nearly everything you want to know you can access via their APIs.
This includes things like: name, username, profile picture, repos, *email*, user events, *followers/following*, etc.
The main practical restrictions come from the API rate limiting.
Unauthenticated requests (what I used in my project) are limited to something like 50 requests per IP per hour.
This is pretty low for high volume situations (hiring agencies using this to screen candidates for example). 
My project uses 3 requests per portfolio (users, repos, and events), so you'd hit the limit with 3 agents looking at 5-6 portfolios in an hour (from the same IP).
Authenticated requests are much higher giving you something like 5000 requests per hour. So that may be useful to keep in mind.
* Emails (unauthenticated) *
The email field is technically only available with authenticated requests, but you can subvert that by digging through the user's events.
The accuracy won't be perfect, but it was good enough in my testing.
https://api.github.com/users/kid-on-github/events
This also makes unauthenticated email scraping possible (in theory).
Though selling this info or using this to spam users is against TOS.
* Followers/Following *
This is interesting. In theory this means that you could map user relationships throughout GitHub's entire user base.  
############
# Linkedin #
############
Linkedin's API is not nearly as open as GitHub's. So getting decent information from them is a bit of a pain.
That said, with a bit of leg work, you can manually export your Linkedin profile by clicking 'More' and 'Save to PDF'.
I've seen this used by other sites as a way to upload your Linkedin information.
Because this requires manual user interaction this information becomes outdated as soon as the user updates their Linkedin profile. :/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment