Skip to content

mattrltrent/stackoverflow_badge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stackoverflow Stats Badge For Your GitHub Profile 🚀

Example of it on my GitHub profile here. Star it if it helps you! ⭐️

  1. Full badge:

    stackoverflow rep. badge

  2. With &mini=true URL param appended:

    stackoverflow rep. badge

Adding full badge version

  1. Go to Stackoverflow, then click on your profile. Once on your profile, you should see a number in the URL bar. This is your account ID.

    For example, here is my account ID:

  2. Displayed on the stats badge is "+ some number of reputation per some time period". You need to choose over what time period you want us to calculate your reputation gain. The options are day, week, month, quarter, and year. This is your period.

  3. Take the base URL, and insert your newly found account ID and period where appropriate:

    For example, here is the URL for my account if I wanted to show my reputation gain quarterly:

  4. Here is the copyable version, just change the "USERNAME" and "PERIOD": https://stackoverflow-badge.herokuapp.com/stackoverflow?username=USERNAME&period=PERIOD.

  5. Insert this URL from step 4 into your GitHub profile's README.md exactly like this (obviously with your own failure text and personalized URL):

    ![some text to render if the image fails to load](step 4 URL)

  6. If you're still struggling, check out how I added it to my own profile's README.md here.

Adding mini badge version

This only shows the total reputation you have.

  1. Do all the steps from the big badge above.

  2. Append &mini=true to the URL (keep the other options, they just don't matter). Added via suggestion from @yubinjodev.

Limitations

These restrictions shouldn't interfere with regular usage:

  • The badge is cached for 15 minutes, so its data can possibly lag 15 minutes behind your true Stackoverflow stats. This is done to reduce server load.
  • You're rate limited to loading 15 different stat badges every 60 seconds based on your IP.
  • The StackAPI limits everyone to loading 300 different profiles every 24 hours based on IP.

Feel free to create issues or PRs!