POST
/
v2
/
search
/
results
Authorization
Body
curl --request POST \
  --url https://api.depict.ai/v2/search/results \
  --header 'Content-Type: application/json' \
  --data '{
  "cursor": "<string>",
  "dsid": "<string>",
  "filters": [
    {
      "data": "true",
      "field": "<string>",
      "id": "<string>",
      "meta": {
        "max": 123,
        "min": 123
      },
      "op": "eq"
    }
  ],
  "limit": 50,
  "market": "<string>",
  "metadata": {},
  "query": "<string>",
  "session_id": "<string>",
  "sort": {
    "field": "<string>",
    "meta": {
      "title": "<string>"
    },
    "order": "asc"
  },
  "tenant": "<string>",
  "user_id": "<string>"
}'
{
   "n_hits": 1,
   "displays": [
     {
         "product_id": "foobar",
         "title": "Foobar"
     }
   ],
   "sorts": [
     {
       "field": "_relevance",
       "order": "desc",
       "meta": {
         "title": "Relevance",
         "values": [
           "desc"
         ],
         "names": [
           "Relevance"
         ]
       }
     },
     {
       "field": "title",
       "order": "asc",
       "meta": {
         "title": "Title",
         "values": [
           "asc",
           "desc"
         ],
         "names": [
           "A-Z",
           "Z-A"
         ]
       }
     }
   ],
   "filters": [
     {
       "field": "sale_price",
       "op": "inrange",
       "data": [
         0,
         2500
       ],
       "meta": {
         "group_title": "Price",
         "type": "range",
         "min": 0,
         "max": 2500,
         "currency": "EUR"
       },
       "id": "price0"
     },
     {
       "field": "color_name",
       "op": "in",
       "meta": {
         "group_title": "Color",
         "type": "checkbox",
         "values": [
           "Blue",
           "Black",
           "Brown"
         ]
       },
       "id": "colors1"
     }
   ],
   "search_request_id": "1a278f4a-16eb-4d95-a002-88bd305493d4",
   "cursor": "eyJjIjogMSwgInIiOiAwfQ=="
 }

Authorizations

api_key
string
queryrequired

Body

application/json
cursor
string

Used for cursor-based pagination. Set it to the cursor from the last response. If not set, will return the first results.

dsid
string

Populated for integrations performed by Depict.ai only. Depict.ai Session Id

filters
object[]

List of filters to apply to the results.

limit
integer

Maximum number of results per response.

market
string
required
metadata
object

Metadata that can be used to modify the behaviour of the search.

query
string

The search query.

session_id
string

Session identifier

sort
object

Specifies the sorting method. By default, the results are ordered by relevance. To find the possible values for this field, query the endpoint and look at the sorts field.

tenant
string
required
user_id
string

User identifier

Response

200 - application/json
cursor
string

Cursor that can be used in the next request to get subsequent results. If this is not set, there are no more results.

displays
object[]
required

The search results.

filters
object[]

Available filters that can be used for filtering in the subsequent request.

n_hits
integer
required

Total number of results for this query. Not necessarily exact.

search_request_id
string
required
sorts
object[]

Available methods for sorting the response. Any element from this list can be sent as sort in subsequent requests.