How can I scrape Steam Market history?

2.1k views Asked by At

I was wondering if someone could give me a few hint on how to scrape efficiently steam market's history? I know there is an API but I can't seem to find a way to extract all the SM history of an item. For exemple, for any item, i'd like to be able to extract things such as ' numbers of items ' sold on the 12th of December 2018 and their average price.

if you take a look at :

https://steamcommunity.com/market/listings/730/G3SG1%20%7C%20Green%20Apple%20(Factory%20New)

I'd like to scrape all the values from the graph.

I'd love to get some pointers, on how to start etc, especially regarding efficiency of the process. There is a lot a data to be scraped (not the whole market ofc but still). I'd really appreciate the input of someone who's used to that.

Thanks a lot

edit :

this request supposedly gives the market history of an item but I can't seem to be getting anything. Anyone else experienced that? (some simpler requests such as priceoverview work just fine though)

https://steamcommunity.com/market/pricehistory/?country=US&currency=1&appid=730&market_hash_name=Glove%20Case%20Key

1

There are 1 answers

0
m0r On BEST ANSWER

So basically you can use this request to get the data needed :

"https://steamcommunity.com/market/pricehistory/?appid=[gameID]&market_hash_name=[HTTP_ITEM_NAME]"

with gameID being 730 for CSGO for example and HTTP_ITEM_NAME : the item name converted to http

ex : ★%20StatTrak™%20Shadow%20Daggers%20%7C%20Stained%20%28Field-Tested%29

full request :

https://steamcommunity.com/market/pricehistory/?appid=730&market_hash_name=%E2%98%85%20StatTrak%E2%84%A2%20Shadow%20Daggers%20%7C%20Stained%20%28Field-Tested%29