---
title: "Taobao and Tmall Product Details API (V6)"
description: "Retrieves Taobao or Tmall product details by item ID through the V6 endpoint, including approximate sales, shipping fees and free-shipping status. Use it for product research and ecommerce monitoring."
aiUsagePrompt: true
---

# Taobao and Tmall Product Details API \(V6\)

<ApiTester
  method="GET"
  :path='JSON.parse("\"/api/taobao/get-item-detail/v6\"")'
  :summary='JSON.parse("\"Product Details (V6)\"")'
  openapiDefinitionUrl="https://docs.justoneapi.com/openapi/taobao-and-tmall/product-details-v6-en.json"
  openapiVersion="3.1.0"
  :parameters='JSON.parse("[{\"name\":\"token\",\"in\":\"query\",\"description\":\"Access token for this API service.\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"itemId\",\"in\":\"query\",\"description\":\"Unique product identifier on Taobao/Tmall (item ID).\",\"required\":true,\"schema\":{\"type\":\"string\"}}]")'
  :requestBody='JSON.parse("null")'
  :responses='JSON.parse("{\"200\":{\"description\":\"OK\",\"content\":{\"application/json\":{\"schema\":{\"if\":{\"properties\":{\"code\":{\"const\":0}},\"required\":[\"code\"]},\"then\":{\"properties\":{\"data\":{\"type\":[\"object\",\"null\"],\"description\":\"Product details for the requested Taobao or Tmall item. A successful response can have null data.\",\"properties\":{\"item\":{\"type\":\"object\",\"description\":\"Product information and media.\",\"properties\":{\"itemId\":{\"type\":\"string\",\"description\":\"Taobao or Tmall item ID as text.\"},\"title\":{\"type\":\"string\",\"description\":\"Product title.\"},\"categoryId\":{\"type\":\"string\",\"description\":\"Product category ID as text, which may be empty.\"},\"originalPrice\":{\"type\":\"number\",\"description\":\"Reported original product price.\"},\"price\":{\"type\":\"number\",\"description\":\"Reported product price.\"},\"couponPrice\":{\"type\":\"string\",\"description\":\"Reported price after coupons as text, which may be empty.\"},\"images\":{\"type\":\"array\",\"description\":\"Main and carousel product images.\",\"items\":{\"type\":\"string\",\"description\":\"URL for one product image.\"}},\"detailImages\":{\"type\":\"array\",\"description\":\"Images shown in the product description.\",\"items\":{\"type\":\"string\",\"description\":\"URL for one product description image.\"}},\"desc\":{\"type\":\"string\",\"description\":\"Product description returned as HTML text.\"},\"attribute\":{\"type\":\"array\",\"description\":\"Product attributes returned as name and value pairs.\",\"items\":{\"type\":\"object\",\"description\":\"One product attribute.\",\"properties\":{\"key\":{\"type\":\"string\",\"description\":\"Display name of the product attribute.\"},\"value\":{\"type\":\"string\",\"description\":\"Display value of the product attribute.\"}}}},\"videoUrl\":{\"type\":\"string\",\"description\":\"Product video URL, which may be empty.\"},\"videos\":{\"type\":\"array\",\"description\":\"Video entries when supplied. This array can be empty when videoUrl is populated.\"},\"videoId\":{\"type\":\"string\",\"description\":\"Reported product video ID, which may be empty.\"},\"videoCover\":{\"type\":\"string\",\"description\":\"Reported video cover URL, which may be empty.\"}}},\"seller\":{\"type\":\"object\",\"description\":\"Shop and seller information returned for the item.\",\"properties\":{\"shopId\":{\"type\":\"string\",\"description\":\"Taobao or Tmall shop ID as text.\"},\"shopName\":{\"type\":\"string\",\"description\":\"Reported shop name, which may be empty.\"},\"sellerId\":{\"type\":\"string\",\"description\":\"Seller account ID as text, which may be empty.\"},\"sellerName\":{\"type\":\"string\",\"description\":\"Reported seller name, which may be empty.\"}}},\"delivery\":{\"type\":\"object\",\"description\":\"Shipping information returned for the item.\",\"properties\":{\"postage\":{\"type\":\"string\",\"description\":\"Displayed shipping fee text, which may be empty.\"},\"from\":{\"type\":\"string\",\"description\":\"Displayed shipping origin, which may be empty.\"},\"to\":{\"type\":\"string\",\"description\":\"Displayed shipping destination, which may be empty.\"}}},\"skuBase\":{\"type\":\"object\",\"description\":\"Product variants and their specification options.\",\"properties\":{\"skus\":{\"type\":\"array\",\"description\":\"SKU variants returned for the product.\",\"items\":{\"type\":\"object\",\"description\":\"One SKU variant.\",\"properties\":{\"skuId\":{\"type\":\"string\",\"description\":\"SKU identifier as text. Use it to look up the corresponding sku2info entry.\"},\"propPath\":{\"type\":\"string\",\"description\":\"Encoded specification path for this SKU. Some identifiers in the path can be missing from props.\"}}}},\"props\":{\"type\":\"array\",\"description\":\"Product specification properties with their available values.\",\"items\":{\"type\":\"object\",\"description\":\"One specification property.\",\"properties\":{\"pid\":{\"type\":\"string\",\"description\":\"Specification property ID as text.\"},\"pname\":{\"type\":\"string\",\"description\":\"Specification property display name under pname, when supplied.\"},\"name\":{\"type\":\"string\",\"description\":\"Specification property display name under name, when supplied.\"},\"values\":{\"type\":\"array\",\"description\":\"Available values for this property.\",\"items\":{\"type\":\"object\",\"description\":\"One specification value.\",\"properties\":{\"vid\":{\"type\":\"string\",\"description\":\"Specification value ID as text.\"},\"vname\":{\"type\":\"string\",\"description\":\"Specification value display name under vname, when supplied.\"},\"name\":{\"type\":\"string\",\"description\":\"Specification value display name under name, when supplied.\"},\"sku_url\":{\"type\":\"string\",\"description\":\"Image URL reported for the specification value under sku_url, which may be empty.\"},\"image\":{\"type\":\"string\",\"description\":\"Image URL reported for the specification value under image.\"}}}}}}}}},\"skuCore\":{\"type\":\"object\",\"description\":\"Price and quantity information for the item and its variants.\",\"properties\":{\"sku2info\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\",\"description\":\"Price and quantity information for this map entry.\",\"properties\":{\"quantity\":{\"type\":\"integer\",\"description\":\"Reported inventory quantity for this entry.\"},\"originalPrice\":{\"type\":\"number\",\"description\":\"Reported original price for this entry.\"},\"price\":{\"type\":\"number\",\"description\":\"Reported price for this entry.\"},\"couponPrice\":{\"type\":\"string\",\"description\":\"Reported post-coupon price for this entry as text, which may be empty.\"}}},\"description\":\"Map keyed by SKU ID. The entry under key 0 can carry product-level quantity and price values.\"}}},\"status\":{\"type\":\"integer\",\"description\":\"Numeric status code reported with the product details.\"},\"tid\":{\"type\":\"string\",\"description\":\"Product identifier reported at response level as text. It can match item.itemId.\"}}}}},\"allOf\":[{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}]}}}},\"400\":{\"description\":\"Invalid request parameters or body\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"401\":{\"description\":\"Invalid or inactive access token\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"403\":{\"description\":\"Permission denied\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"429\":{\"description\":\"Request rate or daily quota limit exceeded\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"500\":{\"description\":\"Internal server error\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"503\":{\"description\":\"Service temporarily unavailable\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}}}")'
  :servers='JSON.parse("[{\"url\":\"https://api.justoneapi.com\",\"description\":\"Global production API (default)\"}]")'
  :security='JSON.parse("[]")'
  :securitySchemes='JSON.parse("{}")'
  :schemas='JSON.parse("{}")'
