New: live data for Youpin, CSFloat, and Steam

POST /v1/live/steam/search

Searches the whole Steam Community Market by text or category and returns one row per item, with its lowest price and its number of listings.

Available on all plans, at 40 requests per minute on Developer and 240 on Scale. Each request is for one search, with up to 30 items per page.

Prices are in USD and aren't converted. Data is real-time.

Inputs#

FieldRequiredMeaning
searchNoThe text to search for, up to 256 characters.
filtersNoSee Filters.
sortNoSee Sorting.
raw_responseNofalse returns structured rows instead of Steam's JSON.
{
  "search": "Redline",
  "filters": { "weapon": "AK-47" },
  "sort": { "field": "price" }
}

Search takes no market_hash_name or item_id. Those are for listings.

Filters#

Every filter is optional, and an item must match all of them. Each category filter takes one value or a list of up to 50.

FilterTypeMeaning
min_price, max_pricenumberThe item's lowest listing price in USD, inclusive.
weaponstring or string[]The weapon, such as AK-47.
wearstring or string[]The wear, such as Field-Tested.
qualitystring or string[]normal, stattrak, or souvenir. normal and stattrak include ★ items.
raritystring or string[]The rarity.
collectionstring or string[]The collection.
item_typestring or string[]The type of item.
tournament, team, playerstring or string[]A tournament, team, or pro player.
sticker_capsule, sticker_categorystring or string[]The capsule or category of a sticker sold as an item.
charm_capsulestring or string[]The capsule of a charm.
patch_capsule, patch_categorystring or string[]The capsule or category of a patch.
graffiti_capsule, graffiti_category, graffiti_colorstring or string[]The capsule, category, or color of a graffiti.

Category values are Steam's own labels, listed by the options path. Steam's own request parameters go in market_parameters.

Sorting#

sort.field is price, name, popularity, or listing_count, each ascending by default, and sort.direction reverses it. Without sort, items come in Steam's default order.

Request#

POSTapi.cs2.sh/v1/live/steam/search
curl -X POST https://api.cs2.sh/v1/live/steam/search \
  -H "Authorization: Bearer <<YOUR_API_KEY>>" \
  -H "Accept-Encoding: gzip" --compressed \
  -H "Content-Type: application/json" \
  -d '{
  "search": "Redline",
  "filters": {
    "weapon": "AK-47"
  },
  "sort": {
    "field": "price"
  },
  "raw_response": false
}'

Response#

{
  "market": "string",
  "operation": "string",
  "data": null,
  "page": {
    "page_size": 0,
    "has_next": false,
    "next_cursor": "string",
    "cursor_expires_at": "string",
    "total_count": 0,
    "total_exact": false
  },
  "warnings": [
    {
      "code": "string",
      "field": "string",
      "message": "string"
    }
  ],
  "response_time": "string"
}

Response fields#

LiveResponse fields:

FieldTypeRequiredDescription
marketstringNoThe marketplace: youpin, csfloat, or steam.
operationstringNoThe operation that ran, such as listings.
dataobjectNoWith raw_response: true, the default, the marketplace's own JSON, unchanged. With raw_response: false, the operation's structured object, which is one of LiveListingsData, LiveListingDetailData, LiveBuyOrdersData, SteamBuyOrderBook, LiveFloatRankData, or LiveSearchData.
pageLivePage | nullNoPaging for the next request. null on operations that aren't paged.
warningsLiveRequestWarning[]NoNotes about the request itself. Absent when there are none.
response_timestring (date-time)NoWhen cs2.sh sent the response (UTC).

Response data#

By default, data is Steam's own JSON. With raw_response: false, data.items[] holds one LiveSearchItem per item:

FieldDescription
market_hash_nameThe item's name, or the group's name on a grouped row.
item_idThe Steam group ID on a grouped row, otherwise null.
lowest_price, currencyThe lowest listing price, in USD.
listing_countThe number of listings.
listings_queryThe listings request for this row.
highest_buy_order, buy_order_quantity, rentalAlways null on Steam. An item's buy orders come from buy orders.

Notes#

Steam groups the wears of a skin into one row. A grouped row has the group's name, such as AK-47 | Redline, in market_hash_name, its group ID in item_id, and a lowest_price and listing_count across every wear. A row with a null item_id is a single item under its exact name. listings_query works for either kind of row.

Search returns items, not listings. To find listings by their stickers, patches, or charms, or to search item descriptions, send listings without an item.

Errors#

A category value Steam doesn't have returns 400 with details.code set to unknown_value, and details.allowed_values lists the values Steam has. Other errors are the shared live errors.

POST /v1/live/steam/search/options#

Returns the valid choices for one field of a search request. These fields have choices:

fieldChoices
filters.weapon, filters.wear, filters.quality, filters.rarity, filters.collection, filters.item_typeSteam's labels for that category
filters.tournament, filters.team, filters.playerTournaments, teams, and pro players
The capsule and category filtersSteam's labels for that category
sortThe sorts available

Each option's query is a complete search request with the choice applied.

{
  "field": "filters.collection",
  "contains": "Gallery"
}

Request#

POSTapi.cs2.sh/v1/live/steam/search/options
curl -X POST https://api.cs2.sh/v1/live/steam/search/options \
  -H "Authorization: Bearer <<YOUR_API_KEY>>" \
  -H "Accept-Encoding: gzip" --compressed \
  -H "Content-Type: application/json" \
  -d '{
  "field": "filters.collection",
  "contains": "Gallery"
}'

Parameters#

FieldTypeRequiredDescription
fieldstringYesThe request field to list choices for, such as filters.weapon or filters.stickers.entries[].name.
containsstringNoText that a choice's label must contain, matched without regard to case.
cursorstringNoThe page.next_cursor from the previous page of choices, sent as the only field.

Response#

{
  "market": "string",
  "operation": "string",
  "field": "string",
  "availability": "string",
  "completeness": "string",
  "options": [
    {
      "label": "string",
      "query": {
        "path": "string",
        "body": null
      }
    }
  ],
  "metadata": null,
  "page": {
    "page_size": 0,
    "has_next": false,
    "next_cursor": "string",
    "cursor_expires_at": "string",
    "total_count": 0,
    "total_exact": false
  },
  "response_time": "string"
}

Response fields#

LiveOptionsResponse fields:

FieldTypeRequiredDescription
marketstringNoThe marketplace.
operationstringNoThe data operation the choices apply to.
fieldstringNoThe request field the choices are for.
availabilitystringNoWhether choices could be loaded for this request.
completenessstringNocomplete when the list holds every accepted value. partial when it holds suggestions, and other values may also work.
optionsLiveOption[]NoThe choices.
metadataobjectNoInformation about the choice list, such as when it was fetched.
pageLivePageNoPaging for long choice lists.
response_timestring (date-time)NoWhen cs2.sh sent the response (UTC).