# /ssense/products/search

`POST /api/ssense/products/search`

Price: 20 credits

Search and browse SSENSE products in a department by keyword, designer, category, color, size and sale, with prices in the chosen country's currency

## How to use it

Browse or search one SSENSE department; with no query and no filters it lists the whole department. Designer and category ids come from the SSENSE designers and categories endpoints, and several ids in one filter match any of them. Pass a returned id to the SSENSE product endpoint for sizes, stock and description.

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `count` (integer, required) — Max number of products to return (min: 1)
- `department` (string, required) — Store department (one of: "men", "women", "everything-else")
- `country` (string) — Storefront country; it sets the assortment, the prices and the currency (default: "us"; one of: "ad", "ae", "af", "ag", "ai", "al", "am", "ao", "aq", "ar", "as", "at", "au", "aw", "az", "ba", "bb", "bd", "be", "bf", "bg", "bh", "bi", "bj", "bm", "bn", "bo", "br", "bs", "bt", "bv", "bw", "by", "bz", "ca", "cc", "cd", "cf", "cg", "ch", "ci", "ck", "cl", "cm", "cn", "co", "cr", "cv", "cw", "cx", "cy", "cz", "de", "dj", "dk", "dm", "do", "dz", "ec", "ee", "eg", "eh", "er", "es", "et", "fi", "fj", "fk", "fm", "fo", "fr", "ga", "gb", "gd", "ge", "gf", "gh", "gi", "gl", "gm", "gn", "gp", "gq", "gr", "gs", "gt", "gu", "gw", "gy", "hk", "hm", "hn", "hr", "ht", "hu", "id", "ie", "il", "in", "io", "iq", "is", "it", "jm", "jo", "jp", "ke", "kg", "kh", "ki", "km", "kn", "kr", "kw", "ky", "kz", "la", "lb", "lc", "li", "lk", "lr", "ls", "lt", "lu", "lv", "ly", "ma", "mc", "md", "me", "mg", "mh", "mk", "ml", "mm", "mn", "mo", "mp", "mq", "mr", "ms", "mt", "mu", "mv", "mw", "mx", "my", "mz", "na", "nc", "ne", "nf", "ng", "ni", "nl", "no", "np", "nr", "nu", "nz", "om", "pa", "pe", "pf", "pg", "ph", "pk", "pl", "pm", "pn", "pr", "ps", "pt", "pw", "py", "qa", "re", "ro", "rs", "ru", "rw", "sa", "sb", "sc", "se", "sg", "sh", "si", "sj", "sk", "sl", "sm", "sn", "so", "sr", "st", "sv", "sx", "sz", "tc", "td", "tf", "tg", "th", "tj", "tk", "tm", "tn", "to", "tr", "tt", "tv", "tw", "tz", "ua", "ug", "um", "us", "uy", "uz", "va", "vc", "ve", "vg", "vi", "vn", "vu", "wf", "ws", "ye", "yt", "za", "zm", "zw")
- `query` (string, nullable) — Free-text search (examples: "leather jacket", "boots"; minLength: 1)
- `is_sale` (boolean) — Only products on sale when true (default: false)
- `designer_ids` (array, nullable) — Designer ids, as id in the SSENSE designers endpoint (examples: ["238"], ["238","667"])
- `category_ids` (array, nullable) — Category ids, as id in the SSENSE categories endpoint (examples: ["3"], ["180","191"])
- `colors` (array, nullable) — Colors (one of: "black", "blue", "brown", "burgundy", "gray", "green", "navy", "orange", "pink", "purple", "red", "tan", "white", "yellow")
- `sizes` (array, nullable) — Size labels; a single size-system prefix (e.g. "IT 46") is normalised to the bare value, but a compound key naming more than one system (e.g. "UK 6/ US 4") is sent unchanged (examples: ["M"], ["32X32"], ["46"], ["IT 46"], ["UK 6/ US 4"])
- `sort` (string, nullable) — Result ordering; latest arrivals when omitted, relevance first when query is set (one of: "latest", "relevance", "trending", "price_asc", "price_desc", "discount_desc", "discount_asc")

## Response

### 200 — Successful Response

- `@type` (string) (default: "SsenseListingProduct")
- `id` (string, required)
- `url` (string, nullable)
- `name` (string, nullable)
- `style_code` (string, nullable)
- `department` (string, nullable)
- `brand` (object, nullable)
  - `@type` (string) (default: "SsenseBrand")
  - `id` (string, nullable)
  - `name` (string, nullable)
  - `alias` (string, nullable)
- `category_ids` (array) (default: [])
- `price` (number, nullable)
- `regular_price` (number, nullable)
- `currency` (string, nullable)
- `is_in_stock` (boolean, nullable)
- `image` (string, nullable)

## Errors

### 422 — Validation Error

The request body did not validate

What to do: Check the fields against this schema. A URN with the wrong prefix is the most common cause.

- `detail` (array)
  - `loc` (array, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (object)

### 408

The request ran past its time limit

What to do: Raise `timeout` in the request body, up to the maximum this endpoint documents. Lowering `count` or turning off the `with_*` flags also helps, because less work finishes sooner.

### 412

The entity was not found, or a precondition failed

What to do: Retrying will not help: either the entity does not exist, or the input points at a different one.

### 429

Too many requests: a rate limit or a usage window is exhausted

What to do: When the response carries an X-Retry-After header, wait that many seconds and retry: the same number is in the body as `detail.retry_after`, and the limit clears once that window passes. The message in the body names the limit that was hit.

### 500

Something broke on our side

What to do: Retrying will not help. If it keeps happening, send us the X-Request-ID from the response headers.

### 529

Rate limit reached, or the endpoint is overloaded

What to do: Wait at least 30 seconds, then retry.

## Response envelope

Success: Array of objects (may be empty if no results)

Error: Error may coexist with partial results if it occurs mid-execution. Check X-Error header and status code.

Every response carries these headers:

- `X-Error` — Error message text (present only on error)
- `X-Request-ID` — Unique request identifier
- `X-Execution-Time` — Execution time in seconds
- `X-Result-Count` — How many records the body carries. 0 means an empty result, which is a normal answer and not by itself an error. A non-zero count can come back together with X-Error when the failure happened partway through — read this header and X-Error independently.
- `X-Total-Available-Results` — How many records exist for this query, when the endpoint can say. On a `dry_run` request this is the answer and the body is empty. It saturates: the endpoint's documented maximum means 'at least that many', any smaller number is exact.
- `X-Warning` — Present when the request body carried keys this endpoint does not document. They were ignored, so any filter you meant to apply through them did not apply. Check the spelling against this schema and retry.
- `X-Retry-After` — Seconds to wait before retrying. Present only on 429.

