> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kameleoon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve search results

> Query the Kameleoon Search service to retrieve instant or full product search results based on user input.

The Kameleoon Search service provides two search types:

* **Instant (typeahead) search**: Displays and updates results as users type search queries.
* **Full search**: Returns complete, filtered search results after the user submits a search query.

Both options use the same endpoint. Use the `type` parameter to specify the search type.

### Request

```
GET https://api.products.kameleoon.com/search
```

### Query parameters

These query parameters apply to both full search and instant search. Use [additional parameters](#additional-query-parameters-full-search-only) only with full search.

| Parameter      | Type   | Required | Description                                                                                                                                                                                                                                                                                    |
| :------------- | :----- | :------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `did`          | String | True     | Device ID. Get this ID from the `KameleoonProducts_device_id` cookie. Retrieve it from the backend before calling this endpoint. Only provide `did` when using filters or algorithms that rely on historical device data, such as "Recently Viewed" or "Recommended for You."                  |
| `sid`          | String | True     | Temporary user session ID. Get this ID from the `KameleoonProducts_session_code` cookie. Retrieve it from the backend before calling this endpoint. Only provide `sid` when using filters or algorithms that rely on historical user data, such as "Recently Viewed" or "Recommended for You." |
| `shop_id`      | String | True     | Store Key. Find this in **Recommendations** > **Settings** > **Store settings** in the Kameleoon app. Contact your Customer Success Manager for the key if necessary.                                                                                                                          |
| `type`         | String | True     | Specifies the search type: `instant_search` or `full_search`.                                                                                                                                                                                                                                  |
| `search_query` | String | True     | Current search query.                                                                                                                                                                                                                                                                          |
| `locations`    | List   | Optional | Comma-separated list of location IDs.                                                                                                                                                                                                                                                          |

### Additional query parameters (full search only)

Use these additional parameters with full search requests (`type=full_search`).

| Parameter        | Type             | Required | Description                                                                                                                                                                                                                           |
| :--------------- | :--------------- | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `limit`          | Integer          | Optional | Maximum number of results the API returns.                                                                                                                                                                                            |
| `offset`         | Integer          | Optional | Result offset.                                                                                                                                                                                                                        |
| `category_limit` | Integer          | Optional | Maximum number of categories for the sidebar filter.                                                                                                                                                                                  |
| `categories`     | List             | Optional | Comma-separated list of categories for filtering.                                                                                                                                                                                     |
| `extended`       | Integer or empty | Optional | Adds extended information for product results. Supported values: `1` or empty. If `1`, the API returns all product information. If empty, the API returns only product IDs. Kameleoon recommends setting this to `1` for full search. |
| `sort_by`        | String           | Optional | Sorting parameter. Supported values: `popular`, `price`, `discount`, `sales_rate`, `date`.                                                                                                                                            |
| `order`          | String           | Optional | Sort direction: `asc` (ascending) or `desc` (descending). Default is `desc`.                                                                                                                                                          |
| `brands`         | List             | Optional | Comma-separated list of brands for filtering.                                                                                                                                                                                         |
| `filters`        | String           | Optional | Escaped JSON string with filter parameters. Example: `{"bluetooth":["yes"],"offers":["15% cashback"],"weight":["1.6"]}`                                                                                                               |
| `price_min`      | Integer          | Optional | Minimum price.                                                                                                                                                                                                                        |
| `price_max`      | Integer          | Optional | Maximum price.                                                                                                                                                                                                                        |
| `colors`         | Integer          | Optional | Comma-separated list of colors.                                                                                                                                                                                                       |
| `exclude`        | Integer          | Optional | Comma-separated list of product IDs to exclude from search results.                                                                                                                                                                   |

### Response (instant search)

| Name                     | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| :----------------------- | :----- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `search_query`           | string | Search query.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `categories`             | array  | Category information. Each object contains these properties:<ul><li>`id` – category ID (string)</li><li>`name` – category name (string)</li><li>`url` – category URL (string)</li><li>`count` – number of products in the category (number)</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `filters`                | array  | Filter information. Each object contains these properties: <ul><li>`filter` – Filter object containing these properties:</li><li>`count` – total products matching these parameters (number)</li><li>`values` – array of value objects containing these properties:</li><li>`value` – value label (string)</li><li>`count` – number of products with this parameter (number)</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `html`                   | string | HTML code for the product block. Customize the template in the Kameleoon personal account.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `price_range`            | object | Minimum and maximum product prices. Contains these properties:<ul><li>`min` – minimum price (number)</li><li>`max` – maximum price (number)</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `products`               | array  | Product information. Each object contains these properties:<ul><li>`description` – product description (string)</li><li>`url` – absolute product URL (string)</li><li>`url_handle` – relative product URL (string)</li><li>`picture` – product picture URL in Kameleoon storage (string)</li><li>`name` – product name (string)</li><li>`price` – product price (integer)</li><li>`price_full` – product price (float)</li><li>`price_formatted` – product price with currency (string)</li><li>`price_full_formatted` – formatted product price with currency (string)</li><li>`image_url` - absolute product picture URL in Kameleoon storage (string)</li><li>`image_url_handle` - relative product picture URL in Kameleoon storage (string)</li><li>`image_url_resized` - array of resized image URLs</li><li>`currency` – product currency (string)</li><li>`id` – product ID (string)</li><li>`old_price` – product old price (integer, default is 0)</li><li>`old_price_full` – product old price (float)</li><li>`old_price_formatted` – product old price with currency (string)</li><li>`old_price_full_formatted` – formatted product old price with currency (string)</li><li>Additional properties if you include `extended` in the request:<ul><li>`id` – category ID (string)</li><li>`name` – category name (string)</li><li>`parent_id` – parent category ID (string)</li><li>`url` - category URL</li><li>`category_ids` - product category IDs (array)</li></ul></li></ul> |
| `search_query_redirects` | array  | Redirect information. Each object contains these properties:<ul><li>`query` – search query (string)</li><li>`redirect_link` – URL for redirection (string)</li><li>`deep_link` – URL for mobile apps (string)</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `products_total`         | number | Total number of products.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |

### Response (full search)

| Name             | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| :--------------- | :----- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `brands`         | array  | Brand information. Each object contains these properties:<ul><li>`name` – brand name (string)</li><li>`picture` – brand picture URL (string)</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `categories`     | array  | Category information. Each object contains these properties:<ul><li>`alias` – category alias (string)</li><li>`id` – category ID (string)</li><li>`name` – category name (string)</li><li>`parent` – parent category ID (string)</li><li>`url` – category URL (string)</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `filters`        | array  | Filter information. Each object contains these properties:<ul><li>`filter` – Filter object containing these properties:<ul><li>`count` – total products matching these parameters (number)</li><li>`values` – value objects containing `value` (string) and `count` (number)</li></ul></li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `html`           | string | HTML code for the product block. Customize the template in the Kameleoon personal account.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `price_range`    | object | Minimum and maximum product prices. Contains these properties:<ul><li>`min` – minimum price (number)</li><li>`max` – maximum price (number)</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `products`       | array  | Product information. Each object contains these properties:<ul><li>`brand` – product brand (string)</li><li>`currency` – product currency (string)</li><li>`id` – product ID (string)</li><li>`is_new` – product property (boolean, default is null)</li><li>`name` – product name (string)</li><li>`old_price` – product old price (string, default is 0)</li><li>`picture` – product picture URL in Kameleoon storage (string)</li><li>`price` – product price (number)</li><li>`price_formatted` – product price with currency (string)</li><li>`url` – product URL (string)</li><li>Additional properties if you include `extended` in the request:<ul><li>`barcode` – product barcode (string)</li></ul></li><li>`categories` – product categories (array) containing `id`, `name`, and `parent` ID.</li><li>`params` – parameter information. Each object contains `key` (string) and `values` (array).</li></ul> |
| `products_total` | number | Total count of products.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `search_query`   | string | Search query.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