/>

<ApiHealthSection :api='JSON.parse("\"/api/taobao/get-item-detail/v6\"")' />

<p>Retrieves Taobao or Tmall product details by item ID through the V6 endpoint, including approximate sales, shipping fees and free-shipping status. Use it for product research and ecommerce monitoring.</p>

## Highlights

::: info Capability · Price
<p>Returns the original product price and SKU prices.</p>
:::

::: info Capability · Attributes
<p>Provides product attributes as names and values.</p>
:::

::: info Capability · SKU options
<p>Provides SKU identifiers, specification options and quantity information.</p>
:::

::: info Capability · Main and carousel images
<p>Provides product main and carousel images.</p>
:::

::: info Capability · Description images
<p>Provides a separate description-image list and description HTML.</p>
:::

::: tip Capability
<p>This endpoint can retrieve approximate sales volume.</p>
:::

::: tip Capability
<p>This endpoint provides shipping fee information, including whether shipping is free.</p>
:::

## Parameters

<div class="api-doc-table api-doc-table--params">

| Name | In | Type | Required | Default | Description |
| --- | --- | --- | --- | --- | --- |
| <code>token</code> | query | <code>string</code> | Yes | - | Access token for this API service. |
| <code>itemId</code> | query | <code>string</code> | Yes | - | Unique product identifier on Taobao/Tmall (item ID). |

