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.
I could not find any documentation, but I use:
http://steamcommunity.com/market/priceoverview/?appid=730¤cy=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.
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
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).
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.
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