Steam

Inventory

Fetch a Steam user's inventory for a given app and context, returning assets alongside the descriptions that resolve each asset's visual and market metadata.

Endpoint

This endpoint returns a user's Steam inventory for a specific app and context. The response mirrors Steam's own inventory shape: an assets array listing the items owned and a descriptions array that resolves each asset's visual and market metadata by classid + instanceid.

GET   /v2/steam/users/{steamid}/inventory/{appId}/{contextId}

Required parameters

steamid
string
The Steam ID of the user whose inventory you want to fetch. Accepts various Steam ID formats.
appId
number
The Steam application ID of the game whose inventory you want to fetch (e.g. 730 for Counter-Strike 2).
contextId
number
The context ID within the app's inventory. For most games the context ID is 2.

Authentication

Include your API key as the x-api-key request header.

x-api-key: YourSecretAPIKey

Response fields

FieldTypeDescription
assetsarrayThe items owned by the user. Each asset references a description via classid + instanceid.
descriptionsarrayMetadata describing each unique item class/instance referenced by assets. Multiple assets typically share a single description.

Asset object

FieldTypeDescription
appidnumberApplication ID the asset belongs to.
contextidstringContext ID the asset lives in.
assetidstringUnique ID of this specific asset in the user's inventory.
classidstringClass ID used to look up the asset's description.
instanceidstringInstance ID used (together with classid) to look up the asset's description.
amountstringQuantity of this asset. Almost always "1" outside of stackable items.

Description object

FieldTypeDescription
appidnumberApplication ID.
classidstringClass ID — matches assets[].classid.
instanceidstringInstance ID — matches assets[].instanceid.
currencynumber1 if the item is an in-game currency, 0 otherwise.
background_colorstringHex color used behind the item's icon in Steam's UI.
icon_urlstringRelative path to the item icon on Steam's CDN.
icon_url_largestringRelative path to the large item icon on Steam's CDN (not always present).
descriptionsarrayRich-text description lines (weapon blurb, contents for cases, attributes, etc.).
tradablenumber1 if the item can be traded, 0 otherwise.
marketablenumber1 if the item can be sold on the Steam Community Market, 0 otherwise.
commoditynumber1 if the item is a commodity (fungible), 0 otherwise.
market_tradable_restrictionnumberDays remaining until the item becomes tradable.
market_marketable_restrictionnumberDays remaining until the item becomes marketable.
namestringItem display name.
name_colorstringHex color used for the item name in Steam's UI (reflects rarity).
typestringItem type classification (e.g. "Base Grade Container", "Mil-Spec Grade SMG").
market_namestringMarket display name.
market_hash_namestringURL-safe market name, used to query market endpoints.
actionsarrayIn-game actions such as inspect links. Not always present.
market_actionsarrayMarket-scoped actions such as inspect links from the market page. Not always present.
tagsarrayClassification tags (type, weapon, rarity, exterior, collection, etc.).
sealednumber1 if the container is sealed, 0 otherwise.
sealed_typenumberInternal sealed-container type.
market_bucket_group_namestringMarket bucket grouping name (used by Steam to group variants).
market_bucket_group_idstringMarket bucket grouping ID.

Icon URLs are relative. To render them, prepend the Steam CDN base:

https://community.cloudflare.steamstatic.com/economy/image/{icon_url}

Response example

For brevity the assets and descriptions arrays are truncated — a real response contains one asset per item in the inventory and one description per unique classid + instanceid pair.

response.json
{
  "success": true,
  "result": {
    "assets": [
      {
        "appid": 730,
        "contextid": "2",
        "assetid": "50813022021",
        "classid": "5710094579",
        "instanceid": "8336926543",
        "amount": "1"
      }
    ],
    "descriptions": [
      {
        "appid": 730,
        "classid": "5710094579",
        "instanceid": "8336926543",
        "currency": 0,
        "background_color": "393b3e",
        "icon_url": "i0CoZ81Ui0m-9KwlBY1L_18myuGuq1wfhWSaZgMttyVfPaERSR0Wqmu7LAocGJKz2lu_XsnXwtmkJjSU91dh8bj35VTqVBP4io_frnEVvqf_a6VoIfGSXz7Hlbwg57QwSS_mxhl15jiGyN37c3_GZw91W8BwRflK7EfKsa2sfw",
        "tradable": 1,
        "name": "Kilowatt Case",
        "name_color": "b0c3d9",
        "type": "Base Grade Container",
        "market_name": "Kilowatt Case",
        "market_hash_name": "Kilowatt Case",
        "commodity": 1,
        "market_tradable_restriction": 7,
        "market_marketable_restriction": 7,
        "marketable": 1,
        "tags": [
          { "category": "Type", "internal_name": "CSGO_Type_WeaponCase", "localized_category_name": "Type", "localized_tag_name": "Container" },
          { "category": "Rarity", "internal_name": "Rarity_Common", "localized_category_name": "Quality", "localized_tag_name": "Base Grade", "color": "b0c3d9" }
        ],
        "sealed": 0,
        "sealed_type": 0,
        "market_bucket_group_name": "Kilowatt Case",
        "market_bucket_group_id": "G18A8263004"
      }
    ]
  }
}