Skip to main content
POST
/
products
/
search
JavaScript
import HenrySDK from '@henrylabs/sdk';

const client = new HenrySDK({
  apiKey: process.env['HENRY_SDK_API_KEY'], // This is the default and can be omitted
});

const response = await client.products.search({
  query: 'Air Max Shoes',
  brand: 'Nike',
  country: 'us',
  enrichTopK: 5,
  filter: 'ppr_max:100',
  limit: 40,
  maxPrice: 200,
  merchant: "DICK's Sporting Goods",
  minPrice: 50,
  region: 'Austin, Texas',
  sortBy: 'lowToHigh',
});

console.log(response.data);
{
  "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

Brand name to filter results

merchant
string

Merchant name to filter results

limit
integer
default:40

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

Geographic location for search (e.g., 'Austin, Texas')

country

Country code for Google search. Supported: 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

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

Advanced filters 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[]