</div>

## Code Samples

::: code-group

```bash [🐚 cURL]
curl --max-time 120 -X GET 'https://api.justoneapi.com/api/taobao/get-item-detail/v6?token=YOUR_API_KEY&itemId=VALUE'
```

```text [🤖 AI Prompt]
I want to use the "Product Details (V6)" API from JustOneAPI.
Base URL: https://api.justoneapi.com.
API Path: /api/taobao/get-item-detail/v6?token=YOUR_API_KEY&itemId=VALUE
API Endpoint: BASE_URL + /api/taobao/get-item-detail/v6?token=YOUR_API_KEY&itemId=VALUE
HTTP Method: GET
Authentication: Append the "token" query parameter to the URL.
OpenAPI Definition: https://docs.justoneapi.com/openapi/taobao-and-tmall/product-details-v6-en.json

Parameters:
- token (query): Access token for this API service. (Required)
- itemId (query): Unique product identifier on Taobao/Tmall (item ID). (Required)

Return format: safely handle JSON or text according to the actual Content-Type.

Response Handling & Error Codes:
1. Business results should be determined by the "code" field in the response body (code 0 means success).
2. Timeout Recommendation: Set the request timeout to 120 seconds. If 120 seconds is too long for your use case, use at least 60 seconds, but a small number of requests may time out before receiving a result.
3. Business Code Reference:
   - 0: Success
   - 100: Invalid or Inactive Token
   - 301: Collection Failed. Please Retry.
   - 302: Rate Limit Exceeded
   - 303: Daily Quota Exceeded
   - 400: Invalid Parameters
   - 500: Internal Server Error
   - 600: Permission Denied
   - 601: Insufficient Balance
   - 602: Token Budget Exceeded
4. Code 601 means the shared account balance is insufficient. Code 602 means the current API token's own cumulative budget limit has been reached. Token budget limits do not transfer funds out of the shared account balance.

Please help me write a script in my preferred programming language to call this API and handle the response.
```

