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.
Request
- Base URLhttps://agent.cnstrc.com
- URLhttps://agent.cnstrc.com/v1/agent_insights/search
- Authnone required
Query parameters
The key of the index to use.
A unique identifier for the conversation thread. This ID links multiple requests to the same conversation. When omitted, a new thread is created.
Turn the content moderation check on or off. When on, shopper input is screened before the agent processes it.
The maximum number of result events to return.
The maximum number of results to return per item_results event.
An object containing options to format different aspects of the response.
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.
The ID of the client and version that the request is coming from, such as cio-js-2.90.
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.
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 keyed by feature name. Accepts flattened feature_variants[<feature_name>] query parameters.
Feature toggles keyed by feature name. Accepts flattened features[<feature_name>] query parameters.
An integer representing the user's session number (starting with 1), incremented after a 30 minute period of inactivity.
A globally unique identifier for the user browser (or mobile application instance) making the request.
Request body
Response
AI-powered agent insights, streamed as server-sent events or aggregated into a single JSON document.
Example response
{
"follow_up_refinement": {
"options": [
"Yes, sub-zero",
"No, mild weather"
],
"question": "Do you need it for winter conditions?"
},
"item_results": [
{
"request": {
"ids": [
"item_id_1"
],
"params": {
"num_results_per_page": 20
},
"type": "browse"
},
"response": {
"results": [
{
"value": "Waterproof Hiking Boot",
"matched_terms": [
"waterproof",
"hiking"
],
"is_slotted": false,
"labels": {},
"data": {
"id": "item_id_1",
"url": "https://example.com/product/item_id_1",
"image_url": "https://cdn.example.com/item_id_1.jpg"
}
}
]
},
"result_id": "973e152a-ee03-47d2-a01b-1214da90a02b"
}
],
"message": "Based on your interest in hiking gear, here are some waterproof options...",
"result_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "complete",
"thread_id": "662e8400-e29b-41d4-a716-446655440001"
}Changes
No recorded changes to this operation across all 1 revision of this API.