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

# Auto-Suggestions

> Returns typeahead term suggestions for a partial query, with optional auto-spell-correction and a "did you mean" list.

If `catalog_id` parses as a UUID, terms configured as autocomplete exclusions for that catalog are filtered out.

Before calling this endpoint, make sure you've generated an API token and picked the correct domain. See [Authentication & Base URLs](/api-reference/authbaseurl).

Use this for typeahead as the shopper types. To run the actual product search, use [Search Products](/api-reference/discovery/search/post).


## OpenAPI

````yaml GET /discovery/search/auto-suggestions
openapi: 3.1.0
info:
  title: OpenAPI Plant Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://apis.experro.app
    description: Admin Server
  - url: https://{base-address}
    description: Custom Server
    variables:
      base-address:
        default: ''
        description: Enter your custom domain or server address.
security:
  - bearerAuth: []
paths:
  /discovery/search/auto-suggestions:
    get:
      summary: Get Search Query Auto-Suggestions
      description: >-
        Returns typeahead term suggestions for a partial query, with optional
        auto-spell-correction and a "did you mean" list.


        If `catalog_id` parses as a UUID, terms configured as autocomplete
        exclusions for that catalog are filtered out.
      parameters:
        - $ref: '#/components/parameters/StorefrontTenantIdHeader'
        - $ref: '#/components/parameters/StorefrontWorkspaceIdHeader'
        - $ref: '#/components/parameters/StorefrontEnvironmentIdHeader'
        - name: catalog_id
          in: query
          description: Catalog to search within.
          required: true
          schema:
            type: string
        - name: q
          in: query
          description: Partial query to return suggestions for.
          schema:
            type: string
        - name: locale
          in: query
          description: Locale for the suggestions.
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of suggestions to return.
          schema:
            type: integer
            default: 10
        - name: skip
          in: query
          description: Number of suggestions to skip.
          schema:
            type: integer
            default: 0
        - name: is_auto_spell_correction
          in: query
          description: Apply automatic spell correction to the query.
          schema:
            type: boolean
        - name: did_you_mean_limit
          in: query
          description: Maximum number of did-you-mean suggestions to return.
          schema:
            type: integer
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutoSuggestResult'
        '400':
          description: >-
            The request could not be parsed or validated. `Invalid Input` almost
            always means a request-body problem rather than a bad field value:


            - The `Content-Type` is missing or is not `application/json`.

            - The body was sent as form data instead of raw JSON.

            - The body is empty, or is not valid JSON.

            - An optional field was sent **blank rather than omitted** — for
            example `"sort_order": ""`, `"hero_variant_option_override": {}`, or
            `"filters": [{}]`. Omit a field you are not using, or send `null` or
            `[]`; an empty string or empty object is rejected.

            - A numeric field was sent as a string, such as `"limit": "24"`
            instead of `"limit": 24`.


            A missing required query parameter returns a more specific message,
            for example `Query deserialize error: missing field \`catalog_id\``.
        '404':
          description: >-
            The catalog was not found. This endpoint resolves the catalog from
            the `x-tenant-id`, `x-workspace-id`, and `x-environment-id` headers,
            so a missing or mismatched header returns `Catalog not found`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '500':
          description: An unexpected error occurred on the server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
      security: []
      servers:
        - url: https://{base-address}
          description: Custom Server
          variables:
            base-address:
              default: ''
              description: Enter your custom domain or server address.
components:
  parameters:
    StorefrontTenantIdHeader:
      name: x-tenant-id
      in: header
      required: true
      schema:
        type: string
      description: Identifies your organization. Ensures data isolation per tenant.
    StorefrontWorkspaceIdHeader:
      name: x-workspace-id
      in: header
      required: true
      schema:
        type: string
      description: >-
        Identifies the workspace within your organization. Scopes resources to a
        specific workspace.
    StorefrontEnvironmentIdHeader:
      name: x-environment-id
      in: header
      required: true
      schema:
        type: string
      description: >-
        Identifies the environment you are targeting. Scopes the call to a
        specific deployment environment.
  schemas:
    AutoSuggestResult:
      type: object
      description: Typeahead suggestions for a partial query.
      properties:
        terms:
          type: array
          description: >-
            Suggested search terms, ordered by relevance. Capped by `limit`.
            Empty when nothing matches.
          items:
            type: string
        did_you_mean:
          type: array
          description: >-
            Spelling alternatives for the query, capped by `did_you_mean_limit`.
            Empty when `q` is omitted.
          items:
            type: string
      additionalProperties: false
    Error404:
      type: object
      properties:
        Status:
          type: string
          example: failure
        Error:
          type: object
          properties:
            message:
              type: string
            name:
              type: string
            code:
              type: string
          required:
            - message
            - name
      required:
        - Status
        - Error
    Error500:
      type: object
      properties:
        Status:
          type: string
          example: failure
        Error:
          type: object
          properties:
            message:
              type: string
            name:
              type: string
            code:
              type: string
          required:
            - message
            - name
      required:
        - Status
        - Error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````