```python [🐍 Python]
import requests

BASE_URL = "https://api.justoneapi.com"  # Provided by OpenAPI servers

url = BASE_URL + "/api/taobao/get-item-detail/v6?token=YOUR_API_KEY&itemId=VALUE"
response = requests.get(url, timeout=120)
print(response.status_code)
if response.content:
    content_type = response.headers.get("content-type", "").lower()
    if "json" in content_type:
        try:
            print(response.json())
        except ValueError:
            print(response.text)
    elif content_type.startswith("text/") or "xml" in content_type or content_type.split(";", 1)[0].strip() in {"application/javascript", "application/x-www-form-urlencoded", "application/graphql"}:
        print(response.text)
    else:
        with open("response.bin", "wb") as output:
            output.write(response.content)
        print(f"Saved {len(response.content)} bytes to response.bin")
```

```js [🌐 JavaScript]
const BASE_URL = "https://api.justoneapi.com"; // Provided by OpenAPI servers
const url = BASE_URL + "/api/taobao/get-item-detail/v6?token=YOUR_API_KEY&itemId=VALUE";

const response = await fetch(url, {
  method: "GET",
  signal: AbortSignal.timeout(120000)
});
console.log(response.status);
const responseBytes = await response.arrayBuffer();
if (responseBytes.byteLength) {
  const contentType = (response.headers.get("content-type") || "").toLowerCase();
  const mediaType = contentType.split(";", 1)[0].trim();
  const textual = contentType.startsWith("text/") || contentType.includes("json") || contentType.includes("xml") || ["application/javascript", "application/x-www-form-urlencoded", "application/graphql"].includes(mediaType);
  if (textual) {
    const responseText = new TextDecoder().decode(responseBytes);
    let data = responseText;
    if (contentType.includes("json")) {
      try { data = JSON.parse(responseText); } catch { /* Keep the raw body. */ }
    }
    console.log(data);
  } else {
    console.log(`Received ${responseBytes.byteLength} binary bytes`);
  }
}
```

```java [☕ Java]
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;

public class Main {
    public static void main(String[] args) throws Exception {
        final String BASE_URL = "https://api.justoneapi.com"; // Provided by OpenAPI servers
        final String url = BASE_URL + "/api/taobao/get-item-detail/v6?token=YOUR_API_KEY&itemId=VALUE";

        HttpClient client = HttpClient.newBuilder().connectTimeout(Duration.ofSeconds(120)).build();
        HttpRequest.Builder builder = HttpRequest.newBuilder()
            .uri(URI.create(url))
            .timeout(Duration.ofSeconds(120))
            .method("GET", HttpRequest.BodyPublishers.noBody());

        HttpRequest request = builder.build();

        HttpResponse<byte[]> response = client.send(request, HttpResponse.BodyHandlers.ofByteArray());
        System.out.println(response.statusCode());
        String contentType = response.headers().firstValue("content-type").orElse("").toLowerCase();
        String mediaType = contentType.split(";", 2)[0].trim();
        if (contentType.startsWith("text/") || contentType.contains("json") || contentType.contains("xml") || mediaType.equals("application/javascript") || mediaType.equals("application/x-www-form-urlencoded") || mediaType.equals("application/graphql")) {
            System.out.println(new String(response.body(), StandardCharsets.UTF_8));
        } else {
            Files.write(Path.of("response.bin"), response.body());
            System.out.println("Saved " + response.body().length + " bytes to response.bin");
        }
    }
}
```

```go [🐹 Go]
package main

import (
	"fmt"
	"io"
	"os"
	"strings"
	"net/http"
	"time"
)

const BASE_URL = "https://api.justoneapi.com" // Provided by OpenAPI servers

func main() {
	client := &http.Client{Timeout: 120 * time.Second}
	url := BASE_URL + "/api/taobao/get-item-detail/v6?token=YOUR_API_KEY&itemId=VALUE"
	req, _ := http.NewRequest("GET", url, nil)
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	fmt.Println(resp.StatusCode)
	bodyBytes, _ := io.ReadAll(resp.Body)
	contentType := strings.ToLower(resp.Header.Get("Content-Type"))
	mediaType := strings.TrimSpace(strings.SplitN(contentType, ";", 2)[0])
	if strings.HasPrefix(contentType, "text/") || strings.Contains(contentType, "json") || strings.Contains(contentType, "xml") || mediaType == "application/javascript" || mediaType == "application/x-www-form-urlencoded" || mediaType == "application/graphql" {
		fmt.Println(string(bodyBytes))
	} else {
		os.WriteFile("response.bin", bodyBytes, 0600)
		fmt.Printf("Saved %d bytes to response.bin\n", len(bodyBytes))
	}
}
```

