STEAM GROUP
Steam Trading Cards Group STCards
STEAM GROUP
Steam Trading Cards Group STCards
51,761
IN-GAME
325,604
ONLINE
Founded
May 15, 2013
Avenol Jul 24, 2013 @ 6:51am
Trading Card API
Currently I cannot find a way other than going through back packs or literally typing out each cards name to get a list of cards. We need an API hook that returns a list of Cards currently on the market so developers can start making Apps and Sites that allow users to better manage and find cards they wish to buy.

I've tried to do this manually but new cards are constantly coming on the market and it's nearly a full time job just to keep track of them all.
< >
Showing 1-6 of 6 comments
wtfrank Jan 1, 2016 @ 3:27am 
did you ever get a solution to this?
Avenol Jan 9, 2016 @ 4:11pm 
Sadly there is no official Market/Card API.

However, I did have some thoughts on how to do this when I first posted this. I know how to get the information, I just want to get it without having to scrape html to do it.

If your actually wanting to code something like a scraper you could just perform GET requests to sites that are already up and running that have this information. I wouldn't hammer the site too much. I would just do an initial GET request parse it to strip out the participating Game Titles and stuff them into a DB or some kind of persistent object. Every week/month or so you could hit the site again and check to see if there are any different Game titles by comparing it to your previously stored Titles.

Once you have the game titles your golden because then you can move on to hitting Steam servers instead of harassing an other developers website. For instance you have the game title 'Garry's Mod' you could do something like :

var tradingCardTitle = "Garry's Mod Trading Card";
var url = "http://steamcommunity.com/market/search?q=" + tradingCardTitle;


Your going to want to encode the url so your result should look more like this
http://steamcommunity.com/market/search?q=Garry%27s%20Mod%20Trading%20Card

From the market site you can scrape each individual card and grabs its Name, Url, ItemId, etc... Often the lists are paged so your scraper will have to account for that. So you could take these results and then save them under "Garry's Mod" in a JSON object, string or whatever. I would work out a nice DB schema but that's my personal preference.

So yea fun stuff. And remember Steam will limit the amount of requests you can make so you might want to look up that threshold and plan accordingly.


Another route would be to scrape the json from public backpacks by copying Steams Web API. So a generic GET request url would look like this: http://steamcommunity.com/id/frankster/inventory/json/440

(Where 440 is the app ID for TF2). You will have to add more to the url if your looking for specific Items. Currently I don't know the values off the top of my head. It's honestly a pain but if your interested you can find more info at https://wiki.teamfortress.com/wiki/WebAPI. So even if you do write some code to use steams web API you would still need to parse the JSON and store it in some logical manner.

Yep and this is why I asked for an API route, because this is totally not the way you should be coding. Anyways Good luck! =D
YaneonY Aug 19, 2019 @ 5:17pm 
I know, this topic is old, but it might be helpful for everyone on trading. On my profile you can find an API which provide different endpoints, for example items and prices (listings also too). You might get that data in few requests (1req per endpoint) and build your own structure for your bot.
YaneonY Feb 10, 2020 @ 7:20am 
So, api has also now free tier (10 req/24hrs) and here is an example to to get card sets.
https://github.com/yaneony/hexaone-npm/blob/master/examples/card-sets.js
It can be extended to what ever you want.
Jorn Jul 12, 2020 @ 3:11am 
You got my hopes up for a while there, but the GitHub link gives a 404.
YaneonY Jul 15, 2020 @ 2:31pm 
Originally posted by Jorn:
You got my hopes up for a while there, but the GitHub link gives a 404.

Sorry, here is a new link. https://github.com/yaneony/hexaone-npm/blob/master/examples/cardsets.js

You might also check all exemples here. https://github.com/yaneony/hexaone-npm/tree/master/examples

Have fun!
< >
Showing 1-6 of 6 comments
Per page: 1530 50

Date Posted: Jul 24, 2013 @ 6:51am
Posts: 6