V2 Product Detail

Get detailed information for a single product by its BuyWhere ID.

Base URL: https://api.buywhere.ai/v2/products/{product_id}

Overview

The V2 Product Detail endpoint retrieves complete information for a specific product including pricing, availability, specifications, and affiliate links. This is ideal for building product pages or enriching search results.

HTTP Method

GET /v2/products/{product_id}

Path Parameters

ParameterTypeRequiredDescription
product_idintegerYesThe unique BuyWhere product ID

Query Parameters

ParameterTypeRequiredDefaultDescription
currencystringNoSGDResponse currency conversion

Request Example

cURL

curl -X GET "https://api.buywhere.ai/v2/products/18472931" \
  -H "Authorization: Bearer bw_live_xxxxxxxxxxxxxxxx"

Python

import httpx

API_KEY = "bw_live_xxxxxxxxxxxxxxxx"
BASE_URL = "https://api.buywhere.ai"
PRODUCT_ID = 18472931

headers = {"Authorization": f"Bearer {API_KEY}"}

response = httpx.get(
    f"{BASE_URL}/v2/products/{PRODUCT_ID}",
    headers=headers
)
product = response.json()
print(f"Product: {product['title']}")
print(f"Price: {product['currency']} {product['price']}")
print(f"Rating: {product['rating']} ({product['review_count']} reviews)")
print(f"Buy URL: {product['buy_url']}")

JavaScript (Node.js)

const API_KEY = "bw_live_xxxxxxxxxxxxxxxx";
const BASE_URL = "https://api.buywhere.ai";
const PRODUCT_ID = 18472931;

const response = await fetch(
  `${BASE_URL}/v2/products/${PRODUCT_ID}`,
  {
    headers: { "Authorization": `Bearer ${API_KEY}` }
  }
);

const product = await response.json();
console.log(`Product: ${product.title}`);
console.log(`Price: ${product.currency} ${product.price}`);
console.log(`Rating: ${product.rating} (${product.review_count} reviews)`);
console.log(`Buy URL: ${product.buy_url}`);

Go

package main

import (
    "encoding/json"
    "fmt"
    "net/http"
)

func getProduct(apiKey string, productID int64) error {
    url := fmt.Sprintf("https://api.buywhere.ai/v2/products/%d", productID)
    
    req, _ := http.NewRequest("GET", url, nil)
    req.Header.Set("Authorization", "Bearer "+apiKey)

    client := &http.Client{}
    resp, err := client.Do(req)
    if err != nil {
        return err
    }
    defer resp.Body.Close()

    var product map[string]interface{}
    json.NewDecoder(resp.Body).Decode(&product)

    fmt.Printf("Product: %s\n", product["title"])
    fmt.Printf("Price: %s %s\n", product["currency"], product["price"])
    fmt.Printf("Rating: %.1f (%d reviews)\n", product["rating"], int(product["review_count"].(float64)))
    fmt.Printf("Buy URL: %s\n", product["buy_url"])
    return nil
}

Response

Success Response (200 OK)

{
  "id": 18472931,
  "sku": "IPHONE15PRO256",
  "source": "shopee_sg",
  "merchant_id": "shopee_sg_123456",
  "title": "iPhone 15 Pro 256GB Natural Titanium",
  "description": "A17 Pro chip, 48MP camera, Titanium design, Action button",
  "price": "1349.00",
  "currency": "SGD",
  "buy_url": "https://shopee.sg/product/18472931",
  "affiliate_url": "https://buywhere.ai/track/abc123def456",
  "image_url": "https://cf.shopee.sg/file/xxxxx.jpg",
  "brand": "Apple",
  "category": "Mobile Phones",
  "category_path": ["Electronics", "Mobile Phones", "Smartphones"],
  "rating": 4.8,
  "review_count": 2341,
  "is_available": true,
  "in_stock": true,
  "stock_level": "in_stock",
  "specs": {
    "storage": "256GB",
    "color": "Natural Titanium",
    "display": "6.1 inch Super Retina XDR",
    "chip": "A17 Pro",
    "camera": "48MP Main + 12MP Ultra Wide + 12MP Telephoto"
  },
  "metadata": {
    "original_price": 1499.00,
    "discount_pct": 10,
    "shipping": "Free shipping"
  },
  "updated_at": "2026-04-15T12:00:00Z",
  "last_checked": "2026-04-15T12:00:00Z"
}

Response Fields

FieldTypeDescription
idintegerUnique BuyWhere product ID
skustringProduct SKU from source
sourcestringSource platform identifier
merchant_idstringMerchant/shop identifier on platform
titlestringProduct title
descriptionstringFull product description
pricestringCurrent price
currencystringISO currency code
buy_urlstringDirect link to product
affiliate_urlstringBuyWhere tracked affiliate link
image_urlstringProduct image URL
brandstringBrand name
categorystringPrimary category
category_patharrayFull category hierarchy
ratingfloatAverage rating (0-5)
review_countintegerNumber of reviews
is_availablebooleanStock availability
in_stockbooleanIn stock flag
stock_levelstringStock level indicator
specsobjectProduct specifications
metadataobjectAdditional metadata
updated_atdatetimeLast data update
last_checkeddatetimeLast availability check

Error Responses

401 Unauthorized

{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API key"
  }
}

404 Not Found

{
  "error": {
    "code": "NOT_FOUND",
    "message": "Product not found"
  }
}

Price with Currency Conversion

Get pricing in your preferred currency:

curl "https://api.buywhere.ai/v2/products/18472931?currency=USD" \
  -H "Authorization: Bearer bw_live_xxx"

Response:

{
  "id": 18472931,
  "title": "iPhone 15 Pro 256GB Natural Titanium",
  "price": "999.00",
  "currency": "USD",
  ...
}

Related Endpoints