Steam

Steam

49 ratings
Rarest Steam Badges
By Community Market Maker
This guide briefly explains how to generate an Excel file containing Steam badges ordered by scarcity. Information about badge scarcity is useful for trading non-marketable trading cards, especially foil cards. No programming skills required
3
3
   
Award
Favorite
Favorited
Unfavorite
Prerequisites
You need a Steam API-Key for loading badge information.

How to Obtain a Steam API-Key
Steam API-Keys can be obtained from here . Your Steam API-key is linked directly to your Steam account and can be used for retrieving certain information (here: about user badges) of the Steam platform. You have to keep it confidential. Sharing it with other people is a violation of terms of use and may bring you into trouble. Registering the key requires you to enter a domain name into a text field labeled "Domain Name". Entering the text "localhost" (without the quotes) will do here. Then click the "Register" button to register your key. You should be redirected to a page where your API-key is displayed. Keep it safe.

When trying to get the API key you might realize that you already have one without even knowing it. This might happen for example if you have been using ArchiSteamFarm [github.com] as this software sometimes generates API keys automatically. This is also a potential source of error: if your badge data cannot be loaded this may be due to changes having made to your API key in the background. In this case call the above API key page and check whether the API key you are using is still correct.
Load Badge Data in JSON Format
You can use your Steam API key to load badges of any user of your choice including yourself. All you need to know is the Steam ID of the user whose badges to load.

Select a User
For the purpose of creating a list of rarest badges, a good choice is a user having crafted as many foil badges as possible. Foil badges are especially rare and difficult to craft and therefore should not be missing on a list of badge rarity. Usually, users having crafted very many foil badges have also crafted very many normal badges and therefore provide good coverage of both badge types. Users with many badges can be found on top of the badge rankings "Most Badges" [steamladder.com] or "Most Foil Badges" [steamladder.com] at Steamladder. Selecing a user of one of these Steamladder rankings will redirect you to her or his Steamladder profile page. The URL of the Steamladder profile page contains the user's SteamID you need for querying badges. For the purpose of further exposition, we pick a user named "4yBaK*". At the time of this writing, this is the user with the highest known badge count in the world. The URL

https://steamladder.com/profile/76561198023416824

of his Steamladder profile page reveals his SteamID 76561198023416824.


Load Badge Data
Badge data can be loaded by entering the following URL into a webbrowser in just the same way you do it probably every day:

https://steamproxy.net/steamapi/IPlayerService/GetBadges/v1?key=yourAPIKey&steamid=userSteamID

You have to substitute the text yourAPIKey in this URL with your own Steam API-Key obtained as described in the prerequisites section. Also you have to substitute the text userSteamID with the SteamID of the user whose badges to retrieve. So, in the case of the user 4yBaK* with SteamID 76561198023416824 this URL becomes

https://steamproxy.net/steamapi/IPlayerService/GetBadges/v1?key=yourAPIKey&steamid=76561198023416824

You still have to substitute your API key as yourAPIKey to make it work though.

Entering this URL (with yourAPIKey replaced) should return the badge data of the user in so-called "JSON format". This is a format used by computers to store information as plain text. In our case, it contains all the badges the user has crafted plus additional information about the user like Steam level or total XP. Depending on your webbrowser, the JSON data might be displayed as structured text with elements you can click to expand. There shoud be some sort of button or link in your webbrowser labeled "Raw Data", "Plain Text" or something like that to remove this structure and display the JSON text like it actually is. At the time of this writing, 4yBaK*'s JSON badge data contains data on 18,969 crafted badges It starts with the following text:

badges":[{"badgeid":13,"level":3688,"completion_time":1651907618,"xp":3938,"scarcity":23934},{"badgeid":57,"level":4,"completion_time":1637777742,"xp":0,"scarcity":1322268},{"badgeid":56,"level":4,"completion_time":1637777742,"xp":100,"scarcity":1322268},

It ends with the following text:

"player_xp_needed_to_level_up":2730,"player_xp_needed_current_level":15452800}}

Save the whole text into a text file named "BadgeData.json". Open the file to verify that it actually does contain the full JSON text from start to end. Incomplete JSON text may cause the csv conversion described in the next section to fail.
Convert JSON Badge Data to a CSV File
The JSON data contains all relevant information but is difficult to handle by humans. The next step is therefore to convert it into a csv file which can be edited by using spreadsheet software like Excel. There are many ways of how to accomplish this (just google for them). One way that works is to use this Online Converter [www.convertcsv.com]. Just upload the file "BadgeData.json" you created in the previous section to this website by choosing it as a input file. If necessary, adjust the "Output Field Separator" under "Choose output options" to the field separator used in the regional settings of your computer. Default value for field separators is a comma (which is used in the US). You may want to change it into a different character like a semicolon (which is used in many European countries). Click the "Convert JSON to CSV" button to generate the csv file. Once conversion is finished, results are displayed in the "Result Data" window. They should look something like

badgeid;level;completion_time;xp;scarcity;appid;communityitemid;border_color
13;3688;1651907618;3938;23934;;;
57;4;1637777742;0;1322268;;;
56;4;1637777742;100;1322268;;;
54;1;1624602016;100;579317;;;
50;4;1606689461;100;1505112;;;
49;150;1606507053;1150;19524;;;

