New: live data for Youpin, CSFloat, and Steam

POST /v1/live/youpin/store

Returns one Youpin seller's listings, whether for sale, for rent, or on pre-sale.

Available on all plans, at 6 requests per minute on Developer and 36 on Scale. Each request is for one seller, with up to 100 listings per page.

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

Inputs#

FieldTypeMeaning
seller_idstringRequired. The seller's Youpin user ID, a string of digits.
listing_typestringbuy_now, rental, or pre_sale. Without it, the request returns the seller's buy now listings.
searchstringText that Youpin matches against the Chinese names of the seller's items.
filtersobjectSee Filters.
sortobjectSee Sorting.
raw_responsebooleanfalse returns structured rows. Without it, data is Youpin's own JSON.
{
  "seller_id": "6674377",
  "filters": { "weapon": "AK-47", "max_price": 500 },
  "sort": { "field": "price" }
}

The ID is the seller_id of a structured listing row, whose store_query is this request.

A store can't be narrowed to one item, so market_hash_name and item_id return 400. Narrow it with search or the weapon filter.

Filters#

A store has fewer filters than listings, and they depend on the listing type.

FilterTypeListing typeMeaning
weaponstring or string[]buy_nowOne weapon name or up to 20, such as AK-47.
min_price, max_pricenumberbuy_nowThe listing price in CNY, inclusive.
min_short_daily_rent, max_short_daily_rentnumberrentalThe short-term rent in CNY per day.
min_long_daily_rent, max_long_daily_rentnumberrentalThe long-term rent in CNY per day. A maximum needs a minimum above 0.

A pre-sale store takes no filters, and search works with all three listing types.

Sorting#

listing_typesort.field
buy_nowprice
rentalshort_daily_rent, long_daily_rent, deposit
pre_saleNone

Every sort is ascending by default.

Request#

POSTapi.cs2.sh/v1/live/youpin/store
curl -X POST https://api.cs2.sh/v1/live/youpin/store \
  -H "Authorization: Bearer <<YOUR_API_KEY>>" \
  -H "Accept-Encoding: gzip" --compressed \
  -H "Content-Type: application/json" \
  -d '{
  "seller_id": "6674377",
  "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#

With raw_response: false, data.listings[] holds one LiveListing per listing, the same shape listings returns. Rental rows carry a rental object, and pre-sale rows a pre_sale object. A seller with nothing listed returns 200 with no rows.

Notes#

A store has no auction listing type. A seller's auctions appear in the item's listings with "listing_type": "auction".

Errors#

A store request returns the shared live errors.

POST /v1/live/youpin/store/options#

Returns the valid choices for one field of a store request, and needs no seller. These fields have choices:

fieldChoices
filters.weaponThe weapon names a store can be filtered by
sortThe sorts available for the listing type
listing_typeThe listing types

To get one listing type's choices, send listing_type with field. Each option's query is a store request with the choice applied. Without a seller_id in the options request, add one to query.body before you POST it.

{
  "listing_type": "rental",
  "field": "sort"
}

Request#

POSTapi.cs2.sh/v1/live/youpin/store/options
curl -X POST https://api.cs2.sh/v1/live/youpin/store/options \
  -H "Authorization: Bearer <<YOUR_API_KEY>>" \
  -H "Accept-Encoding: gzip" --compressed \
  -H "Content-Type: application/json" \
  -d '{
  "listing_type": "rental",
  "field": "sort"
}'

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).