Skip to content
API

PAYDAY 2 inventory

PAYDAY 2 inventory API with item values

Use game=payday2 (or payday) to fetch public PAYDAY 2 inventory items. The normalized response is compatible with WOK's other Steam game integrations.

GET /v1/inventory?game=payday2Bearer authentication

Updated

curlWOK API
curl --fail-with-body \
  -H "Authorization: Bearer $WOK_API_KEY" \
  "https://woksteamapi.com/v1/inventory?steam_id=76561198090744629&game=payday2&top=10"
game=payday2payday alias also accepted
Groupeditem names and counts
USD valuesmatched Steam prices
Explicitmissing prices are visible

Value grouped PAYDAY 2 items without mixing up quantities

PAYDAY 2 uses Steam AppID 218620, context 2. game=payday is a request alias for game=payday2; WOK uses payday2 in the normalized response.

Start with the inventory quickstart and set top=0 if you need all grouped rows. Check status before trusting total; items_total counts instances even when a smaller top list is returned.

For status=ok, read items[].count, tradable and marketable. A row's USD estimate is its usable unit price multiplied by owned count, never by catalog volume. Keep unpriced visible when no saved quote matches.

Set MARKET_HASH_NAME from an actual items[].markethashname and use the canonical game=payday2 quote below. Check source and updated_at; a quote may be old, and a 404 means no saved catalog match for that exact name.

Quote a grouped PAYDAY 2 itemWOK API
curl --fail-with-body \
  -H "Authorization: Bearer $WOK_API_KEY" \
  --get "https://woksteamapi.com/v1/price" \
  --data-urlencode "game=payday2" \
  --data-urlencode "name=$MARKET_HASH_NAME"

This separate catalog read does not rescan the player's inventory. If item ownership matters, use the inventory result's meta.cache_age to decide when a new public Steam read is required.

Normalized inventory fieldsExact quote behaviorPAYDAY 2 response fields

Quickstart

Use WOK from a trusted server. Keep the API key outside browser bundles and public repositories.

curlWOK API
curl --fail-with-body \
  -H "Authorization: Bearer $WOK_API_KEY" \
  "https://woksteamapi.com/v1/inventory?steam_id=76561198090744629&game=payday2&top=10"
JavaScript (Node.js)WOK API
// Node.js: keep the API key on your server.
const url = new URL("https://woksteamapi.com/v1/inventory");
url.search = new URLSearchParams({
  steam_id: "76561198090744629",
  game: "payday2",
  top: "10"
});
const response = await fetch(url, {
  headers: { Authorization: `Bearer ${process.env.WOK_API_KEY}` }
});
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
const inventory = await response.json();
PythonWOK API
import os
import requests

response = requests.get(
    "https://woksteamapi.com/v1/inventory",
    headers={"Authorization": f"Bearer {os.environ['WOK_API_KEY']}"},
    params={
        "steam_id": "76561198090744629",
        "game": "payday2",
        "top": 10,
    },
    timeout=30,
)
response.raise_for_status()
inventory = response.json()

Response example

The values below illustrate the response shape. Field names and types match the public contract. The market name illustrates a real Steam listing, but the sample price, timestamp, count and totals are fictional. Copy items[].markethashname from the actual inventory before requesting a quote.

JSON

application/json
{
  "steamid": "76561198090744629",
  "game": "payday2",
  "status": "ok",
  "total": 24.68,
  "items_total": 2,
  "sellable": 2,
  "untradable": 0,
  "untradable_value": 0.0,
  "tradelocked": 0,
  "tradelocked_value": 0.0,
  "unpriced": 0,
  "items": [
    {
      "markethashname": "Skull Armor",
      "count": 2,
      "game": "payday2",
      "tradable": 1,
      "marketable": 1,
      "pricemedian": 12.34,
      "prices": {
        "steam_market": 12.34
      },
      "pricesource": "steam_market",
      "priceupdatedat": 1787572800.0
    }
  ],
  "meta": {
    "cached": true,
    "shared": false,
    "lane": "cache",
    "saved": false,
    "ms": 0,
    "bytes": 0,
    "paid_bytes": 0,
    "upstream_attempts": 0,
    "detail": "",
    "cache_age": 42,
    "cache_ttl": 1800,
    "price_source": "steam"
  }
}

Response schema

