---
title: "Taobao and Tmall Product Details API (V3)"
description: "Retrieves Taobao or Tmall product details by item ID through the V3 endpoint. Use it to perform direct product lookup for catalog research, product monitoring, or ecommerce analysis."
aiUsagePrompt: true
---

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

<ApiTester
  method="GET"
  :path='JSON.parse("\"/api/taobao/get-item-detail/v3\"")'
  :summary='JSON.parse("\"Product Details (V3)\"")'
  openapiDefinitionUrl="https://docs.justoneapi.com/openapi/taobao-and-tmall/product-details-v3-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\",\"description\":\"Taobao or Tmall product details, media, SKU variants, and seller information.\",\"properties\":{\"num_iid\":{\"type\":\"string\",\"description\":\"Taobao or Tmall item ID, returned as a string.\"},\"title\":{\"type\":\"string\",\"description\":\"Display title of the item.\"},\"brand\":{\"type\":\"string\",\"description\":\"Brand name reported for the item.\"},\"cid\":{\"type\":\"string\",\"description\":\"Marketplace category ID for the item, returned as text.\"},\"location\":{\"type\":\"string\",\"description\":\"Location displayed for the item.\"},\"detail_url\":{\"type\":\"string\",\"description\":\"Link to the product detail page.\"},\"pic_url\":{\"type\":\"string\",\"description\":\"Main product image URL.\"},\"desc\":{\"type\":\"string\",\"description\":\"Product description as HTML text.\"},\"desc_img\":{\"type\":\"array\",\"description\":\"Image URLs reported for the product description.\",\"items\":{\"type\":\"string\",\"description\":\"URL of a product description image.\"}},\"item_imgs\":{\"type\":\"array\",\"description\":\"Images returned for the product listing.\",\"items\":{\"type\":\"object\",\"description\":\"One product image record.\",\"properties\":{\"url\":{\"type\":\"string\",\"description\":\"URL of the product image.\"}}}},\"video\":{\"type\":\"object\",\"description\":\"Video information returned with the item.\",\"properties\":{\"url\":{\"type\":\"string\",\"description\":\"Product video URL. It can be an empty string.\"}}},\"price\":{\"type\":\"string\",\"description\":\"Item price reported in the response, returned as text.\"},\"orginal_price\":{\"type\":\"string\",\"description\":\"Reported original item price, returned as text.\"},\"num\":{\"type\":\"integer\",\"description\":\"Quantity reported at the item level.\"},\"sales\":{\"type\":\"integer\",\"description\":\"Sales count reported for the item.\"},\"total_sold\":{\"type\":[\"string\",\"integer\"],\"description\":\"Reported total sold, returned as text or an integer.\"},\"skus\":{\"type\":\"object\",\"description\":\"SKU information and reported variant rows.\",\"properties\":{\"sku\":{\"type\":\"array\",\"description\":\"SKU variant rows reported for the item.\",\"items\":{\"type\":\"object\",\"description\":\"One SKU and its selected specifications, pricing, and quantity.\",\"properties\":{\"sku_id\":{\"type\":[\"string\",\"integer\"],\"description\":\"SKU ID, returned as a string or integer.\"},\"properties\":{\"type\":\"string\",\"description\":\"SKU specification path made of property ID and option ID pairs.\"},\"properties_name\":{\"type\":\"string\",\"description\":\"Specification property and option labels for this SKU, returned as text.\"},\"price\":{\"type\":\"number\",\"description\":\"Reported numeric price for the SKU.\"},\"orginal_price\":{\"type\":\"number\",\"description\":\"Reported numeric original price for the SKU.\"},\"quantity\":{\"type\":[\"string\",\"integer\"],\"description\":\"Reported quantity for the SKU, returned as text or an integer.\"}}}}}},\"props\":{\"type\":\"array\",\"description\":\"Item attributes returned as name and value pairs.\",\"items\":{\"type\":\"object\",\"description\":\"One descriptive product attribute.\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"Display name of the product attribute.\"},\"value\":{\"type\":\"string\",\"description\":\"Display value of the product attribute.\"}}}},\"props_name\":{\"type\":\"string\",\"description\":\"Specification properties and option labels returned as a text string.\"},\"props_list\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"string\",\"description\":\"Display label for the property and option pair in the map key.\"},\"description\":\"Specification label map keyed by the property ID and option ID pair.\"},\"prop_imgs\":{\"type\":\"object\",\"description\":\"Specification image collection returned with the item.\",\"properties\":{\"prop_img\":{\"type\":\"array\",\"description\":\"Images associated with specification options.\",\"items\":{\"type\":\"object\",\"description\":\"An image for one specification option.\",\"properties\":{\"properties\":{\"type\":\"string\",\"description\":\"Property and option ID pair associated with the image.\"},\"url\":{\"type\":\"string\",\"description\":\"Image URL for the specification option.\"}}}}}},\"props_imgs\":{\"type\":\"object\",\"description\":\"Additional specification image collection returned with the item.\",\"properties\":{\"prop_img\":{\"type\":\"array\",\"description\":\"Images associated with specification options.\",\"items\":{\"type\":\"object\",\"description\":\"An image for one specification option.\",\"properties\":{\"properties\":{\"type\":\"string\",\"description\":\"Property and option ID pair associated with the image.\"},\"url\":{\"type\":\"string\",\"description\":\"Image URL for the specification option.\"}}}}}},\"props_img\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"string\",\"description\":\"Image URL for the property and option pair in the map key.\"},\"description\":\"Specification image URL map keyed by the property ID and option ID pair.\"},\"seller_id\":{\"type\":\"string\",\"description\":\"Seller ID, returned as a string.\"},\"shop_id\":{\"type\":\"string\",\"description\":\"Shop ID, returned as a string.\"},\"nick\":{\"type\":\"string\",\"description\":\"Seller nickname reported with the item.\"},\"tmall\":{\"type\":\"boolean\",\"description\":\"Whether the item is marked as a Tmall listing.\"},\"seller_info\":{\"type\":\"object\",\"description\":\"Seller and shop information associated with the item.\",\"properties\":{\"nick\":{\"type\":\"string\",\"description\":\"Display nickname of the seller.\"},\"shop_name\":{\"type\":\"string\",\"description\":\"Display name of the shop.\"},\"zhuy\":{\"type\":\"string\",\"description\":\"Link to the seller homepage.\"}}}}}}},\"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/v3\"")' />

