# POST /v1/live/csfloat/listings

Current CSFloat listings for one item, a group, or up to 50 names, filtered by float, paint seed, phase, stickers, charms, and price. Buy now or auction.

Returns the current CSFloat listings for one item, a group of items, or the whole market, each with its price, float, paint seed, stickers, charms, and seller. It's also CSFloat's search: send filters without `market_hash_name`.

Available on all plans, at [6 requests per minute on Developer and 36 on Scale](/docs/pricing#live-limits). Each request is for one item or group, a list of up to 50 names, or the whole market, with up to 50 listings per page.

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

## Inputs

| Field | Required | Meaning |
| --- | --- | --- |
| `market_hash_name` | No | One item, a [group](/docs/live-csfloat#item-names), or a list of 1-50 names. Without it, the request searches all of CSFloat by filters alone. |
| `listing_type` | No | `buy_now` or `auction`. See [Listing types](/docs/live-csfloat#listing-types). Without it, the request returns buy now listings. |
| `filters` | No | See [Filters](#filters). |
| `sort` | No | See [Sorting](#sorting). |
| `raw_response` | No | `false` returns [structured rows](/docs/live-overview#raw-and-structured-responses) instead of CSFloat's JSON. |

```json
{
  "market_hash_name": "AK-47 | Redline (Field-Tested)",
  "filters": { "max_float": 0.2, "max_price": 50 },
  "sort": { "field": "price" }
}
```

## Filters

Every filter is optional, and a listing must match all of them.

| Filter | Type | Meaning |
| --- | --- | --- |
| `min_price`, `max_price` | `number` | The listing price in USD, inclusive. Buy now listings only. |
| `min_float`, `max_float` | `number` | The float, from 0 to 1, inclusive. Either can be sent alone. |
| `paint_seeds` | `integer[]` | The paint seeds to match, each from 0 to 1000. |
| `phase` | `string` | A Doppler or Gamma Doppler phase or gem, such as `Phase 2` or `Ruby`. A full variant name in `market_hash_name` does the same. |
| `min_fade`, `max_fade` | `number` | The fade percentage, from 0 to 100, for items with a fade. |
| `min_blue`, `max_blue` | `number` | The blue percentage, from 0 to 100, for Case Hardened items. |
| `weapon` | `string` or `string[]` | One weapon name, such as `AK-47`, or a list of up to 50. |
| `finish` | `string` or `string[]` | One finish name, such as `Redline`, or a list of up to 50. |
| `wear` | `string` or `string[]` | One wear name, such as `Factory New`, or a list. |
| `quality` | `string` or `string[]` | `normal`, `stattrak`, `souvenir`, or `highlight`, alone or in a list. |
| `rarity`, `collection` | `string` | One rarity or one collection, by name. |
| `item_type` | `string` | `skin`, `sticker`, `charm`, `patch`, `agent`, `container`, `collectible`, or `music_kit`. |
| `paint_indexes` | `integer[]` | The paint indexes to match. A `finish` name covers most cases without them. |
| `seller_id` | `string` | A seller's SteamID64. Returns only that seller's listings. |
| `stickers` | `object` | Stickers on the item. See [Stickers, patches, and charms](#stickers-patches-and-charms). |
| `patches` | `object` | Patches on the item. |
| `charms` | `object` | One charm attached to the item. |
| `min_charm_pattern`, `max_charm_pattern` | `integer` | Charm items only. A pattern range, from 0 to 100000. |
| `curated` | `string` | `unique` returns CSFloat's curated unique items. |
| `sticker_target` | `string` | Whether a sticker filter looks at skins (`skins`) or at souvenir packages (`packages`). |

`weapon`, `finish`, `wear`, and `quality` are for group and market-wide requests, because a full item name already fixes them.

CSFloat's own request parameters go in [`market_parameters`](/docs/live-overview#filters-and-sorting).

### Stickers, patches, and charms

`filters.stickers` takes one of two forms:

| Form | Meaning |
| --- | --- |
| `entries` | Up to 20 stickers. The listing must have all of them. |
| `preset` | `four_identical`: four or more copies of the same sticker, whichever sticker it is. |

Each entry names what it matches in exactly one way:

| Entry field | Meaning |
| --- | --- |
| `name` | The full sticker name (`Sticker \| Crown (Foil)`). |
| `id` | CSFloat's ID for the sticker, from the options path, for a name that matches more than one sticker. |
| `category` | A sticker family ID from the options path, which matches any sticker of that family. |
| `slot_only` | `true` together with a `slot`: any sticker in that slot. |

An entry can also have a `count` from 1 to 20, the number of copies of that sticker, or a `slot` from 0 to 6, its position, but not both.

`filters.patches` takes `entries` in the same form. `filters.charms` takes one entry, by `name` or `id`, with an optional `min_pattern` and `max_pattern`, from 0 to 100000, on the attached charm's pattern.

```json
{
  "market_hash_name": "AK-47 | Redline (Field-Tested)",
  "filters": {
    "stickers": { "entries": [{ "name": "Sticker | Crown (Foil)", "count": 2 }] },
    "charms": { "entries": [{ "name": "Charm | Lil' Zen" }] }
  }
}
```

## Sorting

`sort.direction` reverses a field that has a default direction. Without `sort`, buy now listings come lowest price first.

| `sort.field` | Direction | Order |
| --- | --- | --- |
| `price` | Ascending by default | By price. Buy now only. |
| `float` | Ascending by default | By float. |
| `created_at` | Descending only | Newest listings first. |
| `best_deal` | Descending only | CSFloat's best deal order. |
| `discount` | Descending only | Largest discount first, as CSFloat works it out. |
| `float_rank` | Ascending only | By CSFloat's float rank. |
| `expires_at` | Ascending only | Ending soonest. For auctions. |
| `bid_count` | Descending only | Most bids first. For auctions. |

## Request

`POST https://api.cs2.sh/v1/live/csfloat/listings`

**curl**

```bash
curl -X POST https://api.cs2.sh/v1/live/csfloat/listings \
  -H "Authorization: Bearer <<YOUR_API_KEY>>" \
  -H "Accept-Encoding: gzip" --compressed \
  -H "Content-Type: application/json" \
  -d '{
  "market_hash_name": "AK-47 | Redline (Field-Tested)",
  "filters": {
    "max_float": 0.2,
    "max_price": 50
  },
  "sort": {
    "field": "price"
  },
  "raw_response": false
}'
```

**Python**

```python
import requests

headers = {
    "Authorization": "Bearer <<YOUR_API_KEY>>",
    "Accept-Encoding": "gzip",
    "Content-Type": "application/json",
}

payload = {
    "market_hash_name": "AK-47 | Redline (Field-Tested)",
    "filters": {
        "max_float": 0.2,
        "max_price": 50,
    },
    "sort": {
        "field": "price",
    },
    "raw_response": False,
}

response = requests.post(
    "https://api.cs2.sh/v1/live/csfloat/listings",
    headers=headers,
    json=payload,
)

response.raise_for_status()
data = response.json()
```

**Node**

```javascript
const headers = {
  "Authorization": "Bearer <<YOUR_API_KEY>>",
  "Accept-Encoding": "gzip",
  "Content-Type": "application/json",
};

const response = await fetch("https://api.cs2.sh/v1/live/csfloat/listings", {
  method: "POST",
  headers,
  body: JSON.stringify({
    "market_hash_name": "AK-47 | Redline (Field-Tested)",
    "filters": {
      "max_float": 0.2,
      "max_price": 50
    },
    "sort": {
      "field": "price"
    },
    "raw_response": false
  }),
});

if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();
```

**Go**

```go
package main

import (
    "bytes"
    "compress/gzip"
    "encoding/json"
    "fmt"
    "io"
    "net/http"
)

func main() {
    payload := map[string]any{
        "market_hash_name": "AK-47 | Redline (Field-Tested)",
        "filters": map[string]any{
            "max_float": 0.2,
            "max_price": 50,
        },
        "sort": map[string]any{
            "field": "price",
        },
        "raw_response": false,
    }
    body, _ := json.Marshal(payload)
    req, _ := http.NewRequest("POST", "https://api.cs2.sh/v1/live/csfloat/listings", bytes.NewReader(body))
    req.Header.Set("Content-Type", "application/json")
    req.Header.Set("Authorization", "Bearer <<YOUR_API_KEY>>")
    req.Header.Set("Accept-Encoding", "gzip")

    resp, err := http.DefaultClient.Do(req)
    if err != nil { panic(err) }
    defer resp.Body.Close()

    if resp.StatusCode < 200 || resp.StatusCode >= 300 {
        body, _ := io.ReadAll(resp.Body)
        panic(fmt.Sprintf("HTTP %d: %s", resp.StatusCode, body))
    }

    var reader io.Reader = resp.Body
    if resp.Header.Get("Content-Encoding") == "gzip" {
        gz, err := gzip.NewReader(resp.Body)
        if err != nil { panic(err) }
        defer gz.Close()
        reader = gz
    }

    var data any
    if err := json.NewDecoder(reader).Decode(&data); err != nil { panic(err) }
    fmt.Printf("%#v\n", data)
}
```

**R**

```r
library(httr2)

payload <- list(
  market_hash_name = "AK-47 | Redline (Field-Tested)",
  filters = list(
    max_float = 0.2,
    max_price = 50
  ),
  sort = list(
    field = "price"
  ),
  raw_response = FALSE
)

resp <- request("https://api.cs2.sh/v1/live/csfloat/listings") |>
  req_headers(
    Authorization = "Bearer <<YOUR_API_KEY>>",
    `Accept-Encoding` = "gzip"
  ) |>
  req_body_json(payload) |>
  req_perform()

data <- resp_body_json(resp)
```

## Response

```json
{
  "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](/docs/objects#liveresponse) fields:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `market` | `string` | No | The marketplace: `youpin`, `csfloat`, or `steam`. |
| `operation` | `string` | No | The operation that ran, such as `listings`. |
| `data` | `object` | No | With `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`. |
| `page` | [LivePage](/docs/objects#livepage) \| `null` | No | Paging for the next request. `null` on operations that aren't paged. |
| `warnings` | [LiveRequestWarning[]](/docs/objects#liverequestwarning) | No | Notes about the request itself. Absent when there are none. |
| `response_time` | `string (date-time)` | No | When cs2.sh sent the response (UTC). |

## Response data

By default, `data` is CSFloat's own JSON, with prices in cents. With `raw_response: false`, `data.listings[]` holds one [LiveListing](/docs/objects#livelisting) per listing:

| Field | Description |
| --- | --- |
| `id` | The [listing ID](/docs/live-csfloat#ids), as a string. |
| `listing_type` | `buy_now` or `auction`. |
| `price`, `currency` | The price in USD. |
| `seller_id` | The seller's SteamID64. |
| `created_at` | When the listing was created. |
| `item` | The listed item, as a [LiveItem](/docs/objects#liveitem) with its `market_hash_name`, `variant`, `float`, `paint_seed`, `paint_index`, `stickers[]`, `charms[]`, `patches[]`, `name_tag`, and more. |
| `auction` | For an auction, its `starting_price`, `current_bid`, `bid_count`, and `expires_at`. |
| `detail_query` | The [listing detail](/docs/live-csfloat-listing-detail) request for this listing. |
| `store_query` | The [store](/docs/live-csfloat-store) request for its seller. |

## Notes

An auction's `price` is its current price, and `auction.starting_price` is the seller's reserve price.

CSFloat gives no total for listings, so `page.total_count` is `null`.

## Errors

A float bound outside the item's own float range returns `400` with `details.code` set to `invalid_range`. For example, `AK-47 | Redline (Field-Tested)` with `max_float: 0.1` fails, because Field-Tested starts at 0.15. To search across wears, use a group name such as `AK-47 | Redline`.

With `listing_type` set to `auction`, `min_price`, `max_price`, and `sort.field` `price` return `400`, because auctions can't be filtered or sorted by price.

A sticker, patch, or charm name that matches more than one thing on CSFloat returns `400` with `details.candidates`, each with a corrected `query`.

Other errors are the [shared live errors](/docs/live-overview#errors-and-retries).

## POST /v1/live/csfloat/listings/options

Returns the valid [choices](/docs/live-overview#filter-options) for one field of a listings request. These fields have choices:

| `field` | Choices |
| --- | --- |
| `market_hash_name` | Item and group names |
| `filters.weapon`, `filters.finish`, `filters.wear` | Weapon, finish, and wear names |
| `filters.phase` | Doppler and Gamma Doppler phases and gems |
| `filters.paint_indexes` | Finishes with their paint index |
| `filters.collection`, `filters.rarity` | Collections and rarities |
| `filters.stickers.entries[].name` | Sticker names |
| `filters.stickers.entries[].category` | Sticker families |
| `filters.patches.entries[].name` | Patch names |
| `filters.charms.entries[].name` | Charm names |
| `sort` | The sorts available |

Each option's `query` is a complete listings request with the choice applied. Sticker, patch, and charm choices put CSFloat's ID in the query in place of the name, and a sticker choice is added to the stickers already in your request.

```json
{
  "market_hash_name": "AK-47 | Redline (Field-Tested)",
  "field": "filters.stickers.entries[].name",
  "contains": "Crown"
}
```

### Request

`POST https://api.cs2.sh/v1/live/csfloat/listings/options`

**curl**

```bash
curl -X POST https://api.cs2.sh/v1/live/csfloat/listings/options \
  -H "Authorization: Bearer <<YOUR_API_KEY>>" \
  -H "Accept-Encoding: gzip" --compressed \
  -H "Content-Type: application/json" \
  -d '{
  "market_hash_name": "AK-47 | Redline (Field-Tested)",
  "field": "filters.stickers.entries[].name",
  "contains": "Crown"
}'
```

**Python**

```python
import requests

headers = {
    "Authorization": "Bearer <<YOUR_API_KEY>>",
    "Accept-Encoding": "gzip",
    "Content-Type": "application/json",
}

payload = {
    "market_hash_name": "AK-47 | Redline (Field-Tested)",
    "field": "filters.stickers.entries[].name",
    "contains": "Crown",
}

response = requests.post(
    "https://api.cs2.sh/v1/live/csfloat/listings/options",
    headers=headers,
    json=payload,
)

response.raise_for_status()
data = response.json()
```

**Node**

```javascript
const headers = {
  "Authorization": "Bearer <<YOUR_API_KEY>>",
  "Accept-Encoding": "gzip",
  "Content-Type": "application/json",
};

const response = await fetch("https://api.cs2.sh/v1/live/csfloat/listings/options", {
  method: "POST",
  headers,
  body: JSON.stringify({
    "market_hash_name": "AK-47 | Redline (Field-Tested)",
    "field": "filters.stickers.entries[].name",
    "contains": "Crown"
  }),
});

if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();
```

**Go**

```go
package main

import (
    "bytes"
    "compress/gzip"
    "encoding/json"
    "fmt"
    "io"
    "net/http"
)

func main() {
    payload := map[string]any{
        "market_hash_name": "AK-47 | Redline (Field-Tested)",
        "field": "filters.stickers.entries[].name",
        "contains": "Crown",
    }
    body, _ := json.Marshal(payload)
    req, _ := http.NewRequest("POST", "https://api.cs2.sh/v1/live/csfloat/listings/options", bytes.NewReader(body))
    req.Header.Set("Content-Type", "application/json")
    req.Header.Set("Authorization", "Bearer <<YOUR_API_KEY>>")
    req.Header.Set("Accept-Encoding", "gzip")

    resp, err := http.DefaultClient.Do(req)
    if err != nil { panic(err) }
    defer resp.Body.Close()

    if resp.StatusCode < 200 || resp.StatusCode >= 300 {
        body, _ := io.ReadAll(resp.Body)
        panic(fmt.Sprintf("HTTP %d: %s", resp.StatusCode, body))
    }

    var reader io.Reader = resp.Body
    if resp.Header.Get("Content-Encoding") == "gzip" {
        gz, err := gzip.NewReader(resp.Body)
        if err != nil { panic(err) }
        defer gz.Close()
        reader = gz
    }

    var data any
    if err := json.NewDecoder(reader).Decode(&data); err != nil { panic(err) }
    fmt.Printf("%#v\n", data)
}
```

**R**

```r
library(httr2)

payload <- list(
  market_hash_name = "AK-47 | Redline (Field-Tested)",
  field = "filters.stickers.entries[].name",
  contains = "Crown"
)

resp <- request("https://api.cs2.sh/v1/live/csfloat/listings/options") |>
  req_headers(
    Authorization = "Bearer <<YOUR_API_KEY>>",
    `Accept-Encoding` = "gzip"
  ) |>
  req_body_json(payload) |>
  req_perform()

data <- resp_body_json(resp)
```

### Parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `field` | `string` | Yes | The request field to list choices for, such as `filters.weapon` or `filters.stickers.entries[].name`. |
| `contains` | `string` | No | Text that a choice's label must contain, matched without regard to case. |
| `cursor` | `string` | No | The `page.next_cursor` from the previous page of choices, sent as the only field. |

### Response

```json
{
  "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](/docs/objects#liveoptionsresponse) fields:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `market` | `string` | No | The marketplace. |
| `operation` | `string` | No | The data operation the choices apply to. |
| `field` | `string` | No | The request field the choices are for. |
| `availability` | `string` | No | Whether choices could be loaded for this request. |
| `completeness` | `string` | No | `complete` when the list holds every accepted value. `partial` when it holds suggestions, and other values may also work. |
| `options` | [LiveOption[]](/docs/objects#liveoption) | No | The choices. |
| `metadata` | `object` | No | Information about the choice list, such as when it was fetched. |
| `page` | [LivePage](/docs/objects#livepage) | No | Paging for long choice lists. |
| `response_time` | `string (date-time)` | No | When cs2.sh sent the response (UTC). |
