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.details({
link: 'https://www.nike.com/u/custom-nike-ja-3-by-you-10002205',
country: 'US',
mode: 'async',
});
console.log(response.refId);curl --request POST \
--url https://api.henrylabs.ai/v1/product/details \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"link": "https://www.nike.com/u/custom-nike-ja-3-by-you-10002205",
"variant": {
"size": "10",
"color": "Black"
},
"country": "US",
"mode": "async"
}
'import requests
url = "https://api.henrylabs.ai/v1/product/details"
payload = {
"link": "https://www.nike.com/u/custom-nike-ja-3-by-you-10002205",
"variant": {
"size": "10",
"color": "Black"
},
"country": "US",
"mode": "async"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.henrylabs.ai/v1/product/details",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'link' => 'https://www.nike.com/u/custom-nike-ja-3-by-you-10002205',
'variant' => [
'size' => '10',
'color' => 'Black'
],
'country' => 'US',
'mode' => 'async'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.henrylabs.ai/v1/product/details"
payload := strings.NewReader("{\n \"link\": \"https://www.nike.com/u/custom-nike-ja-3-by-you-10002205\",\n \"variant\": {\n \"size\": \"10\",\n \"color\": \"Black\"\n },\n \"country\": \"US\",\n \"mode\": \"async\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.henrylabs.ai/v1/product/details")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"link\": \"https://www.nike.com/u/custom-nike-ja-3-by-you-10002205\",\n \"variant\": {\n \"size\": \"10\",\n \"color\": \"Black\"\n },\n \"country\": \"US\",\n \"mode\": \"async\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.henrylabs.ai/v1/product/details")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"link\": \"https://www.nike.com/u/custom-nike-ja-3-by-you-10002205\",\n \"variant\": {\n \"size\": \"10\",\n \"color\": \"Black\"\n },\n \"country\": \"US\",\n \"mode\": \"async\"\n}"
response = http.request(request)
puts response.read_body{
"refId": "<string>",
"status": "pending",
"result": {
"link": "<string>",
"merchant": "<string>",
"host": "<string>",
"name": "<string>",
"affiliateLink": "https://api.henrylabs.ai/v1/go/aHR0cHM6Ly93aWxkLmxpbmsvZT9jPTEyMzQ1",
"sku": "<string>",
"description": "<string>",
"images": [
{
"url": "<string>",
"isFeatured": true
}
],
"price": {
"value": 123,
"currency": "USD"
},
"originalPrice": {
"value": 123,
"currency": "USD"
},
"availability": "in_stock",
"options": {
"status": "found",
"values": [
{
"value": "<string>",
"label": "<string>",
"availability": "in_stock",
"price": {
"value": 123,
"currency": "USD"
},
"originalPrice": {
"value": 123,
"currency": "USD"
},
"images": [
{
"url": "<string>",
"isFeatured": true
}
],
"link": "<string>",
"nextOption": "<unknown>"
}
],
"label": "<string>"
},
"reviews": {
"rating": 123,
"count": 0,
"histogram": [
{
"stars": 0,
"count": 0
}
],
"criticRatings": [
{
"name": "<string>",
"rating": "<string>",
"link": "<string>"
}
],
"userReviews": [
{
"text": "<string>",
"title": "<string>",
"author": "<string>",
"rating": 123,
"date": "<string>",
"source": "<string>",
"images": [
"<string>"
]
}
],
"insights": [
{
"title": "<string>",
"snippets": [
"<string>"
]
}
]
},
"sections": [
{
"title": "<string>",
"body": "<string>"
}
]
},
"error": {}
}{
"success": true,
"status": "<string>",
"message": "<string>"
}{
"success": true,
"status": "<string>",
"message": "<string>"
}Product Details
Fetch detailed information about a product from a given URL. Requests are async by default, or use mode=sync to wait up to 30 seconds for completion.
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.details({
link: 'https://www.nike.com/u/custom-nike-ja-3-by-you-10002205',
country: 'US',
mode: 'async',
});
console.log(response.refId);curl --request POST \
--url https://api.henrylabs.ai/v1/product/details \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"link": "https://www.nike.com/u/custom-nike-ja-3-by-you-10002205",
"variant": {
"size": "10",
"color": "Black"
},
"country": "US",
"mode": "async"
}
'import requests
url = "https://api.henrylabs.ai/v1/product/details"
payload = {
"link": "https://www.nike.com/u/custom-nike-ja-3-by-you-10002205",
"variant": {
"size": "10",
"color": "Black"
},
"country": "US",
"mode": "async"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.henrylabs.ai/v1/product/details",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'link' => 'https://www.nike.com/u/custom-nike-ja-3-by-you-10002205',
'variant' => [
'size' => '10',
'color' => 'Black'
],
'country' => 'US',
'mode' => 'async'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.henrylabs.ai/v1/product/details"
payload := strings.NewReader("{\n \"link\": \"https://www.nike.com/u/custom-nike-ja-3-by-you-10002205\",\n \"variant\": {\n \"size\": \"10\",\n \"color\": \"Black\"\n },\n \"country\": \"US\",\n \"mode\": \"async\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.henrylabs.ai/v1/product/details")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"link\": \"https://www.nike.com/u/custom-nike-ja-3-by-you-10002205\",\n \"variant\": {\n \"size\": \"10\",\n \"color\": \"Black\"\n },\n \"country\": \"US\",\n \"mode\": \"async\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.henrylabs.ai/v1/product/details")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"link\": \"https://www.nike.com/u/custom-nike-ja-3-by-you-10002205\",\n \"variant\": {\n \"size\": \"10\",\n \"color\": \"Black\"\n },\n \"country\": \"US\",\n \"mode\": \"async\"\n}"
response = http.request(request)
puts response.read_body{
"refId": "<string>",
"status": "pending",
"result": {
"link": "<string>",
"merchant": "<string>",
"host": "<string>",
"name": "<string>",
"affiliateLink": "https://api.henrylabs.ai/v1/go/aHR0cHM6Ly93aWxkLmxpbmsvZT9jPTEyMzQ1",
"sku": "<string>",
"description": "<string>",
"images": [
{
"url": "<string>",
"isFeatured": true
}
],
"price": {
"value": 123,
"currency": "USD"
},
"originalPrice": {
"value": 123,
"currency": "USD"
},
"availability": "in_stock",
"options": {
"status": "found",
"values": [
{
"value": "<string>",
"label": "<string>",
"availability": "in_stock",
"price": {
"value": 123,
"currency": "USD"
},
"originalPrice": {
"value": 123,
"currency": "USD"
},
"images": [
{
"url": "<string>",
"isFeatured": true
}
],
"link": "<string>",
"nextOption": "<unknown>"
}
],
"label": "<string>"
},
"reviews": {
"rating": 123,
"count": 0,
"histogram": [
{
"stars": 0,
"count": 0
}
],
"criticRatings": [
{
"name": "<string>",
"rating": "<string>",
"link": "<string>"
}
],
"userReviews": [
{
"text": "<string>",
"title": "<string>",
"author": "<string>",
"rating": 123,
"date": "<string>",
"source": "<string>",
"images": [
"<string>"
]
}
],
"insights": [
{
"title": "<string>",
"snippets": [
"<string>"
]
}
]
},
"sections": [
{
"title": "<string>",
"body": "<string>"
}
]
},
"error": {}
}{
"success": true,
"status": "<string>",
"message": "<string>"
}{
"success": true,
"status": "<string>",
"message": "<string>"
}Authorizations
Body
Direct product URL on the merchant's site. Affiliate/tracking URLs (wild.link and other network redirect domains) are rejected — pass the plain link returned by Product Search and Product Details, not the affiliateLink.
"https://www.nike.com/u/custom-nike-ja-3-by-you-10002205"
Response mode. Use sync to wait up to 30 seconds for the backing worker flow to complete.
async, sync "async"
An ordered array of option values to select for the product. Will be selected in the order listed.
["regular", "black", "10-w"]
Country code for the product's location
"US"
When true, bypass any cached product details and force a fresh fetch. Fresh results still repopulate the cache.
false
Response
Product details queued successfully, use refId to check status and retrieve results
Was this page helpful?