Retrieves Steam inventory data for a user from steamcommunity.com
Retrieve and browse a Steam user's inventory from steamcommunity.com.
Find your Steam ID (SteamID64):
https://steamcommunity.com/profiles/76561198012345678, your Steam ID is 76561198012345678https://steamcommunity.com/id/myname, visit steamid.io and paste your profile URL to get your SteamID64Get your Steam session cookies (required to bypass rate limits when fetching your own inventory):
https://steamcommunity.comsteamLoginSecure cookieSet environment variables:
export STEAM_ID="your-steamid64"
export STEAM_COOKIES="steamLoginSecure=your-cookie-value"
All commands use curl to hit the Steam Community inventory endpoint. The context ID is 2 for all standard game inventories.
| Game | App ID |
|---|---|
| CS2 / CS:GO | 730 |
| Team Fortress 2 | 440 |
| Dota 2 | 570 |
| Rust | 252490 |
| PUBG | 578080 |
| Steam Community (trading cards, etc.) | 753 |
Replace $APP_ID with the game's App ID (see table above). Context ID is 2 for all standard game inventories.
curl -s "https://steamcommunity.com/inventory/$STEAM_ID/$APP_ID/2?l=english&count=2000" \
-H "Cookie: $STEAM_COOKIES" | jq '.'
curl -s "https://steamcommunity.com/inventory/$STEAM_ID/730/2?l=english&count=2000" \
-H "Cookie: $STEAM_COOKIES" | jq '.'
curl -s "https://steamcommunity.com/inventory/$STEAM_ID/730/2?l=english&count=2000" \
-H "Cookie: $STEAM_COOKIES" | jq '[.descriptions[] | {market_hash_name, type}]'
curl -s "https://steamcommunity.com/inventory/$STEAM_ID/730/2?l=english&count=2000" \
-H "Cookie: $STEAM_COOKIES" | jq '{assets: [.assets[] | {assetid, classid, instanceid, amount}], total: .total_inventory_count}'
The API returns a last_assetid field when there are more items. Pass it as start_assetid to get the next page:
curl -s "https://steamcommunity.com/inventory/$STEAM_ID/730/2?l=english&count=2000&start_assetid=$LAST_ASSET_ID" \
-H "Cookie: $STEAM_COOKIES" | jq '.'
Check for more pages by looking at the more_items field in the response (equals 1 if there are more).
The inventory endpoint returns JSON with these key fields:
| Field | Description |
|---|---|
assets | Array of items with appid, contextid, assetid, classid, instanceid, amount |
descriptions | Array of item metadata: market_hash_name, name, type, icon_url, tradable, marketable, tags, etc. |
total_inventory_count | Total number of items in the inventory |
more_items | 1 if more pages available (absent otherwise) |
last_assetid | Last asset ID returned; use as start_assetid for next page |
success | 1 if the request succeeded |
Assets are linked to descriptions via classid + instanceid.
2 for all standard game inventories. Steam Community items (appid 753) also use context ID 6 for some item types.