---
title: "Returns autocomplete suggestions for a given text."
url: "https://developer.migros.ch/apis/suggestions-8/versions/c7462ef4-9e4d-4a55-a0db-7b49f6acfa8f/operations/get-suggestions"
---

> Full API specification: https://developer.migros.ch/apis/suggestions-8/versions/c7462ef4-9e4d-4a55-a0db-7b49f6acfa8f.md

# Returns autocomplete suggestions for a given text.

`GET` `/migros/products/v8/suggestions`

Operation ID: `get-suggestions`

Returns autocomplete suggestions for a given text.

## Query parameters

- `text` (string, required) - Search text.
- `verbosity` (string, optional) - Verbosity of output. If not specified, outputs limited information. 'full' outputs more information on each individual item.
- `retailer` (string, optional) - Filter suggestions associated with a certain retailer, e.g. brands that have visible products in this retailer.
- `limit` (integer, optional) - Maximum number of results (max 2000).
- `offset` (integer, optional) - Result set offset.
- `lang` (string, optional) - Defines the language (de/fr/it/en) for this request as query parameter. Either use the query param "lang" or header "Accept-Language", not both.

## Header parameters

- `Accept-Language` (string, optional) - Defines the language (de/fr/it/en) for this request as request header. Either use the query param "lang" or header "Accept-Language", not both.

## Responses

- `200` - Returned when successful
- `400` - If the request parameters are invalid.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Suggestions
  version: "8"
servers:
  - description: Public Kong Gateway URL
    url: https://api.migros.ch
paths:
  /migros/products/v8/suggestions:
    get:
      description: Returns autocomplete suggestions for a given text.
      operationId: get-suggestions
      parameters:
        - description: Search text.
          in: query
          name: text
          required: true
          schema:
            type: string
        - description: Verbosity of output. If not specified, outputs limited information.
            'full' outputs more information on each individual item.
          in: query
          name: verbosity
          schema:
            enum:
              - list
              - full
            type: string
        - description: Filter suggestions associated with a certain retailer, e.g. brands
            that have visible products in this retailer.
          in: query
          name: retailer
          schema:
            enum:
              - alnatura
              - bikeworld
              - doitgarden
              - interio
              - leshop
              - melectronics
              - mfo
              - micasa
              - migros_ch
              - mservice
              - sportxx
              - supermarkt
            type: string
        - $ref: "#/components/parameters/limit"
        - $ref: "#/components/parameters/offset"
        - $ref: "#/components/parameters/lang"
        - $ref: "#/components/parameters/Accept-Language"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SuggestionCollection"
          description: Returned when successful
        "400":
          $ref: "#/components/responses/400"
      summary: Returns autocomplete suggestions for a given text.
      tags:
        - Suggestions
security:
  - Kong-Api-Key: []
    basicAuth: []
