# /petsplace/products/search

`POST /api/petsplace/products/search`

Price: 20 credits

Search and filter the Pets Place catalog. Combine a keyword with any of the catalog filters (animal/domain group, leaf category, brand, product group, health/purpose, flavor, packaging, size, weight, volume, color, promotion type, availability, price range). Leave the keyword empty to list a pure filter/category selection. Returns product cards with id, sku, gtin13, name, brand, image, price, final_price, sale_price, special_type, availability, stock, and catalog attributes, plus the canonical product URL.

## How to use it

Keyword + faceted search over the Pets Place catalog (NL). Each result has id (Pets Place internal product id), sku (article number), gtin13 (EAN), name, brand, image (main image), images (full gallery), price (catalog price in EUR), final_price (current selling price after any discount), sale_price (explicit sale price when set), currency, special_type (promotion label, e.g. '20% korting', '1 + 1 gratis', 'Bonusbag'), has_promotion flag, promotion_id (active promotion identifier), availability ('Op voorraad' / 'Geen voorraad'), is_in_stock convenience flag, stock (units), turnover_group (animal/domain group), sub_turnover_group and sub_turnover_group3 (life-stage / refinement subgroups), categories (leaf categories), product_group, sub_product_group, sub_product_group2 (secondary product subgroup), health (purpose/health attribute), flavor (main ingredient), packaging, size, clothing_size, weight, volume, color, and url. Filters mirror the on-site refinement panel and can be combined; an empty keyword returns the full filtered listing. Sort via relevance / price_asc / price_desc / title_asc / title_desc.

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `keyword` (string) — Search keyword. Leave empty to list a category/brand/filter selection without a text query. (default: ""; examples: "kattenvoer", "royal canin", "hondenmand")
- `count` (integer, required) — Max number of results to return (min: 1; max: 1000)
- `sort` (string) — Result ordering (default: "relevance"; one of: "relevance", "price_asc", "price_desc", "title_asc", "title_desc")
- `turnover_group` (string, nullable) — Animal / product domain (top-level navigation group) (one of: "Hond", "Kat", "Knaagdier", "Vogel", "Vis", "Paard", "Reptiel", "Hengelsport", "Duif", "Boerderijdier", "Buiten(Dieren)", "Plant & Zorg", "Werken In De Tuin", "Vijver", "Huis", "Wonen & Leven", "Kleding & Schoeisel", "Leisure", "Events", "Special")
- `category` (string, nullable) — Leaf category name (examples: "Kattenbrokken", "Hondensnack", "Halsband")
- `brand` (string, nullable) — Brand name (examples: "Royal Canin", "Hill's", "Trixie")
- `product_group` (string, nullable) — Product group (examples: "Feline Health Nutrition", "Snack", "Graanvrij")
- `sub_product_group` (string, nullable) — Product subgroup (examples: "Premium Voeding", "Natuurlijke Voeding")
- `health` (string, nullable) — Health / purpose attribute (examples: "Gewicht", "Gebit", "Spijsvertering", "Hypoallergeen")
- `flavor` (string, nullable) — Flavor / main ingredient (examples: "Kip", "Zalm", "Rund", "Lam")
- `packaging` (string, nullable) — Packaging type (one of: "Alu", "Alukuipje", "Blik", "Cups", "Doos", "Emmer", "Flacon", "Fles", "Folie", "Pak", "Pot", "Pouch", "Sachet", "Spuitbus", "Tetrapack", "Tube", "Verspack", "Versvlees", "Worst", "Zak")
- `size` (string, nullable) — Size class (breed / portion size) (one of: "Giant", "Large", "Maxi", "Medium", "Mini", "Regular", "Small", "Xlarge", "Xsmall")
- `clothing_size` (string, nullable) — Clothing / footwear size (examples: "M", "L", "XL", "One Size")
- `weight` (string, nullable) — Net weight label (examples: "400 g", "2 kg", "12 kg")
- `volume` (string, nullable) — Volume label (examples: "250 ml", "1 l", "5 l")
- `color` (string, nullable) — Color (examples: "Zwart", "Grijs", "Blauw")
- `special_type` (string, nullable) — Promotion type (examples: "20% korting", "1 + 1 gratis", "Bonusbag", "Van-voor prijs")
- `on_promotion` (boolean, nullable) — Only products that currently have an active promotion
- `availability` (string, nullable) — Stock availability (one of: "in_stock", "out_of_stock")
- `price_min` (number, nullable) — Minimum selling price (EUR) (min: 0)
- `price_max` (number, nullable) — Maximum selling price (EUR) (min: 0)

## Response

### 200 — Successful Response

- `@type` (string) (default: "PetsplaceProductSearchItem")
- `id` (string, required)
- `sku` (string, nullable)
- `gtin13` (string, nullable)
- `name` (string, nullable)
- `brand` (string, nullable)
- `image` (string, nullable)
- `images` (array) (default: [])
- `price` (number, nullable)
- `final_price` (number, nullable)
- `sale_price` (number, nullable)
- `currency` (string, nullable)
- `special_type` (string, nullable)
- `has_promotion` (boolean, nullable)
- `promotion_id` (string, nullable)
- `availability` (string, nullable)
- `is_in_stock` (boolean, nullable)
- `stock` (integer, nullable)
- `turnover_group` (string, nullable)
- `sub_turnover_group` (string, nullable)
- `sub_turnover_group3` (string, nullable)
- `categories` (array) (default: [])
- `product_group` (string, nullable)
- `sub_product_group` (string, nullable)
- `sub_product_group2` (string, nullable)
- `health` (string, nullable)
- `flavor` (string, nullable)
- `packaging` (string, nullable)
- `size` (string, nullable)
- `clothing_size` (string, nullable)
- `weight` (string, nullable)
- `volume` (string, nullable)
- `color` (string, nullable)
- `url` (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.

