# POST /v1/live/csfloat/listing_detail

One current CSFloat listing by its listing ID: price, float, paint seed, stickers, charms, and seller.

Returns one current CSFloat listing by its ID.

Available on all plans, at [30 requests per minute on Developer and 180 on Scale](/docs/pricing#live-limits). Each request is for one listing.

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

## Inputs

| Field | Required | Meaning |
| --- | --- | --- |
| `listing` | Yes | The listing to read, with its [CSFloat listing ID](/docs/live-csfloat#ids) in `listing.listing_id` as a string of digits. |
| `raw_response` | No | `false` returns a [structured row](/docs/live-overview#raw-and-structured-responses) instead of CSFloat's JSON. |

```json
{
  "listing": { "listing_id": "1046652083283034404" }
}
```

The ID is the `id` of a [listings](/docs/live-csfloat-listings) or [store](/docs/live-csfloat-store) row, whose `detail_query` is this request.

Listing detail takes no filters and no sorting.

## Request

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

**curl**

```bash
curl -X POST https://api.cs2.sh/v1/live/csfloat/listing_detail \
  -H "Authorization: Bearer <<YOUR_API_KEY>>" \
  -H "Accept-Encoding: gzip" --compressed \
  -H "Content-Type: application/json" \
  -d '{
  "listing": {
    "listing_id": "1046652083283034404"
  },
  "raw_response": false
}'
```

**Python**

```python
import requests

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

payload = {
    "listing": {
        "listing_id": "1046652083283034404",
    },
    "raw_response": False,
}

response = requests.post(
    "https://api.cs2.sh/v1/live/csfloat/listing_detail",
    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/listing_detail", {
  method: "POST",
  headers,
  body: JSON.stringify({
    "listing": {
      "listing_id": "1046652083283034404"
    },
    "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{
        "listing": map[string]any{
            "listing_id": "1046652083283034404",
        },
        "raw_response": false,
    }
    body, _ := json.Marshal(payload)
    req, _ := http.NewRequest("POST", "https://api.cs2.sh/v1/live/csfloat/listing_detail", 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(
  listing = list(
    listing_id = "1046652083283034404"
  ),
  raw_response = FALSE
)

resp <- request("https://api.cs2.sh/v1/live/csfloat/listing_detail") |>
  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 for the listing, with prices in cents. With `raw_response: false`, `data.listing` is one [LiveListing](/docs/objects#livelisting), with the same fields a [listings](/docs/live-csfloat-listings#response-data) row has.

## Errors

If CSFloat has no listing with that ID, the request returns `404` with `details.field` set to `listing.listing_id`. The `404` still [counts against your limit](/docs/pricing#live-limits), because CSFloat responded. Other errors are the [shared live errors](/docs/live-overview#errors-and-retries).

## POST /v1/live/csfloat/listing_detail/options

Listing detail takes no filters and no sorting, so its options path has nothing to list. A request for any `field` returns `400`.

### Request

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

**curl**

```bash
curl -X POST https://api.cs2.sh/v1/live/csfloat/listing_detail/options \
  -H "Authorization: Bearer <<YOUR_API_KEY>>" \
  -H "Accept-Encoding: gzip" --compressed \
  -H "Content-Type: application/json" \
  -d '{
  "field": "string",
  "contains": "string",
  "cursor": "string"
}'
```

**Python**

```python
import requests

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

payload = {
    "field": "string",
    "contains": "string",
    "cursor": "string",
}

response = requests.post(
    "https://api.cs2.sh/v1/live/csfloat/listing_detail/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/listing_detail/options", {
  method: "POST",
  headers,
  body: JSON.stringify({
    "field": "string",
    "contains": "string",
    "cursor": "string"
  }),
});

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{
        "field": "string",
        "contains": "string",
        "cursor": "string",
    }
    body, _ := json.Marshal(payload)
    req, _ := http.NewRequest("POST", "https://api.cs2.sh/v1/live/csfloat/listing_detail/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(
  field = "string",
  contains = "string",
  cursor = "string"
)

resp <- request("https://api.cs2.sh/v1/live/csfloat/listing_detail/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). |
