---
title: "Retrieve by intent"
method: GET
path: "/v1/intent/{query}"
tags: ["Results"]
---

# Retrieve by intent

`GET /v1/intent/{query}`

Retrieves AI powered product discovery suggestions based on conversational free-form text. Returns results in small batches using a real time [Server-sent Events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events) stream for a dynamic user experience.

## Path parameters

- `query` string, required — The query provided by the user as free-form text.

## Query parameters

- `key` string, required — The key of the index to use.
- `thread_id` string, uuid — A unique identifier for the conversation thread. This ID links multiple requests to the same conversation.
- `pre_filter_expression` string — A URL-encoded JSON string containing filters (inaccessible to end users) used to narrow the result set. Applied before filters accessible to end users. Does not affect facet counts. Only results that match the filters are returned. More details on https://docs.constructor.com/reference/shared-pre-filter-expressions
- `domain` string, required — The domain specifying a set of specific instructions for processing the intent, e.g., 'recipes', 'sportsgear'.
- `guard` boolean — Enable or disable the moderation check.
- `num_result_events` integer — The maximum number of result events to return.
- `num_results_per_page` integer — **Deprecated. Please, use ``num_results_per_event`` instead.**
- `num_results_per_event` integer — The maximum number of results to return per ``search_result`` event.
- `fmt_options` FmtOptions — Options to format different aspects of the response.
  - `fields` string[] — A list of specific item fields to return in the response. Allows the request to control which fields are returned.
  - `show_hidden_fields` boolean — A flag to return all `hidden` fields in the response.
  - `hidden_fields` string[] — A list of specific hidden fields to return in the response. Unlike `show_hidden_fields` this parameter allows the request to control which `hidden` fields are returned. Used to return item fields for a particular store or user segment.
  - `variations_return_type` 'default' | 'all' | 'matched'
  - `groups_max_depth` integer — The maximum depth of the group hierarchy in the response.
  - `groups_start` string — A flag to specify the start of the group hierarchy returned in the response. `current` returns groups starting from the currently selected one. `top` returns groups starting from the root category in the hierarchy. `group_id:{id}`, returns the whole tree starting from group with the provided id.
  - `groups_path` string[] — Specifies the path from the root group to the current group you are browsing. It is used to construct the parents path in the `response.groups` for the current browsed group. Max depth allowed for the path is 10. This option is only accepted when `groups_start` is 'current'.
  - `groups_sort_by` 'relevance' | 'value' | 'num_matches'
  - `groups_sort_order` 'ascending' | 'descending'
  - `show_hidden_facets` boolean — A flag to return all facets configured as `hidden` in `response.facets`.
  - `hidden_facets` string[] — A list of specific hidden facets to return in the response. Unlike `show_hidden_facets` this parameter allows the request to control which hidden facets are returned. Used to return facets for a particular store or user segment.
  - `show_hidden_facet_options` boolean — A flag to return all `hidden` facets options in the response.
  - `show_protected_facets` boolean — A flag to return all `protected` facets in the response. Requires authentication.
  - `facet_options` object — A list of specific facet options per facet to return in the response. This parameter accepts up to 5 facets and works only with facets of type `multiple`. Invalid facet options will be ignored. Used to return facet options for a particular facet like store or user segment.
  - `facet_groups_limit` integer — The maximum limit of the facet groups returned in the response.
  - `show_hidden_sort_options` boolean — A flag to return all sort options configured as `hidden` in `response.sort_options`.
  - `hidden_sort_options` string[] — A list of `sort_by` fields whose hidden sort options should be included in the response. Unlike `show_hidden_sort_options` this parameter allows you to specify exactly which hidden sort options are returned.
- `qs` string — A URL-encoded JSON string. More details on https://docs.constructor.com/reference/search-search-results#using-the-qs-parameter
- `c` string — The id of the client and version that the request is coming from, such as `cio-js-2.90`.
- `us` string[] — A customer defined context (such as `vip-club-member`) used to evaluate redirect or refined tag rules. Pass multiple segments by passing multiple `us` arguments.
- `ui` string — A customer generated anonymized identifier for a user on a customer website. It should only be sent for logged in customers and helps constructor to tie multiple client and session ID's together to form a behavioral data profile across devices.
- `s` integer — An integer representing the users session number (starting with `1`), incremented after a 30 minute period of inactivity.
- `i` string — A globally unique identifier for the user browser (or mobile application instance) making the request.

## Response `200`

SSE stream containing a series of events with discovered items or AI generated textual messages.

## Other responses

- `400` — Invalid request parameters.
- `422` — Validation Error
- `500` — Internal server error.

---

[API](https://skmtc.dev/constructor/apis/autocomplete.md) · [All operations](https://skmtc.dev/constructor/apis/autocomplete/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/constructor/autocomplete/revisions/2d33330633b6/schema)
