0

I tried to find the price of the items in the steam community market through the steam website by selecting View Page Info (Google Chrome) to locate the JSON page but with no luck.

NOTE I am trying to understand how to get the URL of the JSON page of the items in the steam community market and not to scrap the JSON page.

I have searched through StackOverflow and they seem to be able to get this URL with the JSON which I am unable to find.

//way number 1
http://steamcommunity.com/market/priceoverview/?currency=3&appid=730&market_hash_name=StatTrak%E2%84%A2%20P250%20%7C%20Steel%20Disruption%20%28Factory%20New%29

 // way number 2
 http://steamcommunity.com/market/pricehistory/?country=DE&currency=3&appid=440&market_hash_name=Specialized%20Killstreak%20Brass%20Beast
Wraithseeker
  • 1,884
  • 2
  • 19
  • 34
  • Like I mentioned in my post, what I don't understand is how did they get the link http://steamcommunity.com/market/priceoverview/?currency=3&appid=730&market_hash_name=StatTrak%E2%84%A2%20P250%20%7C%20Steel%20Disruption%20%28Factory%20New%29 My question is not on how to retrieve data from the JSON file but instead on how to reach the URL of the JSON file. – Wraithseeker Apr 27 '15 at 17:37
  • If you are trying to find urls you will want to look at the network calls that your browser makes when viewing items. If you are unable to find these urls in the calls then you will have to do some further searching which usually requires a bit of knowledge around HTML and JS. Now if you were to look through the js files of steamcommunity.com at this time you would find the urls like http://steamcommunity.com/market/pricehistory/. Please note that they could pull the data via PHP which would not be visible to you in most cases. – Uberswe Jun 17 '15 at 00:51

1 Answers1

3

You can use the priceoverview endpoint, just make sure you find the correct appid and market_hash_name.

You can easily locate needed values for these parameters by navigating to any Steam Market item listing.

Steam Market Item Listing

For example, on this screenshot the appid is equal to 730 and the market_hash_name is AK-47%20%7C%20Redline%20%28Field-Tested%29.

The final parameter for request is currency, you can use the value of 1 for USD.

Finally, the request URL will look like this: http://steamcommunity.com/market/priceoverview/?appid=730&market_hash_name=AK-47%20%7C%20Redline%20%28Field-Tested%29&currency=1

And querying it will yield the following JSON response:

{
    "success":true,
    "lowest_price":"$7.90",
    "volume":"1,113",
    "median_price":"$7.77"
}
blackgreen
  • 34,072
  • 23
  • 111
  • 129
Tyrrrz
  • 2,492
  • 1
  • 19
  • 29