---
title: "Search for products"
url: "https://developer-qual.migros.ch/apis/public-products-1/versions/a135b3bb-5060-472d-a16b-a7fe8dff86c1/operations/get-products"
---

> Full API specification: https://developer-qual.migros.ch/apis/public-products-1/versions/a135b3bb-5060-472d-a16b-a7fe8dff86c1.md

# Search for products

`GET` `/migros/products/v1/public/products`

Operation ID: `get-products`

This endpoint allows to list products via a variaty of query parameters. It provides a simplified interface and a simplified response model compared to /migros/products/v8/products suitable for public sonsumption. Currently this endpoint serves data from the "MAPI v8".

## Query parameters

- `search` (string, optional) - Simple search string which is fault-tolerant for user-entered text.
- `limit` (integer, optional) - Maximum number of results (max 2000).
- `offset` (integer, optional) - Result set offset.
- `sort` (string, optional) - The sorting criteria.
- `order` (string, optional) - The ordering direction.
- `roots` (string, optional) - When sorting by category the sorting will be done by the children of the categories passed in this parameter. For each product the first category matching from the bottom will be taken. The following two formats are valid for this parameter: ?roots=code1,code2 or ?roots[]=code1&roots[]=code2.
- `region` (string, optional) - Get the price for this region. Output in the 'price' field and used for sorting by price. If you specify 'all', prices for all regions are additionally output in 'regional_information'.
- `discounts` (string, optional) - Return only products which belong to the specified discounts. This filter respects the region parameter, so the discount has be in the given region or national. Note: A discount sometimes applies to many products, you need to do paging in case the limit is hit (see limit parameter).
- `discount_campaigns` (string, optional) - Return only products which belong to the specified discount campaign. This will also return the specific discount on the product.
- `discount_events` (string, optional) - Return only products which belong to the specified discount event. This will also return the specific discount on the product.
- `store` (string, optional) - A single store id. If set, the result is limited to products available at that store.
- `ids` (string, optional) - A comma separated list or an array of product IDs defining the products and the order in which the products should be returned. If the ids parameter is provided all other filtering parameters are ignored.
- `boss_number_prefixes` (string, optional) - A comma separated list of boss_numbers prefixes to filter products for.
- `view` (string, optional) - Return specific set of products. Either 'all' (active and inactive/incomplete products), 'browse' (active products excluding Alnatura products), or 'browseallretailers' (active products including Alnatura products).
- `is_variant` (boolean, optional) - Whether to output products that are variants. If this parameter is omitted, variants and base products are returned.
- `lang` (string, optional) - Request the response localized to lang.

## Responses

- `200` - Prodcts selected by the given query parameters.
- `default` - Standard HTTP semantics, no machine interpretable data in the body. (HTTP headers may contains relevant data based on the returned status code.) Some - 400: Your request is faulty, re-doing the same request is pointless. - 401: Your API Key is wrong or you did not send one at all. - 500: Unspecific server problem. - 502: Upstream call to MAPI failed. - 503: Circuit Breaker is open, try again after some time.

## OpenAPI definition

