Steam Market API?

北慕城南 提交于 2019-12-03 03:21:34

问题


I know that there's a Steam API allowing me to use data from Steam Community.
My question is, does anyone know if there's a Steam Market API?
For example, I want to get the current price of an item in the Steam Market.

I've googled and haven't found anything yet.
I'd be glad to have your help.


回答1:


I could not find any documentation, but I use:

http://steamcommunity.com/market/priceoverview/?appid=730&currency=3&market_hash_name=StatTrak%E2%84%A2 M4A1-S | Hyper Beast (Minimal Wear)

to return a JSON. At time of writing, it returns:

{"success":true,"lowest_price":"261,35€ ","volume":"11","median_price":"269,52€ "}

You can change the currency. 1 is USD, 3 is euro but there are probably others.




回答2:


A better search api that can give you all the results for a game, example using pubg which only has 272 items, if your game has more try changing the count parameter at the end

https://steamcommunity.com/market/search/render/?search_descriptions=0&sort_column=default&sort_dir=desc&appid=578080&norender=1&count=500



回答3:


To add to what the other people have said, the temporary ban on the JSON site happens if you try and request 20 items within a minute's time from the server. If you're creating a script to request those links, add a three second delay between each script. Also, the ban only lasts for the remaining server-side minute (which may not be 60 seconds).




回答4:


There is not such API for now. But this link may help you: Get the price of an item on Steam Community Market with PHP and Regex It's basically what you want with pure php DOM parsing instead of an API. The main drawback is that you may have to change your code if Steam update their html markup.




回答5:


You can use SteamApis.com to acquire Steam market prices and item information. The data is returned in JSON. The service is not free but also not that expensive.

The documentation is available to view here. It has detailed information on what endpoints are available and what data is returned.



来源:https://stackoverflow.com/questions/26170185/steam-market-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!