Jump to content


Photo
Question

Best way to call steam API for Inventory

steam API

  • Please log in to reply
4 replies to this topic

#1 Lonster_Monster

Lonster_Monster

    Member

  • Member
  • PipPip
  • 25 posts

Posted 01 September 2018 - 08:10 PM

What is the Best way to call steam api for steam items i have been using

$id = "76561198147982809";
$query = "http://steamcommunity.com/profiles/".$id."/inventory/json/440/2/";;
$json = file_get_contents($query);
$data = json_decode($json, true);

to get my bots inventory of course has 0 tradable items and get the failed error alot

failed to open stream: HTTP request failed! HTTP/1.0 429 Too Many Requests

is calling the

http://steamcommunity.com/profiles/[steamid]/inventory/json/440/2/

the best way i am creating a website like scrap.tf for my steam bots to buy and sell items

if there is a better way Please let me know i know some about the steam API but not the most about it and not sure which would be best if i use that

and also if i upload my site onto my host will it do the errors alot or just when client calls the json i used?


Edited by Lonster_Monster, 01 September 2018 - 08:12 PM.


#2 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,815 posts

Posted 02 September 2018 - 10:34 PM

Everything is going to be rate-limited, but the least rate-limited endpoint is:

https://steamcommunity.com/inventory/[steamid]/440/2


#3 Lonster_Monster

Lonster_Monster

    Member

  • Member
  • PipPip
  • 25 posts

Posted 03 September 2018 - 05:19 PM

ok thanks i just wanted to make sure if that was correct on the link thanks alot



#4 Enemtia

Enemtia

    Member

  • Member
  • PipPip
  • 12 posts

Posted 10 October 2018 - 05:27 AM

Hi!

 

I use for this api:

 

 

 

https://steamcommunity.com/inventory/[steamid]/440/2

 

I have 992 items and it only shows a few item.

 

 

"more_items":1,"last_assetid":"7213560531","total_inventory_count":992,"success":1,"rwgrsn":-2

 

How to show all items?



#5 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,815 posts

Posted 10 October 2018 - 05:36 PM

Use a ?count=x parameter to specify how many items you want it to return. I think the limit might be 2000. If you still get more_items: 1 in the response then you need to make another request with a parameter in the URL start_assetid=<last_assetid>.







Also tagged with one or more of these keywords: Question, steam, API

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users