Retrieve by image

Retrieve AI optimized search results for products (or optionally other sections) by image with optional multi-item detection (segmentation) support.

Related content

Query Params
string
required
length between 1 and 100

The key of the index to use.

string
length between 1 and 100
Defaults to Products

The section of the index to use.

string
enum
Defaults to bbox

How to crop detected segments for visual search. Only relevant when use_segmentation is true.

Allowed:
json

A JSON string containing a instructions on how to map item variation data in the response (typically used for swatches). More details, including the exact schema for this value can be found here

fmt_options
object

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

string
length between 1 and 100

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.

us
boolean
Defaults to false

Whether to detect and individually search multiple objects in the image. When true, the image is split into detected objects and each is searched separately; results are merged.

string

A customer generated obfuscated 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 IDs together to form a behavioral data profile across devices. For a shopper who has not consented, or who has withdrawn consent, omit this parameter, even if the shopper is logged in.

boolean
Defaults to false

Whether to include per-segment metadata in the response. Only applicable when use_segmentation is true.

integer

An integer representing the user's session number (starting with 1), incremented after a 30 minute period of inactivity. Send it with every request, including for a shopper who has not consented. If no stored value is available, send a fixed integer such as 1.

string

A globally unique identifier for the user browser (or mobile application instance) making the request. For a shopper who has not consented, or who has withdrawn consent, omit this parameter when the browser or app sends the request. Constructor may treat those requests as non-human traffic. They can get slower or stale results, and they can be rejected, occasionally or permanently. In a backend integration, send an identifier your server creates for that visit and keeps only in its own session. See Setting up shopper consent in Data-driven event tracking.

Body Params

Raw image bytes. Supported formats: JPEG, PNG, WebP, GIF. Maximum size: 6 MB.

Responses

Language
LoadingLoading…
Response
Choose an example:
application/json