```php [🐘 PHP]
<?php
$BASE_URL = 'https://api.justoneapi.com'; // Provided by OpenAPI servers
$url = $BASE_URL . '/api/taobao/get-item-detail/v6?token=YOUR_API_KEY&itemId=VALUE';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
$contentType = strtolower((string) curl_getinfo($ch, CURLINFO_CONTENT_TYPE));
curl_close($ch);
echo $status . PHP_EOL;
$mediaType = trim(explode(';', $contentType, 2)[0]);
if (str_starts_with($contentType, 'text/') || str_contains($contentType, 'json') || str_contains($contentType, 'xml') || in_array($mediaType, ['application/javascript', 'application/x-www-form-urlencoded', 'application/graphql'], true)) {
    echo $response;
} else {
    file_put_contents('response.bin', $response);
    echo 'Saved ' . strlen($response) . ' bytes to response.bin' . PHP_EOL;
}
```

:::

<div style="text-align: right; margin-top: -20px; margin-bottom: 20px;">
<a href="/openapi/taobao-and-tmall/product-details-v6-en.json" target="_blank" style="font-size: 12px; color: var(--vp-c-text-3); text-decoration: none; opacity: 0.8;">[OpenAPI Definition (JSON)]</a>
</div>

## Response Fields

Key fields in a successful response (`code = 0`).

<div class="api-doc-table api-doc-table--response">

