post
https://{yourinstance}.makaira.io/recommendation/public
Public Endpoint to retrieve recommended products
Fetches product recommendations without HMAC or an API key. Suitable for direct storefront use. Response fields are limited to those configured in the recommendation setup.
Request
POST /recommendation/public
Headers
| Header | Value |
|---|---|
Content-Type | application/json |
X-Makaira-Instance | Your Makaira instance identifier |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
recommendationId | string or array | Yes | Identifier(s) of the recommendation configuration(s). Pass an array to fetch multiple recommendation sets in one request. |
query.shop_id | string | Yes | Shop identifier. |
query.language | string | Yes | Language code for the index (e.g. de, en). |
productId | string | No | Product ID to base context-dependent recommendations on. |
count | integer | No | Maximum number of recommendations per recommendation set. |
query.use_stock | boolean | No | When true, only returns in-stock products. |
oi.user.agent | string | No | User agent for Machine Learning personalization. |
oi.user.ip | string | No | User IP for Machine Learning personalization. |
enableHook | boolean | No | Set to false to skip search query hooks. Defaults to true. |
Example Request
{
"recommendationId": "homepage-recommendations",
"query.shop_id": "1",
"query.language": "de",
"count": 6
}Fetch Multiple Recommendation Sets
{
"recommendationId": [
"homepage-recommendations",
"trending-products"
],
"query.shop_id": "1",
"query.language": "de",
"count": 4
}Response
Returns a JSON object keyed by recommendation ID, each containing an array of recommended product items.
200OK