<p>Retrieves Taobao or Tmall product details by item ID through the V3 endpoint. Use it to perform direct product lookup for catalog research, product monitoring, or ecommerce analysis.</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>
:::

## 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/v3?token=YOUR_API_KEY&itemId=VALUE'
```

```text [🤖 AI Prompt]
I want to use the "Product Details (V3)" API from JustOneAPI.
Base URL: https://api.justoneapi.com.
API Path: /api/taobao/get-item-detail/v3?token=YOUR_API_KEY&itemId=VALUE
API Endpoint: BASE_URL + /api/taobao/get-item-detail/v3?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-v3-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/v3?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/v3?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/v3?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/v3?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/v3?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-v3-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</code> | Taobao or Tmall product details, media, SKU variants, and seller information. |
| <code>data.num_iid</code> | <code>string</code> | Taobao or Tmall item ID, returned as a string. |
| <code>data.title</code> | <code>string</code> | Display title of the item. |
| <code>data.brand</code> | <code>string</code> | Brand name reported for the item. |
| <code>data.cid</code> | <code>string</code> | Marketplace category ID for the item, returned as text. |
| <code>data.location</code> | <code>string</code> | Location displayed for the item. |
| <code>data.detail_url</code> | <code>string</code> | Link to the product detail page. |
| <code>data.pic_url</code> | <code>string</code> | Main product image URL. |
| <code>data.desc</code> | <code>string</code> | Product description as HTML text. |
| <code>data.desc_img</code> | <code>array</code> | Image URLs reported for the product description. |
| <code>data.desc_img[]</code> | <code>string</code> | URL of a product description image. |
| <code>data.item_imgs</code> | <code>array</code> | Images returned for the product listing. |
| <code>data.item_imgs[]</code> | <code>object</code> | One product image record. |
| <code>data.item_imgs[].url</code> | <code>string</code> | URL of the product image. |
| <code>data.video</code> | <code>object</code> | Video information returned with the item. |
| <code>data.video.url</code> | <code>string</code> | Product video URL. It can be an empty string. |
| <code>data.price</code> | <code>string</code> | Item price reported in the response, returned as text. |
| <code>data.orginal_price</code> | <code>string</code> | Reported original item price, returned as text. |
| <code>data.num</code> | <code>integer</code> | Quantity reported at the item level. |
| <code>data.sales</code> | <code>integer</code> | Sales count reported for the item. |
| <code>data.total_sold</code> | <code>string &#124; integer</code> | Reported total sold, returned as text or an integer. |
| <code>data.skus</code> | <code>object</code> | SKU information and reported variant rows. |
| <code>data.skus.sku</code> | <code>array</code> | SKU variant rows reported for the item. |
| <code>data.skus.sku[]</code> | <code>object</code> | One SKU and its selected specifications, pricing, and quantity. |
| <code>data.skus.sku[].sku_id</code> | <code>string &#124; integer</code> | SKU ID, returned as a string or integer. |
| <code>data.skus.sku[].properties</code> | <code>string</code> | SKU specification path made of property ID and option ID pairs. |
| <code>data.skus.sku[].properties_name</code> | <code>string</code> | Specification property and option labels for this SKU, returned as text. |
| <code>data.skus.sku[].price</code> | <code>number</code> | Reported numeric price for the SKU. |
| <code>data.skus.sku[].orginal_price</code> | <code>number</code> | Reported numeric original price for the SKU. |
| <code>data.skus.sku[].quantity</code> | <code>string &#124; integer</code> | Reported quantity for the SKU, returned as text or an integer. |
| <code>data.props</code> | <code>array</code> | Item attributes returned as name and value pairs. |
| <code>data.props[]</code> | <code>object</code> | One descriptive product attribute. |
| <code>data.props[].name</code> | <code>string</code> | Display name of the product attribute. |
| <code>data.props[].value</code> | <code>string</code> | Display value of the product attribute. |
| <code>data.props_name</code> | <code>string</code> | Specification properties and option labels returned as a text string. |
| <code>data.props_list</code> | <code>object</code> | Specification label map keyed by the property ID and option ID pair. |
| <code>data.props_list.{key}</code> | <code>string</code> | Display label for the property and option pair in the map key. |
| <code>data.prop_imgs</code> | <code>object</code> | Specification image collection returned with the item. |
| <code>data.prop_imgs.prop_img</code> | <code>array</code> | Images associated with specification options. |
| <code>data.prop_imgs.prop_img[]</code> | <code>object</code> | An image for one specification option. |
| <code>data.prop_imgs.prop_img[].properties</code> | <code>string</code> | Property and option ID pair associated with the image. |
| <code>data.prop_imgs.prop_img[].url</code> | <code>string</code> | Image URL for the specification option. |
| <code>data.props_imgs</code> | <code>object</code> | Additional specification image collection returned with the item. |
| <code>data.props_imgs.prop_img</code> | <code>array</code> | Images associated with specification options. |
| <code>data.props_imgs.prop_img[]</code> | <code>object</code> | An image for one specification option. |
| <code>data.props_imgs.prop_img[].properties</code> | <code>string</code> | Property and option ID pair associated with the image. |
| <code>data.props_imgs.prop_img[].url</code> | <code>string</code> | Image URL for the specification option. |
| <code>data.props_img</code> | <code>object</code> | Specification image URL map keyed by the property ID and option ID pair. |
| <code>data.props_img.{key}</code> | <code>string</code> | Image URL for the property and option pair in the map key. |
| <code>data.seller_id</code> | <code>string</code> | Seller ID, returned as a string. |
| <code>data.shop_id</code> | <code>string</code> | Shop ID, returned as a string. |
| <code>data.nick</code> | <code>string</code> | Seller nickname reported with the item. |
| <code>data.tmall</code> | <code>boolean</code> | Whether the item is marked as a Tmall listing. |
| <code>data.seller_info</code> | <code>object</code> | Seller and shop information associated with the item. |
| <code>data.seller_info.nick</code> | <code>string</code> | Display nickname of the seller. |
| <code>data.seller_info.shop_name</code> | <code>string</code> | Display name of the shop. |
| <code>data.seller_info.zhuy</code> | <code>string</code> | Link to the seller homepage. |

</div>

## Response Example

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