Click the "Download Result" button to download these results as a csv file. The file should contain data on all badges (at the time of this writing 18,970 rows which is one row for each of the 18,969 badges plus one row for the headline).
Clean Up the Badge Data
The csv file has a column "appid". This is a unique identifier of the game the badge is from. Some badges have blank values in the field appid because not all badges (like the Community Badge) are related directly to games. You may want to remove the rows of such badges from the file if you are interested in game badges only.

Note that there may be up to two rows (= badges) for every appid (= game) in the csv file. This is because for every game up to two badges can be crafted: a normal badge and a foil badge. Foil badges can be recognized by a value of 1 in the field border_color. For example, for the Dota 2 (= appid 570) badge these rows look like this:

badgeid,level,completion_time,xp,scarcity,appid,communityitemid,border_color
1,5,1399812927,500,987311,570,626263517,0
1,1,1498307759,100,61660,570,4959481171,1

The first row is the normal badge (border_color 0, crafted up to badge level 5) and the second row is the foil badge (border_color=1, crafted up to badge level 1).

The column "completion_time" contains the so-called Unix timestamp of the time the badge was crafted. In this case this counts the number of seconds between the time of crafting from the origin January 1st 1970. Therefore Unix time stamps can be easily converted into dates by dividing by 60 (giving minutes), again by 60 (giving hours) and by 24 (giving days). This gives the number of days passed since the origin. For the time stamp of the normal Dota 2 badge, this results in 1399812927/60/60/24=41,770.54 days passed since Januar 1st, 1970. The day 41,770 day after Januar 1st 1970 is May 11th, 2014. So this is the date the normal Dota 2 badge was crafted. This can be confirmed by looking at the badge page

https://steamproxy.net/id/DoomedAndCursed/gamecards/570

saying that the badge was crafted May 11th, 2014, 2:55 p.m. You may want to add a formula to calculate the crafting day in this way in your spreadsheet. Just divide the unix time stamps by 60,60 and 24 as shown in the example and add them to a cell containing the date January 1st 1970. Formating the cells as date in your spreadsheet software will get the correct dates of crafting displayed.

The column scarcity contains information about the rarity of the badge. Lower values represent rarer badges. You may therefore want to sort the data by increasing values of scarcity to come up with a list having rarest badges on top. Scarcity values are widely believed to be the number of crafted badges in the world. So if you happen to have a scarcity 1 badge, then congrats! You seem to be the only person in the world having it!

After doing these adjustments, save your spreadsheet as an Excel file.

There is one important point to note about scarcity ranks:
Badges (especially foils badges) of games having introduced their trading cards only recently usually appear with very low scarcity values in this ranking indicating a high degree of rarity. Why? Because there simply has not been enough time to craft these badges yet so almost no one owns them. In very many cases, badges like these are not rare at all. When time goes by and trading cards of these games are not actually rare, lots of users will craft the badge. This makes scarcity ranks of such badges increase quickly pushing them down significantly in the rarity ranking. When interpreting results you should therefore check how long cards have been available in the market. This is for example evident from the charts shown on the market pages of the Steam market. It makes a very big difference if cards have been available for just a few days or for many years. Badges with low scarcity ranks whose cards have been available for many years very often actually are rare and have top positions in the rarity ranking for good reason. This is particularly true if badges are from removed games making cards non-marketable. This makes it more difficult to get hold of these cards and therefore has an adverse impact on crafting these badges. In addition, trading cards of removed games tend to die out especially quickly over time as game purchases are disabled and therefore cards can be obtained no longer by playing the game. Crafting new badges will remove many existing non-marketable cards from user inventories but only add few of them back in form of booster packs. Crafting a non-marketable badge therefore always comes with a net loss of trading cards of these games in user inventories. Sooner or later this will cause all cards of removed games available today to be gone from user inventories (at least of those users who care about trading and crafting them). When this point is reached, even the most simple badges of removed games will only be obtainable by crafting cards from booster packs - no matter how many cards of them are available today.
Add Game Names
The JSON badge data only contains appids, not game names. Although appids uniquely define games and therefore the information about games is there, the lack of game names is inconvenient. After all we may want to search for a specific name of a game directly in the spreadsheet and not always have to google appids first.

A good data source for game names is the
inventory page [www.steamcardexchange.net] of the Trading Bot of Steam Card Exchange. It shows the number of trading cards the trading bot has in stock along with game names and number of cards per set.

But where are the appids? They are hidden in the background. Every time the inventory page is loaded in a browser, it loads this information from the following URL:

https://www.steamcardexchange.net/api/request.php?GetInventory

This URL returns information about appids, game names and bot inventory in guess what? Right, in JSON format!

Well, we already know what to do with this from section "Convert JSON Badge List to CSV File", don't we?

Just repeat the steps described there to turn this JSON data into a CSV file. Then add it as an additional sheet to the Badge Data Excel and insert the game names into the badge sheet by using lookup functions like VLOOKUP.

Congratulations!

Your Badge Rarity Spreadsheet is ready!

Have fun searching through it for your own badges and figure out how rare they are compared to others! But keep in mind the rarity bias of new games mentioned in the previous section of this guide.

4 Comments
Nickers 26 Jun @ 11:09am 
Great guide! :steamthumbsup:
This is amazing. Thank you.
MrSteakPotato 5 Oct, 2023 @ 6:11am 
My understanding on scarcity is the number of people who have crafted the badge.

The only issues I've found with this theory is the time it takes for the number to update when a new craft has been made and when looking at scarcity of high level sale badges.
Guts 23 Aug, 2023 @ 6:50pm 
Excellent guide!