Problem reading Steam inventory in json format

When opening a link like: http://steamcommunity.com/profiles/steamID/inventory/json/570/2, steam, as I understand it, returns the entire inventory of a particular game in json format. But when you try to read the entire page with the file_get_contents function, the site either hangs, or writes that the page volume is too large. How can I limit inventory withdrawal?

I saw a post on this topic, where they advised to add a GET request of the form to the end ?l=english&count=5000, but these parameters are simply ignored. Please help anyone who understands.

Author: Rebellion, 2017-11-14

1 answers

You have an outdated link...
The endpoint is like this:

//steamcommunity.com/inventory/PROFILEID/570/2?count=1000

The count parameter determines the sample size...
To get the next batch, add the start_assetid parameter with the value of the last asset_id of the previous sample.

 0
Author: vp_arth, 2017-11-15 15:10:36