components:
  parameters:
    limit:
      description: Maximum number of results (max 2000).
      in: query
      name: limit
      required: false
      schema:
        default: 10
        maximum: 2000
        minimum: 0
        type: integer
    offset:
      description: Result set offset.
      in: query
      name: offset
      required: false
      schema:
        default: 0
        minimum: 0
        type: integer
    lang:
      description: Defines the language (de/fr/it/en) for this request as query
        parameter. Either use the query param "lang" or header
        "Accept-Language", not both.
      in: query
      name: lang
      schema:
        default: de
        enum:
          - de
          - fr
          - it
          - en
        type: string
    Accept-Language:
      description: Defines the language (de/fr/it/en) for this request as request
        header. Either use the query param "lang" or header "Accept-Language",
        not both.
      in: header
      name: Accept-Language
      schema:
        default: de
        enum:
          - de
          - fr
          - it
          - en
        type: string
  schemas:
    SuggestionCollection:
      allOf:
        - $ref: "#/components/schemas/AbstractSearchResultCollection"
        - properties:
            suggestions:
              items:
                $ref: "#/components/schemas/Suggestion"
              type: array
          type: object
      description: A collection of suggestion instances.
      required:
        - suggestions
        - total_hits
      type: object
    AbstractSearchResultCollection:
      allOf:
        - $ref: "#/components/schemas/AbstractCollection"
        - properties:
            ids:
              description: >-
                Ids only.


                Is filled instead of the usual property for content, with only
                the ids when a call is made with verbosity=id on a

                route that supports it.
              items:
                type: string
              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.
              nullable: true
              type: integer
          type: object
      description: A collection of search result instances.
      type: object
    Suggestion:
      properties:
        brand:
          nullable: true
          oneOf:
            - $ref: "#/components/schemas/Brand"
        category:
          nullable: true
          oneOf:
            - $ref: "#/components/schemas/Category"
        generic_product:
          nullable: true
          oneOf:
            - $ref: "#/components/schemas/GenericProduct"
        id:
          type: string
        label:
          nullable: true
          oneOf:
            - $ref: "#/components/schemas/Label"
        name:
          type: string
        tags:
          description: Tags for flagging certain suggestions.
          items:
            type: string
          nullable: true
          type: array
        type:
          description: The identifier belonging to the given type (brand, label etc). So
            the id is only unique within each type.
          enum:
            - genericproduct
            - brand
            - category
            - label
          type: string
      required:
        - id
        - name
        - type
      type: object
    AbstractCollection:
      description: A generic collection of elements.
    Brand:
      description: Represents the Brand information.
      properties:
        abstract:
          description: A short, plain text description, e.g. suitable for the page meta
            element.
          nullable: true
          type: string
        class_id:
          description: Brand class code.
          nullable: true
          type: string
        class_type:
          description: Brand class type.
          nullable: true
          type: string
        description:
          description: The long description of the brand (can contain HTML).
          nullable: true
          type: string
        headline:
          description: The caption to the description.
          nullable: true
          type: string
        id:
          type: string
        image:
          description: Image of the brand.
          nullable: true
          oneOf:
            - $ref: "#/components/schemas/Image"
        keywords:
          description: Keywords, e.g. suitable for the page meta element.
          items:
            type: string
          nullable: true
          type: array
        links:
          additionalProperties:
            $ref: "#/components/schemas/Link"
          description: Collection of links indexed by string identifier.
          type: object
        name:
          nullable: true
          type: string
        parent_brand:
          nullable: true
          oneOf:
            - $ref: "#/components/schemas/PartialBrand"
        position_for_product_title:
          description: Position of the brand short name for the product title
          nullable: true
          type: string
        short_name_for_product_title:
          description: Short name of brand for the product title
          nullable: true
          type: string
        slug:
          description: Unique user-friendly ID.
          type: string
        sub_brand:
          nullable: true
          oneOf:
            - $ref: "#/components/schemas/PartialBrand"
        tags:
          description: Tags for flagging certain brands.
          items:
            type: string
          nullable: true
          type: array
        title:
          description: The title, e.g. suitable for the page title element.
          nullable: true
          type: string
      required:
        - id
        - name
        - slug
      type: object
    Category:
      allOf:
        - $ref: "#/components/schemas/BaseCategory"
        - properties:
            ancestors:
              description: Collection of ancestor categories.
              items:
                $ref: "#/components/schemas/BaseCategory"
              nullable: true
              type: array
            children:
              description: >-
                Collection of child categories.


                Children include only direct children (categories of the next
                level).
              items:
                $ref: "#/components/schemas/BaseCategory"
              nullable: true
              type: array
            generic_products:
              description: >-
                List of generic product BoSS numbers.


                The BoSS number from the BoSS/BeSS mapping, so that the app can
                query for categories by BoSS number.
              items:
                type: string
              nullable: true
              type: array
            google_product_categories:
              description: |-
                List of google taxonomy IDs this category maps to.

                See https://support.google.com/merchants/answer/6324436?hl=en and https://www.google.com/basepages/producttype/taxonomy-with-ids.de-CH.txt
                It's based on the field "googletaxonomy" coming from PEx.
              items:
                type: string
              nullable: true
              type: array
            slugs:
              $ref: "#/components/schemas/Slugs"
            updated_at:
              description: >-
                Time when category was last indexed (or partially updated) with
                modifications in Elasticsearch.


                When a category did not change after mapping, it is not
                re-indexed and thus the timestamp is not updated as well.
              format: date-time
              nullable: true
              type: string
            visible_navigation:
              description: >-
                If set to false, the category should not be displayed in
                navigation, but may still be displayed in

                search suggestions or similiar (e.g. 'Fussball EM 2016').


                It's based on the same field coming from PEx.
              type: boolean
            visible_shop:
              description: >-
                If set to false, the category should not be displayed anywhere
                (e.g. 'Dienstleistungen').


                It's based on the same field coming from PEx.
              type: boolean
          type: object
      description: Represents the category information including its ancestors and children.
      required:
        - code
        - name
        - slug
        - slugs
        - updated_at
      type: object
    GenericProduct:
      allOf:
        - $ref: "#/components/schemas/AbstractGenericProduct"
        - properties:
            image:
              nullable: true
              oneOf:
                - $ref: "#/components/schemas/Image"
            name:
              type: string
            synonyms:
              items:
                type: string
              type: array
          type: object
      required:
        - id
        - name
        - category_code
      type: object
    Label:
      description: Represents the Label information in the Product.
      properties:
        abstract:
          description: A short, plain text description, e.g. suitable for the page meta
            element.
          nullable: true
          type: string
        description:
          description: The long description of the label (can contain HTML).
          nullable: true
          type: string
        headline:
          description: The caption to the description.
          nullable: true
          type: string
        id:
          description: ID of the label.
          type: string
        image:
          description: Image of the label.
          nullable: true
          oneOf:
            - $ref: "#/components/schemas/Image"
        keywords:
          description: Keywords, e.g. suitable for the page meta element.
          items:
            type: string
          nullable: true
          type: array
        links:
          additionalProperties:
            $ref: "#/components/schemas/Link"
          description: Collection of links indexed by string identifier.
          type: object
        name:
          description: Name of the label.
          type: string
        position_for_product_title:
          description: Position of label short name for the product title
          nullable: true
          type: string
        short_name_for_product_title:
          description: Short name of label for the product title
          nullable: true
          type: string
        slug:
          description: Unique user-friendly ID.
          type: string
        tags:
          description: Tags for flagging certain labels.
          items:
            type: string
          nullable: true
          type: array
        title:
          description: The title, e.g. suitable for the page title element.
          nullable: true
          type: string
      required:
        - id
        - name
        - slug
      type: object
    Image:
      description: An image and its properties.
      properties:
        code:
          deprecated: true
          description: Code for the image, useful for pictograms.
          nullable: true
          type: string
        custom:
          deprecated: true
          description: Image URL with placeholders for {width} and {height}.
          type: string
        description:
          deprecated: true
          description: Image description, useful for example as alt attribute.
          nullable: true
          type: string
        end_date:
          deprecated: true
          description: End date of the validity.
          format: date-time
          nullable: true
          type: string
        hash:
          deprecated: true
          description: Sha1 hash of original image.
          nullable: true
          type: string
        original:
          deprecated: true
          description: Full size image.
          type: string
        source:
          deprecated: true
          description: Source where the image comes from originally.
          nullable: true
          type: string
        stack:
          deprecated: true
          description: Image URL with a placeholder for a Rokka {stack}.
          type: string
        start_date:
          deprecated: true
          description: Start date of the validity.
          format: date-time
          nullable: true
          type: string
        tags:
          deprecated: true
          items:
            type: string
          type: array
      type: object
    Link:
      properties:
        app_url:
          description: URL to a third-party mobile app (only provided on the migros_online
            link).
          nullable: true
          type: string
        canonical:
          description: Canonical link to the product on the third-party website.
          nullable: true
          type: string
        image:
          description: Associated logo.
          nullable: true
          oneOf:
            - $ref: "#/components/schemas/Image"
        mo_product_id:
          deprecated: true
          description: The migros online product id (only provided on the migros_online
            link).
          nullable: true
          type: string
        mobile_url:
          description: URL to a third-party mobile page of the product (optional).
          nullable: true
          type: string
        name:
          deprecated: true
          description: Human readable name of the third-party website (for example
            SportXX, micasa, Migipedia).
          nullable: true
          type: string
        purchasable:
          deprecated: true
          description: Whether this links leads to an onlineshop page where the product
            can be purchased.
          nullable: true
          type: boolean
        tablet_url:
          description: URL to a third-party tablet page of the product (optional).
          nullable: true
          type: string
        type:
          deprecated: true
          description: The link type, one of 'shop' and 'info'.
          nullable: true
          type: string
        url:
          description: URL to a third-party desktop page of the product.
          type: string
      type: object
    PartialBrand:
      description: Represents the sub brand and parent brand information.
      properties:
        code:
          type: string
        name:
          nullable: true
          type: string
      type: object
    BaseCategory:
      description: Represents the category basic information.
      properties:
        abstract:
          description: A short, plain text description, e.g. suitable for the page meta
            element.
          nullable: true
          type: string
        code:
          description: ID of the category.
          type: string
        headline:
          description: The caption to the description.
          nullable: true
          type: string
        image:
          description: Image of the category.
          nullable: true
          oneOf:
            - $ref: "#/components/schemas/Image"
        keywords:
          description: Keywords, e.g. suitable for the page meta element.
          items:
            type: string
          nullable: true
          type: array
        level:
          description: Category level.
          type: integer
        name:
          type: string
        parent_code:
          description: Parent category ID.
          nullable: true
          type: string
        slug:
          description: Unique user-friendly ID.
          type: string
        title:
          description: The title, e.g. suitable for the page title element.
          nullable: true
          type: string
        visible:
          description: Whether the category should be shown to users.
          type: boolean
      required:
        - code
        - name
        - slug
      type: object
    Slugs:
      description: Represents a list of multilingual slugs.
      properties:
        de:
          description: Slug in English.
          type: string
        en:
          type: string
        fr:
          type: string
        it:
          type: string
      required:
        - de
        - fr
        - it
        - en
      type: object
    AbstractGenericProduct:
      properties:
        category_code:
          type: string
        id:
          description: Whether or not a product should be shown in EKL search.
          type: integer
        show_in_ekl_search:
          type: boolean
      type: object
  responses:
    "400":
      description: If the request parameters are invalid.
  securitySchemes:
    Kong-Api-Key:
      description: Kong key-auth authentication
      in: header
      name: X-Api-Key
      type: apiKey
    basicAuth:
      scheme: basic
      type: http
```