```yaml
openapi: 3.0.1
info:
  title: Public Products
  version: 1.3.0-beta.1
servers:
  - description: URL of upstream
    url: https://api-qual.migros.ch
paths:
  /migros/products/v1/public/products:
    get:
      description: >-
        This endpoint allows to list products via a variaty of query parameters.
        It provides a simplified interface and a simplified response model
        compared to /migros/products/v8/products suitable for public
        sonsumption.


        Currently this endpoint serves data from the "MAPI v8".
      operationId: get-products
      parameters:
        - $ref: "#/components/parameters/search"
        - $ref: "#/components/parameters/limit"
        - $ref: "#/components/parameters/offset"
        - $ref: "#/components/parameters/sort"
        - $ref: "#/components/parameters/order"
        - $ref: "#/components/parameters/roots"
        - $ref: "#/components/parameters/region"
        - description: >-
            Return only products which belong to the specified discounts.


            This filter respects the region parameter, so the discount has be in
            the given region or national.

            Note: A discount sometimes applies to many products, you need to do
            paging in case the limit is hit (see limit parameter).
          in: query
          name: discounts
          schema:
            type: string
        - description: Return only products which belong to the specified discount
            campaign. This will also return the specific discount on the
            product.
          in: query
          name: discount_campaigns
          schema:
            type: string
        - description: Return only products which belong to the specified discount event.
            This will also return the specific discount on the product.
          in: query
          name: discount_events
          schema:
            type: string
        - description: A single store id. If set, the result is limited to products
            available at that store.
          in: query
          name: store
          schema:
            type: string
        - description: A comma separated list or an array of product IDs defining the
            products and the order in which the products should be returned. If
            the ids parameter is provided all other filtering parameters are
            ignored.
          in: query
          name: ids
          schema:
            type: string
        - description: A comma separated list of boss_numbers prefixes to filter products
            for.
          in: query
          name: boss_number_prefixes
          schema:
            type: string
        - description: Return specific set of products. Either 'all' (active and
            inactive/incomplete products), 'browse' (active products excluding
            Alnatura products), or 'browseallretailers' (active products
            including Alnatura products).
          in: query
          name: view
          schema:
            default: browse
            enum:
              - all
              - browse
              - browseallretailers
            type: string
        - description: Whether to output products that are variants. If this parameter is
            omitted, variants and base products are returned.
          in: query
          name: is_variant
          schema:
            type: boolean
        - description: Request the response localized to lang.
          in: query
          name: lang
          schema:
            default: de
            enum:
              - de
              - fr
              - it
              - en
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductCollection"
          description: Prodcts selected by the given query parameters.
        default:
          content:
            text/plain:
              schema:
                type: string
          description: >-
            Standard HTTP semantics, no machine interpretable data in the body.
            (HTTP headers may contains relevant data based on the returned
            status code.)

            Some 
             - 400: Your request is faulty, re-doing the same request is pointless.
             - 401: Your API Key is wrong or you did not send one at all.
             - 500: Unspecific server problem.
             - 502: Upstream call to MAPI failed.
             - 503: Circuit Breaker is open, try again after some time.
      summary: Search for products
      tags:
        - Public-Products
security:
  - Kong-Api-Key: []
components:
  parameters:
    search:
      description: Simple search string which is fault-tolerant for user-entered text.
      in: query
      name: search
      required: false
      schema:
        type: string
    limit:
      description: Maximum number of results (max 2000).
      in: query
      name: limit
      required: false
      schema:
        default: 10
        maximum: 200
        minimum: 1
        type: integer
    offset:
      description: Result set offset.
      in: query
      name: offset
      required: false
      schema:
        default: 0
        minimum: 0
        type: integer
    sort:
      description: The sorting criteria.
      in: query
      name: sort
      required: false
      schema:
        default: score
        enum:
          - score
          - price
          - category
          - id
          - name
          - rating
          - rating_rounded
          - rating_rounded_tenth
          - reviews
          - updated_at
          - boss_number
          - brand_name
          - pim_status
        type: string
    order:
      description: The ordering direction.
      in: query
      name: order
      schema:
        default: asc
        enum:
          - asc
          - desc
        type: string
    roots:
      description: "When sorting by category the sorting will be done by the children
        of the categories passed in this parameter. For each product the first
        category matching from the bottom will be taken. The following two
        formats are valid for this parameter: ?roots=code1,code2 or
        ?roots[]=code1&roots[]=code2."
      in: query
      name: roots
      schema:
        type: string
    region:
      description: Get the price for this region. Output in the 'price' field and used
        for sorting by price. If you specify 'all', prices for all regions are
        additionally output in 'regional_information'.
      in: query
      name: region
      schema:
        default: national
        enum:
          - national
          - gmaa
          - gmbs
          - gmge
          - gmlu
          - gmnf
          - gmos
          - gmti
          - gmvd
          - gmvs
          - gmzh
          - all
        type: string
  schemas:
    ProductCollection:
      description: A list of Products
      properties:
        products:
          items:
            $ref: "#/components/schemas/Product"
          type: array
        total_hits:
          description: >-
            The total hits may exceed the actual count of results in the
            collection.


            It represents the total number of results of a search and not only
            the potentially paginated subset.
          type: integer
      required:
        - total_hits
        - products
      type: object
    Product:
      description: Represents a product in the API.
      properties:
        boss_number:
          description: Product 'boss number'. It is represented as string because the
            number can have leading zeros.
          type: string
        brand:
          $ref: "#/components/schemas/Brand"
        categories:
          description: Hierarchy/breadcrumb of main category. The first element is the
            leaf category and the last one the root.
          items:
            $ref: "#/components/schemas/Category"
          type: array
        energy_efficiency:
          $ref: "#/components/schemas/EnergyEfficiency"
        id:
          type: string
        image:
          description: Main product image (Rokka stack URL template).
          type: string
        image_transparent:
          description: Main product image, transparent (Rokka stack URL template).
          type: string
        links:
          additionalProperties:
            $ref: "#/components/schemas/Link"
          type: object
        name:
          type: string
        price:
          $ref: "#/components/schemas/ProductPrice"
        ratings:
          $ref: "#/components/schemas/ItemRatings"
        slug:
          description: Unique user-friendly ID.
          type: string
      required:
        - id
        - name
        - boss_number
        - slug
    Brand:
      description: Represents the Brand information.
      properties:
        description:
          description: The long description of the brand (can contain HTML).
          type: string
        id:
          type: string
        image:
          description: (Rokka stack URL template)
          type: string
        links:
          additionalProperties:
            $ref: "#/components/schemas/Link"
          description: Collection of links indexed by string identifier.
          type: object
        name:
          type: string
        parent_brand:
          $ref: "#/components/schemas/PartialBrand"
        slug:
          description: Unique user-friendly ID.
          type: string
        sub_brand:
          $ref: "#/components/schemas/PartialBrand"
      required:
        - id
        - name
        - slug
      type: object
    Category:
      description: Represents the category basic information.
      properties:
        abstract:
          description: A short, plain text description, e.g. suitable for the page meta
            element.
          type: string
        code:
          description: ID of the category.
          type: string
        headline:
          description: The caption to the description.
          type: string
        image:
          description: Image of the category.
          type: string
        keywords:
          description: Keywords, e.g. suitable for the page meta element.
          items:
            type: string
          type: array
        level:
          type: integer
        name:
          type: string
        parent_code:
          description: Parent category ID.
          type: string
        slug:
          description: Unique user-friendly ID.
          type: string
        title:
          description: The title, e.g. suitable for the page title element.
          type: string
        visible:
          type: boolean
      required:
        - code
        - name
        - slug
      type: object
    EnergyEfficiency:
      description: Represents information about energy efficiency in the API.
      properties:
        arrow:
          description: (Rokka stack URL template)
          type: string
        arrow_alternative:
          description: (Rokka stack URL template)
          type: string
        category_code:
          description: Energy efficiency label which contains details about the energy
            efficiency of the product.
          type: string
        class:
          $ref: "#/components/schemas/EnergyEfficiencyClass"
        image:
          description: (Rokka stack URL template)
          type: string
      required:
        - class
      type: object
    Link:
      properties:
        canonical:
          description: Canonical link to the product on the third-party website.
          type: string
        url:
          description: URL to a third-party desktop page of the product.
          type: string
      type: object
    ProductPrice:
      description: Price. It is complicated.
      properties:
        base:
          $ref: "#/components/schemas/PriceQuantityUnit"
        currency:
          type: string
        discount:
          $ref: "#/components/schemas/Discount"
        discount_hint:
          type: string
        estimated_piece_original_price:
          description: The estimated original price of a piece, without discount.
          format: float
          type: number
        estimated_piece_price:
          description: >-
            The estimated price of a piece.


            Some products that are usually sold by weight (fruit, vegetables,
            meat). This value is the estimated price based on the average weight
            of one piece.
          format: float
          type: number
        estimated_piece_weight:
          description: |-
            The estimated weight of a piece (in grams).

            The average weight that the estimated piece price is calculated on.
          format: float
          type: number
        item:
          $ref: "#/components/schemas/PriceQuantityUnit"
        no_price_hint:
          description: The price hint if no price is set.
          type: string
        source:
          type: string
        valid_from:
          format: date-time
          type: string
        valid_to:
          format: date-time
          type: string
      required:
        - valid_from
        - valid_to
      type: object
    ItemRatings:
      description: Represents the ratings of an item, e.g. product.
      properties:
        average_all:
          format: float
          type: number
        count_all:
          description: Average rating.
          type: integer
      required:
        - count_all
        - average_all
      type: object
    PartialBrand:
      description: Represents the sub brand and parent brand information.
      properties:
        code:
          type: string
        name:
          type: string
      type: object
    EnergyEfficiencyClass:
      properties:
        text:
          description: The hexadecimal color code of the energy efficiency class to create
            your own arrows.
          type: string
      required:
        - text
      type: object
    PriceQuantityUnit:
      description: Represents the current price and quantity (within a region).
      properties:
        display_quantity:
          description: The quantity and unit to display in the frontend.
          type: string
        original_price:
          description: The original price if price is the discounted value.
          format: float
          type: number
        price:
          description: The price.
          format: float
          type: number
        quantity:
          description: The quantity the price is based on.
          format: float
          type: number
        unit:
          description: The price unit.
          type: string
        varying_quantity:
          description: Whether the quantity is flexible or fixed.
          type: boolean
      type: object
    Discount:
      description: Represents the Discount information.
      properties:
        additional_description:
          description: Description text for a discount, e.g. "Zucht aus Dänemark"
          type: string
        additional_text:
          description: Additional information about the discount.
          example: in Selbstbedienung und Bedienung
          type: string
        advertisement_type_id:
          description: >-
            ID of how to advertise this discount.


            An example usage is to distinguish if the price or the percentage
            should be promoted more.
          type: string
        badge:
          $ref: "#/components/schemas/Badge"
        boss_number:
          description: The BoSS number.
          type: string
        campaign_ids:
          description: List of campaign ID's this discount is in. These campaign ID's are
            delivered by the M-Promo system, used for promotions.
          items:
            type: string
          type: array
        channel:
          type: string
        collective_discount:
          description: Collective discount (Sammelaktion).
          type: boolean
        conditions:
          $ref: "#/components/schemas/DiscountConditions"
        cooperative:
          description: Cooperative which created this discount. "Erfassergruppe"
          type: string
        cumulus_points:
          $ref: "#/components/schemas/DiscountCumulusPoints"
        description:
          description: May contain HTML tags.
          type: string
        disclaimer:
          type: string
        discount_amount:
          type: string
        discount_events:
          description: List of events this discount is in. These events are created in the
            M-Promo system, used for promotions.
          items:
            $ref: "#/components/schemas/DiscountEvent"
          type: array
        discount_hint:
          description: May contain HTML tags.
          type: string
        discount_regions:
          description: List of regions in which the discount is valid in.
          items:
            type: string
          type: array
        discount_role_id:
          description: Discount role id.
          type: string
        discount_role_label:
          description: Discount role label.
          type: string
        discount_type:
          description: 'Discount type: "neuheit" or "aktion".'
          enum:
            - neuheit
            - aktion
          type: string
        discount_type_id:
          description: Discount type id.
          type: string
        discount_type_label:
          description: Label for discount type id.
          type: string
        end_date:
          format: date-time
          type: string
        example_text:
          description: Information text about an example product of a discount for
            multiple products.
          example: Wildfang aus dem Nordostatlantik
          type: string
        example_unit:
          description: >-
            Information about the unit of the package of an example product of a
            discount for multiple products.


            The 'unit' (see field above) is used for discounts for one specific
            product. The 'exampleUnit' is used for discounts for multiple
            products. Only one of the two fields contains a value.
          example: 16 Stück 216 g
          type: string
        high_performer:
          description: High performing discount.
          type: boolean
        id:
          description: Pex discounts do not have an id, so this field has to be optional.
          type: string
        image:
          description: Image (Rokka stack URL template).
          type: string
        image_transparent:
          description: Image with transparent background (Rokka stack URL template).
          type: string
        instead_of:
          type: string
        location_planning_type:
          description: Location planning type. "Planungsart" on M-Promo. Usually either
            "national" or "regional" or "lokal".
          example: regional
          type: string
        logo:
          description: (Rokka stack URL template).
          type: string
        newsletter_image:
          type: string
        organisation:
          description: smvm, fm...
          type: string
        original_price:
          description: The original price.
          format: float
          type: number
        package_description:
          description: Information about the package.
          example: Im Duo-Pack
          type: string
        price:
          description: The discounted price.
          format: float
          type: number
        profit:
          type: integer
        publication_date:
          description: Publication date of the discount.
          format: date-time
          type: string
        reduction:
          $ref: "#/components/schemas/DiscountReduction"
        reduction_type_id:
          description: |-
            The reduction type id of the discount.


             - 01: Relativer Rabatt
             - 02: Absoluter Rabatt
             - 03: X für Y
             - 04: Absolute CUMULUS Punkte
             - 05: X-Fach Punkte
             - 06: Rabattpreis = CHF
             - 07: HIT
             - 08 Preisabschlag
          type: string
        reference_product_id:
          description: ID of the reference product of this discount.
          type: string
        region:
          description: The region (Migros Genossenschaft).
          type: string
        secondary_image:
          description: (Rokka stack URL template).
          type: string
        secondary_logo:
          description: (Rokka stack URL template).
          type: string
        source:
          type: string
        special_advertisement:
          description: Whether or not it's a "Zusatzauslobung".
          type: boolean
        start_date:
          format: date-time
          type: string
        tags:
          description: Tags for flagging certain discounts.
          items:
            type: string
          type: array
        unit:
          description: Information about the unit of the sold package.
          example: Mödeli, 4 x 250 g
          type: string
        visibility:
          description: Whether the discount visibility is overridden, can be 'blacklist'
            or 'whitelist'.
          type: string
      required:
        - id
      type: object
    Badge:
      allOf:
        - $ref: "#/components/schemas/BadgeSignet"
        - properties:
            description:
              type: string
            signet:
              $ref: "#/components/schemas/BadgeSignet"
          type: object
      description: A badge image and its properties.
      type: object
    DiscountConditions:
      properties:
        minimum_pieces:
          $ref: "#/components/schemas/DiscountConditionsMinimumPieces"
        minimum_purchase_price:
          example: 10
          format: float
          type: number
      type: object
    DiscountCumulusPoints:
      properties:
        relative:
          type: boolean
        value:
          example: 20
          type: integer
      required:
        - value
        - relative
      type: object
    DiscountEvent:
      description: >-
        Represents a discount event on a discount. These events are created in
        the M-Promo system, used for promotions.


        The product_ids are only available on stand alone discount events, if
        there are any specified.


        The discount_id and campaign_id are only set on stand alone discount
        events. When it is nested inside a discount, refer to the containing
        object to find the id and campaign ids.
      properties:
        advertising_material_id:
          description: The id of the advertising material. "Werbemittel".
          type: string
        advertising_material_type_id:
          description: The id of the advertising material type. "Werbemittelart".
          type: string
        campaign_ids:
          description: Campaigns of the discount that contains this event.
          items:
            type: string
          type: array
        discount_id:
          description: The id of the discount this event is part of.
          type: string
        end_date:
          description: When the event ends.
          format: date-time
          type: string
        event_id:
          description: The id of the event.
          type: string
        product_ids:
          description: List of product ids this event applies to.
          items:
            type: string
          type: array
        publication_date:
          description: >-
            When the event was published online.


            The API does not output events when the publication date is in the
            future.
          format: date-time
          type: string
        start_date:
          description: When the event starts.
          format: date-time
          type: string
      required:
        - event_id
        - advertising_material_type_id
        - advertising_material_id
        - start_date
        - end_date
        - publication_date
      type: object
    DiscountReduction:
      properties:
        amount:
          example: 32.5
          format: float
          type: number
        relative:
          type: boolean
        suffix:
          example: günstiger
          type: string
        unit:
          example: "%"
          type: string
      required:
        - amount
        - relative
      type: object
    BadgeSignet:
      description: A badge signet and its properties.
      properties:
        hex_color:
          description: The hexadecimal color code for this badge.
          type: string
        stack:
          description: Image URL with a placeholder for a Rokka {stack}.
          type: string
        vector:
          description: Vector image.
          type: string
      type: object
    DiscountConditionsMinimumPieces:
      properties:
        prefix:
          example: ab
          type: string
        value:
          example: 2
          type: integer
      required:
        - value
        - prefix
      type: object
  securitySchemes:
    Kong-Api-Key:
      description: Kong key-auth authentication
      in: header
      name: X-Api-Key
      type: apiKey
```
