9

Alright, so I have been looking for this all over the internet, and what I have found out is that when you want to get someones steam inventory you use this:

http://api.steampowered.com/IEconItems_{appid}/GetPlayerItems/v0001/?key={apikey}&steamid={steamid}&format=json

But the problem is that when I do that for CS:GO (appid: 730), I just get an empty response back, even though the user has items in their inventory.

fin444
  • 725
  • 2
  • 14
  • 27
Mathias_
  • 323
  • 1
  • 4
  • 14

1 Answers1

16

if you want to get the json just use one of the following links:

general steam inventory: ( 1: games, 3: coupons, 6: trading cards, 7: rewards )

http://steamcommunity.com/id/<USERURL>/inventory/json/753/1
http://steamcommunity.com/profiles/<STEAMID>/inventory/json/753/1

http://steamcommunity.com/id/<USERURL>/inventory/json/753/3
http://steamcommunity.com/profiles/<STEAMID>/inventory/json/753/3

http://steamcommunity.com/id/<USERURL>/inventory/json/753/6
http://steamcommunity.com/profiles/<STEAMID>/inventory/json/753/6

http://steamcommunity.com/id/<USERURL>/inventory/json/753/7
http://steamcommunity.com/profiles/<STEAMID>/inventory/json/753/7

games :

http://steamcommunity.com/id/<USERURL>/inventory/json/<APPID>/2
http://steamcommunity.com/profiles/<STEAMID>/inventory/json/<APPID>/2

the problem was not the counter-strike appid, you just used an old link that only works for the general steam inventory. I suggest you using the link using STEAMID because not every steamuser has set a customurl.

Michael 'kC' J.
  • 302
  • 3
  • 14
  • does it block after the call limit of 20 per minute? – Jay Sep 06 '16 at 16:53
  • So if i have a traffic of over 10000 per second on my website, I am basically screwed? – Jay Sep 23 '16 at 11:25
  • 2
    if youre website does this many calls you are screwed anyway... you should strongly consider your concept and think about caching if possible – Michael 'kC' J. Sep 23 '16 at 12:32
  • Do we have any third party plugin Shiv can do this? I think Bitskins have this kind of functionality in which you can choose whether to display your inventory from steam or from cache. I wonder how did they do that... – Jay Sep 24 '16 at 02:35
  • 1
    yes but the one most websites use costs some money... http://csgo.steamlytics.xyz/api see they have different plans for different website "sizes" - there might be different ones but most websites use this one afaik – Michael 'kC' J. Sep 25 '16 at 10:42