Results 1 to 2 of 2
  1. #1
    JustWorkHereLUL's Avatar
    Join Date
    Nov 2017
    Gender
    male
    Posts
    180
    Reputation
    10
    Thanks
    2
    My Mood
    Angry

    Question Fetching steam inventory

    Hello. I need to fetch steam account inventories at a fast pace, so the normal endpoint is out of question due to high rate limits (I don't want to use proxies either). I'm looking to get the csgo inventory specificly.

    Normal endpoint:
    https://steamcommunity.com/inventory/<STEAMID>/<APPID>/2?l=english&count=5000

    I have tried to use protobufs (cs uses protobufs to fetch inventory for the client) but passing in a different steamid still returned the inventory of the account I logged in with. It could be possible that I messed up with something since I'm new to protobufs and the library I was using. I also think I could get the inventory with this:

    https://partner.steamgames.com/doc/a...ry#GetAllItems

    but I think this requires a publisher key which costs money. Any ideas?

  2. #2
    RustyS's Avatar
    Join Date
    Jan 2021
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    You can use the steam API to achieve what you are wanting, depending on how you want to do it.

    Here is the code to do it in C# assuming you know how to use it,

    Code:
    using System.Net;
    using System.IO;
    
    public class Form1
    {
        private void button1_Click(object sender, EventArgs e)
        {
            string steamId = "1234567890";
            string apiKey = "YOUR_API_KEY";
            string url = "https://api.steampowered.com/IEconItems_730/GetPlayerItems/v0001/?key=" + apiKey + "&steamid=" + steamId;
            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
            HttpWebResponse response = (HttpWebResponse)request.GetResponse();
            string responseString = new StreamReader(response.GetResponseStream()).ReadToEnd();
            Console.WriteLine(responseString);
        }
    }
    Obviously you need your own API key from steam.

    I also used CS:GO as the appid (730)

    If using PHP you can achieve the same with the following code

    Code:
    <?php
        $steamId = "1234567890";
        $apiKey = "YOUR_API_KEY";
        $url = "https://api.steampowered.com/IEconItems_730/GetPlayerItems/v0001/?key=" . $apiKey . "&steamid=" . $steamId;
    
        $curl = curl_init();
        curl_setopt_array($curl, array(
            CURLOPT_RETURNTRANSFER => 1,
            CURLOPT_URL => $url,
        ));
        $response = curl_exec($curl);
        curl_close($curl);
        echo $response;
    ?>
    Remember that in PHP you need to have cURL extension enabled in your server, if you have any trouble check with your hosting provider.
    Last edited by RustyS; 01-28-2023 at 05:05 AM.

Similar Threads

  1. [WTS] Clearing out my steam inventory, first come first serve.
    By ooglio in forum Selling Accounts/Keys/Items
    Replies: 5
    Last Post: 04-05-2013, 02:50 PM
  2. [WTT] WTS OR TRADE STEAM INVENTORY GAMES FOR TF2 STUFF OR REAL MONEY
    By biggeoff in forum Selling Accounts/Keys/Items
    Replies: 3
    Last Post: 03-06-2013, 11:50 AM
  3. [WTT] Trading Steam inventory for ARMA2 key
    By Occidi de Pax in forum DayZ Selling / Trading / Buying
    Replies: 10
    Last Post: 12-21-2012, 10:49 PM
  4. Steam Inventory Items (For Individual Games)
    By jassman62 in forum Selling Accounts/Keys/Items
    Replies: 0
    Last Post: 09-27-2012, 07:02 PM
  5. Steam Inventory
    By Nyan in forum Trade Accounts/Keys/Items
    Replies: 4
    Last Post: 12-27-2011, 07:54 PM