Stable fields for typed clients, storage and error handling.

PAYDAY 2 inventory API with item values response schema
FieldTypeMeaning
steamidstringCanonical 17-digit SteamID64.
gamestringDocumented key: cs2, rust, tf2, dota2, pubg, sandbox, unturned or payday2. Numeric Steam appids are also accepted and returned as app<appid> without catalog pricing.
statusstringok, empty, private, notfound, limited or error.
totalnumberPriced sellable inventory total in USD.
items_totalintegerNumber of item instances before top truncation.
sellableintegerTradable and marketable item instances, including unpriced ones; total sums matched values.
untradableintegerItem instances excluded from sellable value.
untradable_valuenumberValue of excluded untradable items in USD.
tradelockedintegerItem instances currently trade locked.
tradelocked_valuenumberValue of trade-locked items in USD.
unpricedintegerInstances without a usable price.
items[]arrayItems with market names, count, trade state, prices and optional inspect links.
items[].markethashnamestringCanonical price-catalog market hash name.
items[].marketnamestringSteam market display name when supplied.
items[].typestringSteam-supplied item type text; not a WOK-normalized category.
items[].countintegerGrouped item instance count.
items[].tradableintegerSteam tradability flag, 0 or 1.
items[].marketableintegerSteam marketability flag, 0 or 1.
items[].tradelockedbooleanWhether the grouped item is trade locked.
items[].tradelockuntilnumber|nullUnix expiry when a trade lock is known.
items[].pricemediannumber|nullSelected source median price in USD.
items[].pricesourcestringSelected catalog source; empty when the item is unpriced.
items[].priceupdatedatnumber|nullSelected source observation time, separate from inventory cache age.
items[].pricesobjectPer-source USD prices.
items[].inspect_linksarrayOptional CS2 inspect actions.
metaobjectCache age/TTL, cached/shared flags, timing, bytes, lane and upstream-attempt metadata.
meta.cachedbooleanWhether the inventory snapshot was reused.
meta.sharedbooleanWhether this request joined an in-flight singleflight fetch.
meta.cache_ageintegerSnapshot age in seconds.
meta.cache_ttlintegerApplied freshness window in seconds.

Limits and error behavior

Rules clients should handle explicitly in production.

The Steam inventory must be public. Private, missing and empty inventories are distinct statuses, not successful empty data.

top accepts 0 through 100. top=0 returns every item row; items_total still describes the complete inventory when a top limit is used.

Prices are USD. An item can be valid while pricemedian is null; use unpriced instead of treating missing prices as zero-value evidence.

A partial or malformed Steam inventory is not saved as a successful snapshot. On GET /v1/inventory, validation/auth failures use HTTP 400/401/402/404/422/429; Steam outcomes private, notfound, limited and error are returned with HTTP 200 in response.status. The compatibility GET /steam/api/inventory maps them to 403/404/429/502 (empty to 410).

WOK stores bounded Steam Market listing observations and saved sale medians where available. Check the selected pricesource and priceupdatedat; low-liquidity items can remain unpriced.

Cache and freshness semantics

How to tell whether data was reused, shared or refreshed.

Successful inventory snapshots use a 1,800-second default TTL. Negative defaults are 21,600 seconds for empty, 3,600 seconds for private and 600 seconds for not found.

For authenticated inventory responses that reach validation/result handling, read X-Wok-Cache-Age and X-Wok-Cache-TTL when present; authentication and quota errors may omit them.

Identical concurrent misses are coalesced. A waiter receives X-Wok-Singleflight: 1 and does not start another Steam inventory fetch.

Use refresh_prices=1 or POST /v1/inventory/refresh-prices only with an active compatible OK/EMPTY snapshot. Repricing never fetches Steam or resets inventory age/TTL; 404 inventory_cache_miss means run a normal inventory scan. refresh_prices=1 cannot be combined with no_cache=1; prices_updated_at identifies the repricing operation.

Frequently asked questions

Direct answers about access, freshness and result semantics.

Which game value selects PAYDAY 2?

Use game=payday2 or the compatibility alias game=payday with GET /v1/inventory.

Where do PAYDAY 2 prices come from?

WOK stores bounded Steam Community Market listing observations and sale medians where available. Automatic selection may choose a saved sale median before steam_market; inspect pricesource and priceupdatedat for each item.