> ## 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 /v2/search/suggestions
openapi: 3.1.0
info:
  title: Depict API
  version: '1.0'
servers: []
security: []
paths:
  /v2/search/suggestions:
    get:
      tags:
        - Search (v2)
      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 categories 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"
            },
            {
              "category_id": "sweaters-hoodies",
              "title": "Sweaters & Hoodies",
              "page_url": "https://foobar.com/sweaters-hoodies",
              "type": "category",
              "suggestions_result_id": "b11ee4a9-0d95-4559-b1fa-76479ca3e3ea"
            }
          ]
        }

        </pre>
      operationId: Get_suggestions_v2_search_suggestions_get
      parameters:
        - name: tenant
          in: query
          required: true
          schema:
            type: string
            title: Tenant
        - name: market
          in: query
          required: true
          schema:
            type: string
            title: Market
        - name: locale
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Locale
        - name: query
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Query
        - name: user_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                minLength: 1
              - type: 'null'
            title: User Id
        - name: session_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                minLength: 1
              - type: 'null'
            title: Session Id
        - name: dsid
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                minLength: 1
              - type: 'null'
            title: Dsid
        - name: metadata
          in: query
          required: false
          schema:
            anyOf:
              - {}
              - type: 'null'
            title: Metadata
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchSuggestionsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyQuery: []
        - APIKeyHeader: []
        - APIKeyCookie: []
components:
  schemas:
    SearchSuggestionsResponse:
      properties:
        suggestions_request_id:
          type: string
          title: Suggestions Request Id
        suggestions:
          items:
            anyOf:
              - $ref: '#/components/schemas/common__schema__search__QuerySuggestion'
              - $ref: '#/components/schemas/LegacyCategorySuggestion'
          type: array
          title: Suggestions
          description: >-
            List of suggestions for search queries that should be shown to the
            user while they are typing.
      additionalProperties: false
      type: object
      required:
        - suggestions_request_id
        - suggestions
      title: SearchSuggestionsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    common__schema__search__QuerySuggestion:
      properties:
        type:
          const: query
          title: Type
          default: query
        title:
          type: string
          title: Title
          description: Title for suggestion.
        suggestions_result_id:
          type: string
          title: Suggestions Result Id
      additionalProperties: false
      type: object
      required:
        - title
        - suggestions_result_id
      title: QuerySuggestion
    LegacyCategorySuggestion:
      properties:
        category_id:
          type: string
          title: Category Id
          description: Unique identifier of the category.
        title:
          type: string
          title: Title
          description: The title of the category
        page_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Page Url
          description: The full URL to the category page
        query_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Query Id
          description: Optionally a unique query ID for the category
        uri:
          anyOf:
            - type: string
            - type: 'null'
          title: Uri
          description: Optionally a unique URI for the category, for example men/shoes
        category_type:
          allOf:
            - $ref: '#/components/schemas/ECategoryType'
          description: The type of category, for example CAMPAIGN, TAG, or CATEGORY
          default: CATEGORY
        type:
          const: category
          title: Type
          description: type
          default: category
        suggestions_result_id:
          type: string
          title: Suggestions Result Id
      additionalProperties: true
      type: object
      required:
        - category_id
        - title
        - suggestions_result_id
      title: LegacyCategorySuggestion
    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
    ECategoryType:
      type: string
      enum:
        - TAG
        - CATEGORY
        - TENANT_CATEGORY
        - TENANT_SECONDARY_CATEGORY
        - CAMPAIGN
        - BRAND
      title: ECategoryType
  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

````