Home/PriceDB API

PriceDB API

Price history, item lookups, graphs, and bot-compatible endpoints for TF2 items.

General Information

Base URL:https://pricedb.io

REST API for TF2 item price history and market data. Pulls pricing from multiple community sources including Backpack.tf and the Steam Community Market.

Rate Limiting:Rate limits on/api/endpoints are enforced dynamically per IP.

Authentication:No authentication required for read endpoints. Bot endpoints require no key but are intended for TF2Autobot integrations. Abuse may result in IP blocking.

Error Codes:

  • 400— Invalid input or malformed request
  • 404— Item or SKU not found
  • 429— Rate limit exceeded
  • 500— Internal server error

WebSocket:Real-time price updates are broadcast over Socket.IO atws://ws.pricedb.io/. Subscribe to thepriceevent to receive live updates as{ sku, name, buy, sell, source, time }.

Health

GET/api/Health check

Returns the status of the API and database connectivity.

Response

API is healthy

GET/api/cache-statsCache statistics

Returns internal cache statistics (hit rate, size, evictions). Useful for monitoring API performance.

Response

Cache and database statistics

{
  "cache": {
    "size": 42,
    "maxSize": 1000,
    "activeTimers": 15
  },
  "database": {
    "totalPrices": 150000,
    "uniqueItems": 5000,
    "latestUpdate": 1748874425
  }
}

Items

GET/api/itemsList all items

Returns a list of all unique items (name and SKU) in the database.

Response

Array of all unique items

[
  {
    "name": "Strange Professional Killstreak Backburner",
    "sku": "40;11;kt-3"
  }
]
GET/api/item/{sku}Get latest price for SKU

Returns the latest price entry for a specific item SKU.

Parameters

NameInTypeDescription
skupathstringTF2 item SKU string (e.g. `5021;6` for Mann Co. Supply Crate Key)

Response

Latest price record for the item

{
  "name": "Strange Professional Killstreak Backburner",
  "sku": "40;11;kt-3",
  "source": "bptf",
  "time": 1748874425,
  "buy": {
    "keys": 4,
    "metal": 11.33
  },
  "sell": {
    "keys": 4,
    "metal": 69.22
  }
}
POST/api/items-bulkBulk price lookup

Returns the latest price for each SKU in the provided array. Accepts up to 100 SKUs per request.

Request Body

{
  "skus": [
    "40;11;kt-3",
    "202;11;australium"
  ]
}

Response

Array of price records for each matched SKU

Prices

GET/api/latest-pricesLatest price entries

Returns the 10 most recent price entries from the database (not unique per SKU). For the latest price of each unique item use `/api/autob/items`.

Response

Array of recent price records

[
  {
    "name": "Strange Professional Killstreak Backburner",
    "sku": "40;11;kt-3",
    "source": "bptf",
    "time": 1748874425,
    "buy": {
      "keys": 4,
      "metal": 11.33
    },
    "sell": {
      "keys": 4,
      "metal": 69.22
    }
  }
]
GET/api/pricesPaginated price history

Returns paginated price history with metadata. Use `limit` and `offset` for pagination.

Parameters

NameInTypeDescription
limitoptionalqueryintegerMaximum number of records to return (default 100, max 1000)Default: 100
offsetoptionalqueryintegerNumber of records to skip (default 0)Default: 0

Response

Paginated price records

GET/api/item-history/{sku}Full price history for SKU

Returns the complete price history for a specific item SKU as an array. Optionally filter by `start` and/or `end` unix timestamps.

Parameters

NameInTypeDescription
skupathstringTF2 item SKU string (e.g. `5021;6` for Mann Co. Supply Crate Key)
startoptionalqueryintegerOnly include entries after this unix timestamp
endoptionalqueryintegerOnly include entries before this unix timestamp

Response

Array of price records in chronological order

GET/api/snapshot/{timestamp}Price snapshot at timestamp

Returns the most recent price for each SKU as of the given unix timestamp.

