Retrieve search bar AI overviews

Produce the AI overview for a shopper's search query: a short written summary of what the catalog offers for it, and the handful of products that answer it best. This is the search bar experience, so the result is deliberately compact (one set of four or five products, or several sets of a single product, each set introduced by a line of prose), small enough to sit above the traditional search results and pointed enough to draw the shopper into a full chat conversation. Not every query suits that treatment, and the index key's search bar configuration decides: a query its classification judges better served by traditional search is answered with 422 before any content is produced, and the caller renders its own search results instead. A configuration without query classification answers every query. shopper_input is the query itself. search takes no parameters, because it always runs the searchbar domain configured for the index key, and a key without that domain is answered with 400. Leave num_result_events unset unless dropping product sets is the intent: the agent chooses between one multi-product set and several single-product sets, so a cap of 1 keeps one product while the prose around it still describes the rest. Results stream back as server-sent events (text/event-stream) so the overview can be rendered as it is produced. To receive the finished overview as a single JSON document instead, send Accept: application/json.

Query Params
string
required
length ≄ 1

The key of the index to use.

uuid

A unique identifier for the conversation thread. This ID links multiple requests to the same conversation. When omitted, a new thread is created.

boolean
Defaults to false

Turn the content moderation check on or off. When on, shopper input is screened before the agent processes it.

integer

The maximum number of result events to return.

integer

The maximum number of results to return per item_results event.

fmt_options
object

An object containing options to format different aspects of the response.

json

Additional query parameters to forward to the underlying Constructor search, browse and recommendations API calls, as a JSON-encoded string: for example qs={"sort_by":"price","sort_order":"ascending"}. Each mode forwards only the keys that apply to the calls it makes, and any key managed by page_context.filters must not be overridden here.

string

The ID of the client and version that the request is coming from, such as cio-js-2.90.

us
array of strings

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.

User segments
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.

feature_variants
object

Feature variants keyed by feature name. Accepts flattened feature_variants[<feature_name>] query parameters.

features
object

Feature toggles keyed by feature name. Accepts flattened features[<feature_name>] query parameters.

integer

An integer representing the user's session number (starting with 1), incremented after a 30 minute period of inactivity.

string

A globally unique identifier for the user browser (or mobile application instance) making the request.

Body Params

The request body for the search mode.

A shopper's search query, with the page it was typed on. The searchbar domain configured for the index key answers it.

string
required
length ≄ 1

The shopper's search query.

page_context
object
required

The shopper's current position in the catalog. search filters the products it retrieves by filters, and echoes the whole object back on the start event. Query classification does not read it.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
LoadingLoading…
Response
Choose an example:
application/json
text/event-stream