| Field path | Type | Description |
| --- | --- | --- |
| <code>data</code> | <code>object &#124; null</code> | Product details for the requested Taobao or Tmall item. A successful response can have null data. |
| <code>data.item</code> | <code>object</code> | Product information and media. |
| <code>data.item.itemId</code> | <code>string</code> | Taobao or Tmall item ID as text. |
| <code>data.item.title</code> | <code>string</code> | Product title. |
| <code>data.item.categoryId</code> | <code>string</code> | Product category ID as text, which may be empty. |
| <code>data.item.originalPrice</code> | <code>number</code> | Reported original product price. |
| <code>data.item.price</code> | <code>number</code> | Reported product price. |
| <code>data.item.couponPrice</code> | <code>string</code> | Reported price after coupons as text, which may be empty. |
| <code>data.item.images</code> | <code>array</code> | Main and carousel product images. |
| <code>data.item.images[]</code> | <code>string</code> | URL for one product image. |
| <code>data.item.detailImages</code> | <code>array</code> | Images shown in the product description. |
| <code>data.item.detailImages[]</code> | <code>string</code> | URL for one product description image. |
| <code>data.item.desc</code> | <code>string</code> | Product description returned as HTML text. |
| <code>data.item.attribute</code> | <code>array</code> | Product attributes returned as name and value pairs. |
| <code>data.item.attribute[]</code> | <code>object</code> | One product attribute. |
| <code>data.item.attribute[].key</code> | <code>string</code> | Display name of the product attribute. |
| <code>data.item.attribute[].value</code> | <code>string</code> | Display value of the product attribute. |
| <code>data.item.videoUrl</code> | <code>string</code> | Product video URL, which may be empty. |
| <code>data.item.videos</code> | <code>array</code> | Video entries when supplied. This array can be empty when videoUrl is populated. |
| <code>data.item.videoId</code> | <code>string</code> | Reported product video ID, which may be empty. |
| <code>data.item.videoCover</code> | <code>string</code> | Reported video cover URL, which may be empty. |
| <code>data.seller</code> | <code>object</code> | Shop and seller information returned for the item. |
| <code>data.seller.shopId</code> | <code>string</code> | Taobao or Tmall shop ID as text. |
| <code>data.seller.shopName</code> | <code>string</code> | Reported shop name, which may be empty. |
| <code>data.seller.sellerId</code> | <code>string</code> | Seller account ID as text, which may be empty. |
| <code>data.seller.sellerName</code> | <code>string</code> | Reported seller name, which may be empty. |
| <code>data.delivery</code> | <code>object</code> | Shipping information returned for the item. |
| <code>data.delivery.postage</code> | <code>string</code> | Displayed shipping fee text, which may be empty. |
| <code>data.delivery.from</code> | <code>string</code> | Displayed shipping origin, which may be empty. |
| <code>data.delivery.to</code> | <code>string</code> | Displayed shipping destination, which may be empty. |
| <code>data.skuBase</code> | <code>object</code> | Product variants and their specification options. |
| <code>data.skuBase.skus</code> | <code>array</code> | SKU variants returned for the product. |
| <code>data.skuBase.skus[]</code> | <code>object</code> | One SKU variant. |
| <code>data.skuBase.skus[].skuId</code> | <code>string</code> | SKU identifier as text. Use it to look up the corresponding sku2info entry. |
| <code>data.skuBase.skus[].propPath</code> | <code>string</code> | Encoded specification path for this SKU. Some identifiers in the path can be missing from props. |
| <code>data.skuBase.props</code> | <code>array</code> | Product specification properties with their available values. |
| <code>data.skuBase.props[]</code> | <code>object</code> | One specification property. |
| <code>data.skuBase.props[].pid</code> | <code>string</code> | Specification property ID as text. |
| <code>data.skuBase.props[].pname</code> | <code>string</code> | Specification property display name under pname, when supplied. |
| <code>data.skuBase.props[].name</code> | <code>string</code> | Specification property display name under name, when supplied. |
| <code>data.skuBase.props[].values</code> | <code>array</code> | Available values for this property. |
| <code>data.skuBase.props[].values[]</code> | <code>object</code> | One specification value. |
| <code>data.skuBase.props[].values[].vid</code> | <code>string</code> | Specification value ID as text. |
| <code>data.skuBase.props[].values[].vname</code> | <code>string</code> | Specification value display name under vname, when supplied. |
| <code>data.skuBase.props[].values[].name</code> | <code>string</code> | Specification value display name under name, when supplied. |
| <code>data.skuBase.props[].values[].sku_url</code> | <code>string</code> | Image URL reported for the specification value under sku_url, which may be empty. |
| <code>data.skuBase.props[].values[].image</code> | <code>string</code> | Image URL reported for the specification value under image. |
| <code>data.skuCore</code> | <code>object</code> | Price and quantity information for the item and its variants. |
| <code>data.skuCore.sku2info</code> | <code>object</code> | Map keyed by SKU ID. The entry under key 0 can carry product-level quantity and price values. |
| <code>data.skuCore.sku2info.{key}</code> | <code>object</code> | Price and quantity information for this map entry. |
| <code>data.skuCore.sku2info.{key}.quantity</code> | <code>integer</code> | Reported inventory quantity for this entry. |
| <code>data.skuCore.sku2info.{key}.originalPrice</code> | <code>number</code> | Reported original price for this entry. |
| <code>data.skuCore.sku2info.{key}.price</code> | <code>number</code> | Reported price for this entry. |
| <code>data.skuCore.sku2info.{key}.couponPrice</code> | <code>string</code> | Reported post-coupon price for this entry as text, which may be empty. |
| <code>data.status</code> | <code>integer</code> | Numeric status code reported with the product details. |
| <code>data.tid</code> | <code>string</code> | Product identifier reported at response level as text. It can match item.itemId. |

</div>

## Response Example

<ApiExampleSection :api='JSON.parse("\"/api/taobao/get-item-detail/v6\"")' />

