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

# Get Suggestions

<Warning>
  This page does not apply to installs made in 2025 or later of the Depict Shopify apps
</Warning>


## OpenAPI

````yaml get /v3/search/suggestions
openapi: 3.1.0
info:
  title: Depict API
  version: '1.0'
servers: []
security: []
paths:
  /v3/search/suggestions:
    get:
      tags:
        - Search (v3)
      summary: Get Suggestions
      description: >-
        Returns suggestions for a given query. Call this while the user is
        typing to help

        the user find what they're looking for. The suggestions are of two
        types:

        - suggestions for search queries that are related to the current query

        - suggestions for listings that are related to the current query


        Example response:

        <pre>

        {
          "suggestions_request_id": "c6fa5efd-1bde-43a8-9ac4-434605f53024",
          "suggestions": [
            {
              "type": "query",
              "title": "red hat",
              "suggestions_result_id": "60c54958-8f2d-4ffd-a343-d316e79593b8"
            },
            {
              "type": "listing",
              "title": "Hats",
              "listing_id": "b6fa5efd-1bde-43a8-9ac4-434605f53024",
              "external_id": "1011",
              "listing_type": "category",
              "show_in_breadcrumbs": true,
              "show_in_quicklinks": true,
              "slug": "hats",
              "ancestors": [
                {
                  "title": "Accessories",
                  "listing_id": "a6fa5efd-1bde-43a8-9ac4-434605f53024",
                  "external_id": "1001",
                  "listing_type": "category",
                  "show_in_breadcrumbs": true,
                  "show_in_quicklinks": true,
                  "slug": "accessories"
                },
              ]
              "suggestions_result_id": "2aafccb2-cd21-4153-94bf-16c4eccefe67"
            },
          ]
        }

        </pre>
      operationId: Get_suggestions_v3_search_suggestions_get
      parameters:
        - name: merchant
          in: query
          required: true
          schema:
            type: string
            title: Merchant
        - name: market
          in: query
          required: true
          schema:
            type: string
            title: Market
        - name: locale
          in: query
          required: true
          schema:
            type: string
            title: Locale
        - name: query
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Query
        - name: session_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                minLength: 1
              - type: 'null'
            title: Session Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchSuggestionsResponseV3'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyQuery: []
        - APIKeyHeader: []
        - APIKeyCookie: []
components:
  schemas:
    SearchSuggestionsResponseV3:
      properties:
        suggestions_request_id:
          type: string
          title: Suggestions Request Id
        suggestions:
          items:
            anyOf:
              - $ref: '#/components/schemas/common__schema__api_v3__QuerySuggestion'
              - $ref: '#/components/schemas/ListingSuggestion'
          type: array
          title: Suggestions
          description: >-
            List of suggestions for search queries and product listings that
            should be shown to the user while they are typing.
      additionalProperties: false
      type: object
      required:
        - suggestions_request_id
        - suggestions
      title: SearchSuggestionsResponseV3
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    common__schema__api_v3__QuerySuggestion:
      properties:
        type:
          const: query
          title: Type
          default: query
        suggestions_result_id:
          type: string
          title: Suggestions Result Id
        query:
          type: string
          title: Query
          description: The suggested search query.
      additionalProperties: false
      type: object
      required:
        - suggestions_result_id
        - query
      title: QuerySuggestion
    ListingSuggestion:
      properties:
        listing_id:
          type: string
          format: uuid
          title: Listing Id
          description: Depict ID of the listing.
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
          description: ID of the listing in the merchant PIM, CMS or similar.
        listing_type:
          $ref: '#/components/schemas/CollectionType'
        show_in_breadcrumbs:
          type: boolean
          title: Show In Breadcrumbs
          description: Show or hide this listing in navigation breadcrumbs.
        show_in_quicklinks:
          type: boolean
          title: Show In Quicklinks
          description: Show or hide this listing in quicklinks.
        image_urls:
          items:
            type: string
          type: array
          title: Image Urls
          description: List of image URLs for the listing.
        title:
          type: string
          title: Title
        slug:
          anyOf:
            - type: string
            - type: 'null'
          title: Slug
        type:
          const: listing
          title: Type
          default: listing
        suggestions_result_id:
          type: string
          title: Suggestions Result Id
        ancestors:
          items:
            $ref: '#/components/schemas/ProductListing'
          type: array
          title: Ancestors
          description: >-
            Ordered list of ancestors of the suggested listing, useful for
            navigation breadcrumbs. The first element is the root listing.
      additionalProperties: false
      type: object
      required:
        - listing_id
        - listing_type
        - show_in_breadcrumbs
        - show_in_quicklinks
        - image_urls
        - title
        - suggestions_result_id
        - ancestors
      title: ListingSuggestion
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    CollectionType:
      type: string
      enum:
        - long_tail_collection
        - campaign
        - category
        - smart_pick
        - style
        - brand
      title: CollectionType
    ProductListing:
      properties:
        listing_id:
          type: string
          format: uuid
          title: Listing Id
          description: Depict ID of the listing.
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
          description: ID of the listing in the merchant PIM, CMS or similar.
        listing_type:
          $ref: '#/components/schemas/CollectionType'
        show_in_breadcrumbs:
          type: boolean
          title: Show In Breadcrumbs
          description: Show or hide this listing in navigation breadcrumbs.
        show_in_quicklinks:
          type: boolean
          title: Show In Quicklinks
          description: Show or hide this listing in quicklinks.
        image_urls:
          items:
            type: string
          type: array
          title: Image Urls
          description: List of image URLs for the listing.
        title:
          type: string
          title: Title
        slug:
          anyOf:
            - type: string
            - type: 'null'
          title: Slug
      additionalProperties: false
      type: object
      required:
        - listing_id
        - listing_type
        - show_in_breadcrumbs
        - show_in_quicklinks
        - image_urls
        - title
      title: ProductListing
      description: Represents a product listing, e.g. a category or a collection.
  securitySchemes:
    APIKeyQuery:
      type: apiKey
      in: query
      name: api_key
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-KEY
    APIKeyCookie:
      type: apiKey
      in: cookie
      name: X-API-KEY

````