Parameters

NameInTypeDescription
timestamppathintegerUnix timestamp in seconds

Response

Array of price records as of the given timestamp

Analytics

GET/api/item-stats/{sku}Price statistics for SKU

Returns aggregated statistics (min, max, avg, count) for buy and sell prices of a specific item SKU.

Parameters

NameInTypeDescription
skupathstringTF2 item SKU string (e.g. `5021;6` for Mann Co. Supply Crate Key)

Response

Price statistics for the item

{
  "buy": {
    "count": 12,
    "keys": {
      "min": 2,
      "max": 4,
      "avg": 3.1
    },
    "metal": {
      "min": 11.33,
      "max": 69.22,
      "avg": 40.12
    }
  },
  "sell": {
    "count": 12,
    "keys": {
      "min": 2,
      "max": 4,
      "avg": 3.1
    },
    "metal": {
      "min": 11.33,
      "max": 69.22,
      "avg": 40.12
    }
  }
}
GET/api/graph/{sku}Price history chart

Returns an embeddable HTML page containing an interactive Chart.js price history graph for the item. Supports iframe embedding via `?header=false`.

Parameters

NameInTypeDescription
skupathstringTF2 item SKU string (e.g. `5021;6` for Mann Co. Supply Crate Key)
headeroptionalquerybooleanSet to `false` to hide the chart header (useful for iframe embedding)Default: true
heightoptionalqueryintegerChart height in pixels (default 500 with header, 400 without)
widthoptionalquerystringChart width (default `100%`)

Response

HTML page with interactive price chart

GET/api/compare/{sku1}/{sku2}Compare two items

Returns the latest prices for two items side by side for easy comparison.

Parameters

NameInTypeDescription
sku1pathstringSKU of the first item
sku2pathstringSKU of the second item

Response

Side-by-side comparison with price differences and history

{
  "items": {
    "40;11;kt-3": {
      "name": "Strange Professional Killstreak Backburner",
      "sku": "40;11;kt-3",
      "buy": {
        "keys": 4,
        "metal": 11.33
      },
      "sell": {
        "keys": 4,
        "metal": 69.22
      }
    },
    "202;11;australium": {
      "name": "Australium Rocket Launcher",
      "sku": "202;11;australium",
      "buy": {
        "keys": 45,
        "metal": 0
      },
      "sell": {
        "keys": 50,
        "metal": 0
      }
    }
  },
  "comparison": {
    "buyDifference": {
      "keys": -41,
      "metal": 11.33
    },
    "sellDifference": {
      "keys": -46,
      "metal": 69.22
    }
  },
  "history": {
    "40;11;kt-3": [],
    "202;11;australium": []
  },
  "meta": {
    "compared": "2025-01-01T00:00:00.000Z",
    "historyDays": 30
  }
}

Search

Bot

GET/api/autob/itemsAll items (bot format)

Returns the full pricelist for TF2Autobot integration. Returns the latest price for each unique SKU.

Response

All current prices in bot format

{
  "success": true,
  "currency": "metal",
  "items": [
    {
      "name": "Strange Professional Killstreak Backburner",
      "sku": "40;11;kt-3",
      "source": "bptf",
      "time": 1748874425,
      "buy": {
        "keys": 4,
        "metal": 11.33
      },
      "sell": {
        "keys": 4,
        "metal": 69.22
      }
    }
  ]
}
GET/api/autob/items/{sku}Single item (bot format)

Returns the latest price for a single SKU in TF2Autobot-compatible format.

Parameters

NameInTypeDescription
skupathstringTF2 item SKU string (e.g. `5021;6` for Mann Co. Supply Crate Key)

Response

Price record for the requested SKU

POST/api/autob/items/{sku}Price check (bot format)

Price check endpoint for TF2Autobot integration.

Parameters

NameInTypeDescription
skupathstringTF2 item SKU string (e.g. `5021;6` for Mann Co. Supply Crate Key)

Response

Price check accepted