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

# Gets Suggested Search Terms 2

> Suggests possible search terms as the shopper enters search text. In Unified Commerce, a Suggest2 API exists that returns results based on the returnFields option defined in the search settings. The same request structure and response as documented here is supported by both the /suggest and /suggest2 API endpoints, so either one can be used for this purpose with the same data.



## OpenAPI

````yaml /openapi/openapi_catalog_storefront.json get /commerce/catalog/storefront/productsearch/suggest2
openapi: 3.0.1
info:
  description: |-
    <div id="overview_CATALOG_STOREFRONT">
                <h2>CATALOG STOREFRONT</h2>
                <p>The Catalog Storefront APIs are a collection of resources for managing storefront categories, currencies, price lists, products, and
                    product search. This controls how the products in your catalog are organized and displayed on the
                    storefront. See the
                    <a href="/concept-guides/catalog">Catalog user guides</a>
                    for information about the related features in the Unified Commerce Admin.</p>
                <p>Use the <strong>Currencies</strong> resource to retrieve exchange rates for displaying prices on your storefront.</p>
                <p>Use the <strong>Storefront Categories</strong> resource to view the product category hierarchy as it appears to shoppers
                    who are browsing the storefront. The hierarchy can be returned as a flat list or as a category tree.</p>
                <p>Use the <strong>Pricelists</strong> resource to retrieve the details of a price list. The details may contain a hierarchy
                    of ancestor and/or descendant price lists dependening on your configuration.</p>
                <p>Use the <strong>Storefront Products</strong> resource to manage the shopper product selection process during a visit to
                    the web storefront. You can update product options as shoppers pick and choose their product choices. A
                    shopper cannot add a product to a cart until all of its required options have been selected.</p>
                <p>Use the <strong>Product Search</strong> resource to provide dynamic search results to shoppers as they browse and search
                    for products on the web storefront, and to suggest possible search terms as the shopper enters text. The related <strong>Search Redirect</strong>
                    resource allows you to retrieve any search redirect items.</p>
            </div>
  title: Catalog Storefront
  version: 0.0.1
servers:
  - description: Kibo Base URL
    url: '{baseUrl}/api'
    variables:
      baseUrl:
        default: https://t1000000.sb.usc1.gcp.kibocommerce.com
        description: Base URL
security:
  - bearerAuth: []
paths:
  /commerce/catalog/storefront/productsearch/suggest2:
    get:
      tags:
        - ProductSearch
      summary: Gets Suggested Search Terms 2
      description: >-
        Suggests possible search terms as the shopper enters search text. In
        Unified Commerce, a Suggest2 API exists that returns results based on
        the returnFields option defined in the search settings. The same request
        structure and response as documented here is supported by both the
        /suggest and /suggest2 API endpoints, so either one can be used for this
        purpose with the same data.
      parameters:
        - description: >-
            Comma delimited list of suggestion groups that should be returned.
            The default is everything
          in: query
          name: query
          schema:
            type: string
        - in: query
          name: groups
          schema:
            type: string
        - description: >-
            Indicates the maximum number of entities to return from a query. The
            default value is 10 and the maximum value is 200. Optional.
          in: query
          name: pageSize
          schema:
            format: int32
            type: integer
        - in: query
          name: searchSettingsName
          schema:
            type: string
        - in: query
          name: mid
          schema:
            type: string
        - in: query
          name: filter
          schema:
            type: string
        - description: limits which fields are returned in the response body
          in: query
          name: responseFields
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchSuggestionResult'
            text/json:
              schema:
                $ref: '#/components/schemas/SearchSuggestionResult'
            text/plain:
              schema:
                $ref: '#/components/schemas/SearchSuggestionResult'
          description: OK
components:
  schemas:
    SearchSuggestionResult:
      description: >-
        List of items to suggest to the shopper who is entering a search query,
        for example, a search box on the storefront.
      properties:
        query:
          description: Text that the shopper types in a search query.
          nullable: true
          type: string
        suggestionGroups:
          description: List of SearchSuggestionGroups
          items:
            $ref: '#/components/schemas/SearchSuggestionGroup'
          nullable: true
          type: array
      type: object
    SearchSuggestionGroup:
      properties:
        name:
          description: Group Name
          nullable: true
          type: string
        suggestions:
          description: List of related SearchSuggestions
          items:
            $ref: '#/components/schemas/SearchSuggestion'
          nullable: true
          type: array
      type: object
    SearchSuggestion:
      description: A suggested result based on the search query
      properties:
        suggestion:
          description: >-
            A suggested entity based on the search query. Use the SuggestionType
            to determine the type of entity.

            Could be a SearchTerm, Product, or Category
          nullable: true
        suggestionType:
          description: |-
            The type of Suggestion (e.g. Term, Product, Category). 
            Will be one of the values of the SuggestionTypeConst type.
          nullable: true
          type: string
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: JWT Authorization header using the Bearer scheme.
      scheme: bearer
      type: http

````