Skip to main content
POST
/
products
/
search
Text Product Search
curl --request POST \
  --url https://api.henrylabs.ai/v0/products/search \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data @- <<EOF
{
  "query": "Air Max Shoes",
  "brand": "Nike",
  "merchant": "DICK's Sporting Goods",
  "limit": 40,
  "maxPrice": 200,
  "minPrice": 50,
  "freeShipping": false,
  "smallBusiness": false,
  "sortBy": "lowToHigh",
  "cursor": 0,
  "region": "Austin, Texas",
  "country": "us",
  "onSale": false,
  "filter": "ppr_max:100",
  "enrichTopK": 5
}
EOF
{
  "success": true,
  "status": "<string>",
  "message": "<string>",
  "data": [
    {
      "id": "<string>",
      "name": "<string>",
      "description": "<string>",
      "price": 123,
      "currency": "<string>",
      "imageUrl": "<string>",
      "source": "<string>",
      "originalPrice": "<string>",
      "enrichRequestId": "<string>"
    }
  ],
  "pagination": {
    "nextCursor": "<string>",
    "previousCursor": "<string>"
  },
  "filters": [
    {
      "type": "<string>",
      "inputType": "<string>",
      "options": [
        {
          "text": "<string>",
          "value": "<string>"
        }
      ]
    }
  ]
}

Authorizations

x-api-key
string
header
required

Body

application/json
query
string
required

Search query

Minimum string length: 1
Example:

"Air Max Shoes"

brand
string
merchant
string
limit
integer
default:10

Limit the number of results

Required range: 1 <= x <= 100
Example:

40

maxPrice
number

Maximum price filter

Required range: x <= 1000000
Example:

100

minPrice
number

Minimum price filter

Required range: x <= 1000000
Example:

1

freeShipping
boolean

Restrict results to listings with free shipping

Example:

false

smallBusiness
boolean

Restrict results to merchants labeled as small business

Example:

false

sortBy
enum<string>

Sort by price: 'lowToHigh' or 'highToLow'

Available options:
lowToHigh,
highToLow
Example:

"lowToHigh"

cursor
integer

Cursor returned from the previous response

Required range: 0 <= x <= 9007199254740991
Example:

0

region
string
country
Available options:
us,
uk,
gb,
ca,
au,
de,
fr,
es,
it,
jp,
br,
mx,
in,
nl,
be,
at,
ch,
se,
no,
dk,
fi,
pl,
pt,
ie,
nz,
sg,
hk,
kr
onSale
boolean

Filter for items on sale

Example:

false

filter
string
enrichTopK
integer

Experimental: Auto-enrich top K results. Returns enrichRequestId for each product to poll for enriched data.

Required range: 1 <= x <= 20
Example:

5

Response

Products found successfully

success
boolean
required
status
string
required
message
string
required
data
object[]
required
pagination
object
required
filters
object[]