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' });

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

Example:

"Nike"

merchant
string

Merchant name to filter results

Minimum string length: 2
Example:

"DICK's Sporting Goods"

limit
integer
default:40

Limit the number of results

Required range: 1 <= x <= 100
maxPrice
number

Maximum price filter

Example:

100

minPrice
number

Minimum price filter

Example:

1

freeShipping
boolean

Restrict results to listings with free shipping

smallBusiness
boolean

Restrict results to merchants labeled as small business

sortBy
enum<string>

Sort by price: 'lowToHigh' or 'highToLow'

Available options:
lowToHigh,
highToLow
cursor
integer

Cursor returned from the previous response

Required range: 0 <= x <= 9007199254740991
region
string

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

country
string

Country code for Google search (e.g., 'us', 'uk')

onSale
boolean

Filter for items on sale

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

Response

Products found successfully

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