# /hornbach/products/search

`POST /api/hornbach/products/search`

Price: 10 credits

Search HORNBACH Netherlands products by text, category or both, with sort, price, brand, availability, new-in-range and attribute filters: product cards with price and unit, price per m², rating, online and store availability

## How to use it

Prices are in EUR. Attribute filters take the store's filter names for that search, such as Kleurfamilie or Lengte; an unknown name or value answers 422 listing the available ones. A text search reaches at most 4968 products; a category listing has no such limit, so walk a large range by category. Pack content in m² and dimensions are on hornbach/products.

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `query` (string, nullable) — Search text (examples: "laminaat eiken", "boormachine")
- `category` (string, nullable) — HORNBACH category id or category URL (examples: "S4574", "https://www.hornbach.nl/c/vloeren-tegels/laminaat/S4574/")
- `count` (integer, required) — Max number of products to return (min: 1)
- `sort` (string) — Result ordering (default: "relevance"; one of: "relevance", "price_asc", "price_desc", "rating", "brand_asc", "brand_desc", "title_asc", "title_desc")
- `price_min` (number, nullable) — Minimum displayed price in EUR (min: 0)
- `price_max` (number, nullable) — Maximum displayed price in EUR (min: 0)
- `brands` (array, nullable) — Brand names to keep (examples: ["Makita","Bosch"])
- `availability` (array, nullable) — Availability conditions every product must meet (one of: "in_store_stock", "reservable", "available", "online_orderable", "online_only")
- `new_only` (boolean) — Keep only products new in the range (default: false)
- `attributes` (array, nullable) — Attribute filters (examples: [{"name":"Kleurfamilie","values":["Bruin"]},{"max":1400,"min":1200,"name":"Lengte"}])
  - `entity_type` (string) (default: "")
  - `name` (string, required) — Attribute name as shown on the product (minLength: 1)
  - `values` (array, nullable) — Attribute values to keep
  - `min` (number, nullable) — Lower bound for a numeric attribute
  - `max` (number, nullable) — Upper bound for a numeric attribute

## Response

### 200 — Successful Response

- `@type` (string) (default: "HornbachListedProduct")
- `id` (string, required)
- `concrete_product_id` (string, nullable)
- `title` (string, nullable)
- `url` (string, nullable)
- `brand` (string, nullable)
- `brand_logo_url` (string, nullable)
- `image` (string, nullable)
- `image_thumbnail` (string, nullable)
- `image_alt` (string, nullable)
- `variant_count` (integer, nullable)
- `price` (number, nullable)
- `price_unit` (string, nullable)
- `price_prefix` (string, nullable)
- `currency` (string, nullable)
- `base_price` (number, nullable)
- `base_price_unit` (string, nullable)
- `price_per_m2` (number, nullable)
- `original_price` (number, nullable)
- `sales_unit_code` (string, nullable)
- `default_order_amount` (number, nullable)
- `volume_prices` (array) (default: [])
  - `@type` (string) (default: "HornbachVolumePrice")
  - `min_quantity` (number, required)
  - `quantity_unit` (string, nullable)
  - `price` (number, nullable)
  - `price_unit` (string, nullable)
  - `base_price` (number, nullable)
  - `base_price_unit` (string, nullable)
- `rating` (number, nullable)
- `review_count` (integer, nullable)
- `is_configurable` (boolean, nullable)
- `ribbons` (array) (default: [])
- `energy_labels` (array) (default: [])
  - `@type` (string) (default: "HornbachEnergyLabel")
  - `efficiency_class` (string, required)
  - `scale_lowest` (string, nullable)
  - `scale_highest` (string, nullable)
  - `label` (string, nullable)
  - `image` (string, nullable)
  - `datasheet_url` (string, nullable)
- `online_orderable` (boolean, nullable)
- `online_status` (string, nullable)
- `store_reservable` (boolean, nullable)
- `store_status` (string, nullable)
- `store` (object, nullable)
  - `@type` (string) (default: "HornbachStore")
  - `id` (string, required)
  - `name` (string, nullable)
  - `city` (string, nullable)
- `leading_offer` (string, nullable)
- `is_sponsored` (boolean, nullable)
- `sponsor_name` (string, nullable)
- `advertiser_name` (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

No HORNBACH category under that id

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.

