Get a key

Inventory API

Download .md

GET /api/inventory-lookup returns the CS2 items in a public Steam inventory. Results are cached for 5 minutes and then discarded.

Request

http
GET /api/inventory-lookup?steamid=76561197960287930&key=cs2pk_your_key_here
ParamType / boundsNotes
steamid≤200 characters, no whitespace or quote characters A SteamID64, a vanity profile name or a full profile URL.
key/^[a-z0-9_-]{4,64}$/i Your publishable key. A request without one is refused; see Error codes.

Response

200 OK
{
  "steamid": "76561197960287930",
  "count": 214,
  "items": [ /* … */ ],
  "cached": true,
  "ageMs": 42130
}

cached says whether the answer came from the 5-minute per-account cache, and ageMs says how old it is.

Caching and rate limits

A lookup of the same steamid within 5 minutes is served from our cache. Each IP may make 5 lookups a minute that miss the cache, so reloading a cached inventory stays under the limit. When we are busy a lookup gets a 429, and when Steam rate-limits us it gets a 503. Try again after a minute.

Errors

StatusBodyCause
400 { error: "Enter a SteamID, a profile name, or a link to your profile." } Missing, empty, too long, or contains whitespace or quote characters.
403 { error: "That inventory is private. …" } The account's inventory is private, or Steam does not make it available.
404 { error: "Couldn't find a Steam profile for \"…\"." } The SteamID, vanity name or URL did not resolve to an account.
429 { error: "Busy right now …" }, Retry-After: 15 We are busy with other lookups. Try again after the Retry-After.
429 { error: "That is a lot of lookups …" }, Retry-After: 60 Your IP exceeded 5 cache misses in the last 60 seconds.
503 { error: "Steam is rate-limiting us right now. …" } Steam refused this lookup with a 429.
502 { error: "The lookup did not finish. Try again in a minute." } Any other failure fetching from Steam, including a fetch that took longer than 60 seconds.

Access refusals (bad key, wrong origin, no plan, over quota) use the same JSON error shape at 401, 402, 403 or 429, and are checked before any of the above. See Error codes.

Every error body carries a requestId, repeated in the x-request-id response header. Quote it when you contact us about a failure. See Request IDs.