Market Index

⚖️ Compare Market Segments - Segment Analysis

Baseurl: https://www.steamwebapi.com/steam/api/market-index/cs2/compare?type=rarity&key=YOUR_API_KEY

💬 **What this endpoint does:**
- Compares market segments by a specific metric.
- Returns sorted list with values and percentages.
- Ideal for pie charts, ranking tables, or market analysis.

🛠️ **Features:**
- Compare by different metrics: price_index, turnover, sold24h, avg_price, listing_value, order_book_value.
- Filter specific segments using `keys` parameter (comma-separated).
- Results sorted by value in descending order.

🌐 **How to use:**
- Specify `type` parameter (required): item_group, rarity, wear, quality, stattrak, collection.
- Optionally filter with `keys`: `?type=item_group&keys=knife,glove,rifle`.
- Change metric: `?type=wear&metric=turnover`.

📊 **Use Cases:**
- Market share analysis by rarity or item type.
- Compare trading volumes across different wears.
- Identify top-performing market segments.
get/steam/api/market-index/cs2/compare

Request

  • Base URL: https://www.steamwebapi.com
  • URL: https://www.steamwebapi.com/steam/api/market-index/cs2/compare
  • Auth: API key in query parameter key

Query parameters

Your API key for authentication. Retrieve it from your Dashboard (top-right corner).

type'item_group' | 'rarity' | 'wear' | 'quality' | 'stattrak' | 'collection' required

Segment type to compare. All segments of this type will be compared.

Available types:

  • item_group: Compare weapon categories
  • rarity: Compare by rarity tier
  • wear: Compare skin conditions
  • quality: Compare item qualities
  • stattrak: Compare StatTrak vs non-StatTrak
  • collection: Compare game collections
keysstring

Comma-separated segment keys to filter. If empty, all segments of the type are compared.

Examples:

  • knife,glove,rifle for item_group
  • Covert,Classified,Restricted for rarity
  • fn,mw,ft for wear
metric'price_index' | 'turnover' | 'sold24h' | 'avg_price' | 'listing_value' | 'order_book_value'

Metric to compare segments by. Default: price_index

Available metrics:

  • price_index: Sum of all item prices in segment
  • turnover: 24h trading volume (estimated)
  • sold24h: Number of items sold in 24h
  • avg_price: Average item price
  • listing_value: Total value of all listings
  • order_book_value: Total value of all buy orders
formatstring

Response format. Default: json. Available: csv, xml, html, gzip, zip, ndjson, mysql, mysql_with_table, pgsql, pgsql_with_table, mongo

pretty'0' | '1'

Pretty-print JSON (set to 1 for json/gzip/zip formats). Default: 0

Response

Segment comparison

unknown required

Changes

No recorded changes to this operation across all 1 revision of this API.