> ## 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.

# Suchergebnisse abrufen

> Fragen Sie den Kameleoon Search-Service ab, um sofortige oder vollständige Produktsuchergebnisse basierend auf Benutzereingaben abzurufen.

Der Kameleoon Search-Service bietet zwei Suchtypen:

* **Instant (typeahead) search**: Zeigt Ergebnisse an und aktualisiert sie, während Benutzer Suchanfragen eingeben.
* **Full search**: Gibt vollständige, gefilterte Suchergebnisse zurück, nachdem der Benutzer eine Suchanfrage abgesendet hat.

Beide Optionen verwenden denselben Endpoint. Verwenden Sie den Parameter `type`, um den Suchtyp anzugeben.

### Abfrageparameter

Diese Abfrageparameter gelten sowohl für die Full Search als auch für die Instant Search. Verwenden Sie [zusätzliche Parameter](#zusätzliche-abfrageparameter-nur-full-search) nur mit der Full Search.

| Parameter | Typ | Erforderlich | Beschreibung |
| :- | :- | :- | :- |
| `did` | String | True | Device-ID. Holen Sie diese ID aus dem Cookie `KameleoonProducts_device_id`. Rufen Sie sie vor dem Aufruf dieses Endpoints aus dem Backend ab. Geben Sie `did` nur an, wenn Sie Filter oder Algorithmen verwenden, die auf historischen Gerätedaten basieren, wie zum Beispiel "Recently Viewed" oder "Recommended for You." |
| `sid` | String | True | Temporäre Benutzersitzungs-ID. Holen Sie diese ID aus dem Cookie `KameleoonProducts_session_code`. Rufen Sie sie vor dem Aufruf dieses Endpoints aus dem Backend ab. Geben Sie `sid` nur an, wenn Sie Filter oder Algorithmen verwenden, die auf historischen Benutzerdaten basieren, wie zum Beispiel "Recently Viewed" oder "Recommended for You." |
| `shop_id` | String | True | Store Key. Sie finden ihn in **Recommendations** > **Settings** > **Store settings** in der Kameleoon App. Kontaktieren Sie Ihren Customer Success Manager, falls erforderlich, um den Schlüssel zu erhalten. |
| `type` | String | True | Gibt den Suchtyp an: `instant_search` oder `full_search`. |
| `search_query` | String | True | Aktuelle Suchanfrage. |
| `locations` | List | Optional | Durch Kommas getrennte Liste von Standort-IDs. |

### Zusätzliche Abfrageparameter (nur Full Search)

Verwenden Sie diese zusätzlichen Parameter mit Full Search-Anfragen (`type=full_search`).

| Parameter | Typ | Erforderlich | Beschreibung |
| :- | :- | :- | :- |
| `limit` | Integer | Optional | Maximale Anzahl der von der API zurückgegebenen Ergebnisse. |
| `offset` | Integer | Optional | Ergebnisversatz. |
| `category_limit` | Integer | Optional | Maximale Anzahl von Kategorien für den Sidebar-Filter. |
| `categories` | List | Optional | Durch Kommas getrennte Liste von Kategorien zur Filterung. |
| `extended` | Integer or empty | Optional | Fügt erweiterte Informationen für Produktergebnisse hinzu. Unterstützte Werte: `1` oder leer. Bei `1` gibt die API alle Produktinformationen zurück. Wenn leer, gibt die API nur Produkt-IDs zurück. Kameleoon empfiehlt, diesen Wert für die Full Search auf `1` zu setzen. |
| `sort_by` | String | Optional | Sortierparameter. Unterstützte Werte: `popular`, `price`, `discount`, `sales_rate`, `date`. |
| `order` | String | Optional | Sortierrichtung: `asc` (aufsteigend) oder `desc` (absteigend). Standardwert ist `desc`. |
| `brands` | List | Optional | Durch Kommas getrennte Liste von Marken zur Filterung. |
| `filters` | String | Optional | Escapeter JSON-String mit Filterparametern. Beispiel: `{"bluetooth":["yes"],"offers":["15% cashback"],"weight":["1.6"]}` |
| `price_min` | Integer | Optional | Mindestpreis. |
| `price_max` | Integer | Optional | Höchstpreis. |
| `colors` | List | Optional | Durch Kommas getrennte Liste der Farben. |
| `exclude` | List | Optional | Durch Kommas getrennte Liste von Produkt-IDs, die aus den Suchergebnissen ausgeschlossen werden sollen. |

### Antwort (Instant Search)

| Name | Typ | Beschreibung |
| :- | :- | :- |
| `search_query` | string | Suchanfrage. |
| `categories` | array | Kategorieinformationen. Jedes Objekt enthält diese Eigenschaften:<ul><li>`id` – Kategorie-ID (string)</li><li>`name` – Kategoriename (string)</li><li>`url` – Kategorie-URL (string)</li><li>`count` – Anzahl der Produkte in der Kategorie (number)</li></ul> |
| `filters` | array | Filterinformationen. Jedes Objekt enthält diese Eigenschaften: <ul><li>`filter` – Filterobjekt mit diesen Eigenschaften:</li><li>`count` – Gesamtanzahl der Produkte, die diesen Parametern entsprechen (number)</li><li>`values` – Array von Werteobjekten mit diesen Eigenschaften:</li><li>`value` – Wertlabel (string)</li><li>`count` – Anzahl der Produkte mit diesem Parameter (number)</li></ul> |
| `html` | string | HTML-Code für den Produktblock. Passen Sie die Vorlage im persönlichen Kameleoon-Konto an. |
| `price_range` | object | Mindest- und Höchstpreise der Produkte. Enthält diese Eigenschaften:<ul><li>`min` – Mindestpreis (number)</li><li>`max` – Höchstpreis (number)</li></ul> |
| `products` | array | Produktinformationen. Jedes Objekt enthält diese Eigenschaften:<ul><li>`description` – Produktbeschreibung (string)</li><li>`url` – absolute Produkt-URL (string)</li><li>`url_handle` – relative Produkt-URL (string)</li><li>`picture` – URL des Produktbildes im Kameleoon-Speicher (string)</li><li>`name` – Produktname (string)</li><li>`price` – Produktpreis (integer)</li><li>`price_full` – Produktpreis (float)</li><li>`price_formatted` – Produktpreis mit Währung (string)</li><li>`price_full_formatted` – formatierter Produktpreis mit Währung (string)</li><li>`image_url` - absolute URL des Produktbildes im Kameleoon-Speicher (string)</li><li>`image_url_handle` - relative URL des Produktbildes im Kameleoon-Speicher (string)</li><li>`image_url_resized` - Array von skalierten Bild-URLs</li><li>`currency` – Produktwährung (string)</li><li>`id` – Produkt-ID (string)</li><li>`old_price` – alter Produktpreis (string, Standard ist 0)</li><li>`old_price_full` – alter Produktpreis (float)</li><li>`old_price_formatted` – alter Produktpreis mit Währung (string)</li><li>`old_price_full_formatted` – formatierter alter Produktpreis mit Währung (string)</li><li>Zusätzliche Eigenschaften, wenn Sie `extended` in die Anfrage aufnehmen:<ul><li>`id` – Kategorie-ID (string)</li><li>`name` – Kategoriename (string)</li><li>`parent_id` – ID der übergeordneten Kategorie (string)</li><li>`url` - Kategorie-URL</li><li>`category_ids` - Produktkategorie-IDs (array)</li></ul></li></ul> |
| `search_query_redirects` | array | Weiterleitungsinformationen. Jedes Objekt enthält diese Eigenschaften:<ul><li>`query` – Suchanfrage (string)</li><li>`redirect_link` – URL für die Weiterleitung (string)</li><li>`deep_link` – URL für mobile Anwendungen (string)</li></ul> |
| `products_total` | number | Gesamtanzahl der Produkte. |

### Antwort (Full Search)

| Name | Typ | Beschreibung |
| :- | :- | :- |
| `brands` | array | Markeninformationen. Jedes Objekt enthält diese Eigenschaften:<ul><li>`name` – Markenname (string)</li><li>`picture` – URL des Markenbildes (string)</li></ul> |
| `categories` | array | Kategorieinformationen. Jedes Objekt enthält diese Eigenschaften:<ul><li>`alias` – Kategoriealias (string)</li><li>`id` – Kategorie-ID (string)</li><li>`name` – Kategoriename (string)</li><li>`parent` – ID der übergeordneten Kategorie (string)</li><li>`url` – Kategorie-URL (string)</li></ul> |
| `filters` | array | Filterinformationen. Jedes Objekt enthält diese Eigenschaften:<ul><li>`filter` – Filterobjekt mit diesen Eigenschaften:<ul><li>`count` – Gesamtanzahl der Produkte, die diesen Parametern entsprechen (number)</li><li>`values` – Werteobjekte mit `value` (string) und `count` (number)</li></ul></li></ul> |
| `html` | string | HTML-Code für den Produktblock. Passen Sie die Vorlage im persönlichen Kameleoon-Konto an. |
| `price_range` | object | Mindest- und Höchstpreise der Produkte. Enthält diese Eigenschaften:<ul><li>`min` – Mindestpreis (number)</li><li>`max` – Höchstpreis (number)</li></ul> |
| `products` | array | Produktinformationen. Jedes Objekt enthält diese Eigenschaften:<ul><li>`brand` – Produktmarke (string)</li><li>`currency` – Produktwährung (string)</li><li>`id` – Produkt-ID (string)</li><li>`is_new` – Produkteigenschaft (boolean, Standard ist null)</li><li>`name` – Produktname (string)</li><li>`old_price` – alter Produktpreis (string, Standard ist 0)</li><li>`picture` – URL des Produktbildes im Kameleoon-Speicher (string)</li><li>`price` – Produktpreis (number)</li><li>`price_formatted` – Produktpreis mit Währung (string)</li><li>`url` – Produkt-URL (string)</li><li>Zusätzliche Eigenschaften, wenn Sie `extended` in die Anfrage aufnehmen:<ul><li>`barcode` – Produkt-Barcode (string)</li></ul></li><li>`categories` – Produktkategorien (array) mit `id`, `name` und `parent`-ID.</li><li>`params` – Parameterinformationen. Jedes Objekt enthält `key` (string) und `values` (array).</li></ul> |
| `products_total` | number | Gesamtanzahl der Produkte. |
| `search_query` | string | Suchanfrage. |


## OpenAPI

````yaml product-recommendation.api.json GET /search
openapi: 3.1.0
info:
  title: Kameleoon Product Recommendation API
  version: 1.0.0
  description: >-
    REST API for importing product, category, and order data into Kameleoon,
    initializing recommendation sessions, and retrieving product
    recommendations, collections, and search results.
servers:
  - url: https://api.products.kameleoon.com
security: []
paths:
  /search:
    get:
      tags:
        - Search
      summary: Retrieve search results
      description: >-
        Query the Kameleoon Search service to retrieve instant (typeahead) or
        full product search results based on user input. Both search types use
        this endpoint; use the `type` parameter to specify which one. Use the
        additional query parameters only with full search (`type=full_search`).
      operationId: retrieveSearchResults
      parameters:
        - name: did
          in: query
          required: true
          schema:
            type: string
          description: >-
            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."
        - name: sid
          in: query
          required: true
          schema:
            type: string
          description: >-
            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."
        - name: shop_id
          in: query
          required: true
          schema:
            type: string
          description: >-
            Store Key. Find this in **Recommendations** > **Settings** > **Store
            settings** in the Kameleoon app. Contact your Customer Success
            Manager for the key if necessary.
        - name: type
          in: query
          required: true
          schema:
            type: string
            enum:
              - instant_search
              - full_search
          description: Specifies the search type.
        - name: search_query
          in: query
          required: true
          schema:
            type: string
          description: Current search query.
        - name: locations
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
          description: Comma-separated list of location IDs.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
          description: Maximum number of results the API returns. Full search only.
        - name: offset
          in: query
          required: false
          schema:
            type: integer
          description: Result offset. Full search only.
        - name: category_limit
          in: query
          required: false
          schema:
            type: integer
          description: >-
            Maximum number of categories for the sidebar filter. Full search
            only.
        - name: categories
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
          description: Comma-separated list of categories for filtering. Full search only.
        - name: extended
          in: query
          required: false
          schema:
            type: integer
          description: >-
            Adds extended information for product results. Supported values: `1`
            or empty. Kameleoon recommends setting this to `1` for full search.
        - name: sort_by
          in: query
          required: false
          schema:
            type: string
            enum:
              - popular
              - price
              - discount
              - sales_rate
              - date
          description: Sorting parameter. Full search only.
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
          description: Sort direction. Full search only. Default is `desc`.
        - name: brands
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
          description: Comma-separated list of brands for filtering. Full search only.
        - name: filters
          in: query
          required: false
          schema:
            type: string
          description: >-
            Escaped JSON string with filter parameters. Full search only.
            Example: `{"bluetooth":["yes"],"offers":["15%
            cashback"],"weight":["1.6"]}`
        - name: price_min
          in: query
          required: false
          schema:
            type: integer
          description: Minimum price. Full search only.
        - name: price_max
          in: query
          required: false
          schema:
            type: integer
          description: Maximum price. Full search only.
        - name: colors
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
          description: Comma-separated list of colors. Full search only.
        - name: exclude
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
          description: >-
            Comma-separated list of product IDs to exclude from search results.
            Full search only.
      responses:
        '200':
          description: >-
            Matching products for the search query. Verified against a live
            response on 2026-09-24. The exact response shape depends on `type`:
            instant search additionally returns `queries`, and full search
            additionally returns `brands`, `price_ranges`, `price_median`, and
            (with `extended=1`) `industrial_filters`.
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Response shape verified against a live response on 2026-09-24.
                  Fields kept from the original reference but not observed in
                  that sample (`search_query_redirects`) may still appear
                  conditionally. `queries` was observed for instant search;
                  `industrial_filters` was observed for full search with
                  `extended=1`.
                properties:
                  search_query:
                    type: string
                    description: The search query, as processed by Kameleoon.
                  search_query_original:
                    type: string
                    description: The search query exactly as submitted.
                  collections:
                    type: array
                    items:
                      type: object
                    description: Matching product collections, if any.
                  categories:
                    type: array
                    items:
                      type: object
                      description: >-
                        A top-level facet category, as returned in the
                        response's own `categories` array (distinct from the
                        `categories` array nested inside each product).
                      properties:
                        id:
                          type: string
                          description: Category ID.
                        name:
                          type: string
                          description: Category name.
                        url:
                          type: string
                          description: Category URL.
                        url_handle:
                          type: string
                          description: Path to the category.
                        count:
                          type: number
                          description: Number of products in the category.
                        parent:
                          type: string
                          description: >-
                            Parent category ID. Not observed in the live sample;
                            kept from the original reference.
                        alias:
                          type: string
                          description: >-
                            Alternate category name. Not observed in the live
                            sample; kept from the original reference.
                    description: Category facet information.
                  filters:
                    type: object
                    description: >-
                      A map of filter name (for example, "Color", "Size") to
                      that filter's aggregation. Verified against a live
                      response on 2026-09-24; the original reference documented
                      `filters` as an array, but the API actually returns an
                      object keyed by filter name.
                    additionalProperties:
                      type: object
                      properties:
                        count:
                          type: integer
                          description: Total count of products matching this filter.
                        values:
                          type: object
                          description: >-
                            Map of value label to the count of matching products
                            (for example, `{"black": 25, "white": 17}`). For
                            numeric filters this may instead be an array of the
                            raw values.
                        ranges:
                          type: object
                          properties:
                            min:
                              type: number
                              description: Lowest value observed for this filter.
                            max:
                              type: number
                              description: Highest value observed for this filter.
                          description: Present for numeric filters (for example, Size).
                  html:
                    type: string
                    description: >-
                      HTML code for the product block. Customize the template in
                      the Kameleoon personal account.
                  price_range:
                    type: object
                    properties:
                      min:
                        type: number
                        description: Minimum price.
                      max:
                        type: number
                        description: Maximum price.
                  price_ranges:
                    type: array
                    items:
                      type: object
                      properties:
                        from:
                          type: number
                        to:
                          type: number
                        count:
                          type: integer
                    description: >-
                      Distribution of products across price ranges. Full search
                      only.
                  price_median:
                    type: number
                    description: Median product price. Full search only.
                  products:
                    type: array
                    items:
                      type: object
                      description: >-
                        A single product result. Confirmed identical in shape
                        across GET /products and GET /search against a live
                        response on 2026-09-24.
                      properties:
                        name:
                          type: string
                          description: Product name.
                        url:
                          type: string
                          description: Product URL.
                        url_handle:
                          type: string
                          description: Relative path to the product page.
                        category_ids:
                          type: array
                          items:
                            type: string
                          description: IDs of categories for the product.
                        categories:
                          type: array
                          items:
                            type: object
                            description: >-
                              A category associated with a single product, as
                              returned inside a product's own `categories`
                              array. Verified against a live response on
                              2026-09-24.
                            properties:
                              id:
                                type: string
                                description: Category ID.
                              url:
                                type: string
                                description: Category URL.
                              name:
                                type: string
                                description: Category name.
                              level:
                                type: string
                                description: >-
                                  Category depth (for example, "1" = top-level,
                                  "2" = subcategory).
                              url_handle:
                                type: string
                                description: Relative path to the category.
                          description: Categories associated with the product.
                        barcode:
                          type: string
                          description: Product barcode.
                        vendor_code:
                          type: string
                          description: Vendor or brand code.
                        brand:
                          type: string
                          description: Product brand.
                        leftovers:
                          type: string
                          description: Stock type indicator (for example, "lot", "few").
                        rating:
                          type: number
                          description: Product rating.
                        fashion_feature:
                          type: string
                          description: >-
                            Fashion category feature (for example, "child",
                            "adult").
                        fashion_gender:
                          type: string
                          description: Product gender designation (for example, "m").
                        fashion_wear_type:
                          type: string
                          description: >-
                            Type of fashion item (for example, "shoe",
                            "tshirt").
                        fashion_sizes:
                          type: array
                          items:
                            type: string
                          description: Available sizes for the product.
                        fashion_original_sizes:
                          type: array
                          items:
                            type: string
                          description: Original (unnormalized) available sizes.
                        fashion_colors:
                          type: array
                          items:
                            type: string
                          description: Available color(s) for the product.
                        picture:
                          type: string
                          description: Product picture URL in Kameleoon storage.
                        price_formatted:
                          type: string
                          description: Product price formatted with currency.
                        price_full_formatted:
                          type: string
                          description: >-
                            Full (pre-discount) product price formatted with
                            currency.
                        price:
                          type: number
                          description: Product price.
                        price_full:
                          type: number
                          description: Full (pre-discount) product price.
                        image_url:
                          type: string
                          description: >-
                            URL to the original product image. The original
                            reference documented this as `image_URL`; the live
                            API returns lowercase `image_url`.
                        image_url_handle:
                          type: string
                          description: Relative path to the product image.
                        image_url_resized:
                          type: object
                          description: >-
                            Map of pixel size (and "original") to a resized
                            image URL.
                        currency:
                          type: string
                          description: Product currency.
                        _id:
                          type: string
                          description: Internal unique identifier.
                        id:
                          type: string
                          description: Product ID.
                        stock_quantity:
                          type: integer
                          description: Available stock quantity.
                        params:
                          type: array
                          items:
                            type: object
                            properties:
                              key:
                                type: string
                                description: Parameter name.
                              values:
                                type: array
                                items:
                                  type: string
                                description: Parameter values.
                          description: >-
                            Key/value pairs representing product attributes (for
                            example, size, color).
                        group_id:
                          type: string
                          description: Identifier for grouped products.
                        description:
                          type: string
                          description: >-
                            Product description. Not observed in the live
                            sample; kept from the original reference.
                        is_new:
                          type: boolean
                          description: >-
                            Whether the product is new. Not observed in the live
                            sample; kept from the original reference.
                        old_price:
                          type: string
                          description: >-
                            Product's previous price. Not observed in the live
                            sample; kept from the original reference.
                        sales_rate:
                          type: integer
                          description: >-
                            Number of units sold. Not observed in the live
                            sample; kept from the original reference.
                        relative_sales_rate:
                          type: integer
                          description: >-
                            Share of sales as a percentage. Not observed in the
                            live sample; kept from the original reference.
                    description: Matching products.
                  products_total:
                    type: number
                    description: Total number of matching products.
                  search_query_redirects:
                    type: array
                    items:
                      type: object
                      properties:
                        query:
                          type: string
                          description: Search query.
                        redirect_link:
                          type: string
                          description: URL for redirection.
                        deep_link:
                          type: string
                          description: URL for mobile apps.
                    description: >-
                      Redirect information, when a matching redirect rule is
                      configured. Not observed in the live sample; kept from the
                      original reference.
                  brands:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          description: Brand name.
                        picture:
                          type: string
                          description: >-
                            Brand picture URL. Not observed in the live sample;
                            kept from the original reference.
                        count:
                          type: integer
                          description: Number of matching products.
                    description: Brand facet information. Full search only.
                  clarification:
                    type: boolean
                    description: >-
                      Whether Kameleoon is asking for query clarification (for
                      example, offering suggested queries) rather than returning
                      a confident result set.
                  requests_count:
                    type: integer
                    description: >-
                      Number of search requests counted for this query in the
                      current session.
                  queries:
                    type: array
                    items:
                      type: object
                      description: >-
                        A suggested/corrected query, returned by instant search
                        when the input query doesn't match well.
                      properties:
                        name:
                          type: string
                          description: Suggested query text.
                        url:
                          type: string
                          description: URL to run this suggested query.
                        url_handle:
                          type: string
                          description: Relative path to run this suggested query.
                        score:
                          type: number
                          description: Relevance score for this suggestion.
                    description: Suggested/corrected queries. Instant search only.
                  industrial_filters:
                    type: object
                    description: >-
                      Aggregated fashion-specific filter facets. Full search
                      only, returned when `extended=1`.
                    properties:
                      fashion_sizes:
                        type: array
                        items:
                          type: object
                          properties:
                            size:
                              type: string
                            count:
                              type: integer
                        description: Available sizes and their match counts.
                      colors:
                        type: array
                        items:
                          type: object
                          properties:
                            color:
                              type: string
                            count:
                              type: integer
                        description: Available colors and their match counts.

````