Developer API

CS2 Marketindex API

追踪聚合的 CS2 市场——当前指数值、完整历史,以及在我们覆盖的每一个市场上的并排对比。

Endpoints

All endpoints return JSON, accept the same auth header, and degrade with a normalised error envelope.

GET /steam/api/market-index/cs2
GET /steam/api/market-index/cs2/history
GET /steam/api/market-index/cs2/compare

CS2 Marketindex API — quickstart

Same auth header as every other endpoint we ship. Get an API key from the dashboard and you're querying inside two minutes.

  • Single auth header, JSON response.
  • Rate limits scale with your plan tier.
  • Full schema in the API reference.
API Request
# curl with API key
curl "https://www.steamwebapi.com/steam/api/market-index/cs2?key=$KEY"
# PHP
$res = file_get_contents('https://www.steamwebapi.com/steam/api/market-index/cs2?key=' . $KEY);
$data = json_decode($res, true);
# Node.js
const r = await fetch(`https://www.steamwebapi.com/steam/api/market-index/cs2?key=${KEY}`);
const data = await r.json();

About this API

Marketindex API 在 CS2 经济上计算一个加权指数:一个能反映市场上涨或下跌的单一数字。

FAQ

How is the index calculated?

Volume-weighted average of the top liquid CS2 items, rebalanced periodically. Snapshot-based so historical comparisons stay consistent.

Can I see history?

Yes — /steam/api/market-index/cs2/history returns the index as a time series.

Can I compare marketplaces?

Yes — /steam/api/market-index/cs2/compare returns the per-marketplace index side by side.

Start building with the CS2 Marketindex API

One key, every Steam endpoint.