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

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

<ApiTester
  method="GET"
  :path='JSON.parse("\"/api/taobao/get-item-detail/v7\"")'
  :summary='JSON.parse("\"Product Details (V7)\"")'
  openapiDefinitionUrl="https://docs.justoneapi.com/openapi/taobao-and-tmall/product-details-v7-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 product and SKU information returned by Item Detail V7.\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Taobao product ID, returned as a string.\"},\"title\":{\"type\":\"string\",\"description\":\"Title returned for the product.\"},\"categoryId\":{\"type\":\"string\",\"description\":\"Product category ID, returned as a string.\"},\"shopId\":{\"type\":\"string\",\"description\":\"Taobao shop ID, returned as a string.\"},\"shopName\":{\"type\":\"string\",\"description\":\"Shop name returned for the product.\"},\"price\":{\"type\":[\"string\",\"integer\"],\"description\":\"Product price in its original representation. Current samples use a string and the archived format uses an integer.\"},\"originPrice\":{\"type\":\"string\",\"description\":\"Original product price returned as text.\"},\"deliveryPrice\":{\"type\":\"string\",\"description\":\"Reported delivery price, returned as text.\"},\"images\":{\"type\":\"array\",\"description\":\"Product gallery image URLs.\",\"items\":{\"type\":\"string\"}},\"videoUrl\":{\"type\":\"string\",\"description\":\"Product video URL, when available.\"},\"descArray\":{\"type\":\"array\",\"description\":\"Image URLs returned for the product description.\",\"items\":{\"type\":\"string\"}},\"properties\":{\"type\":\"array\",\"description\":\"Attribute name and value pairs returned for the product.\",\"items\":{\"type\":\"object\",\"properties\":{\"key\":{\"type\":\"string\",\"description\":\"Name of the product attribute.\"},\"value\":{\"type\":\"string\",\"description\":\"Value of the product attribute.\"}}}},\"specsList\":{\"type\":\"array\",\"description\":\"Selectable specification groups and their options.\",\"items\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"Display name of the specification group.\"},\"pid\":{\"type\":\"string\",\"description\":\"Specification property ID, returned as a string.\"},\"values\":{\"type\":\"array\",\"description\":\"Selectable options in the specification group.\",\"items\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"Display name of the specification option.\"},\"vid\":{\"type\":\"string\",\"description\":\"Specification option ID, returned as a string.\"},\"image\":{\"type\":\"string\",\"description\":\"Image URL for the specification option. It can be empty or omitted.\"}}}}}}},\"specs\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"array\",\"description\":\"Option display name followed by an image URL when present. The image URL can be empty.\",\"items\":{\"type\":\"string\",\"description\":\"Display name or image URL at this position in the option.\"}},\"description\":\"Options keyed by the property and option ID pair.\"},\"description\":\"Specification options grouped by their display names.\"},\"skus\":{\"type\":\"array\",\"description\":\"SKU rows returned in the current product detail format.\",\"items\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Serialized specification option pairs for the SKU. A trailing separator can appear.\"},\"skuId\":{\"type\":[\"string\",\"integer\"],\"description\":\"Taobao SKU ID. It can be returned as a string or an integer.\"},\"img\":{\"type\":\"string\",\"description\":\"Image URL returned for the SKU.\"},\"price\":{\"type\":\"string\",\"description\":\"Reported price for the SKU, returned as text.\"},\"origin_price\":{\"type\":\"string\",\"description\":\"Reported original price for the SKU, returned as text.\"},\"quantity\":{\"type\":\"string\",\"description\":\"Reported stock quantity for the SKU, returned as text.\"}}}},\"subject\":{\"type\":\"string\",\"description\":\"Product title returned in the archived V7 format.\"},\"detailUrl\":{\"type\":\"string\",\"description\":\"Product detail page URL returned in the archived V7 format.\"},\"mainImg\":{\"type\":\"string\",\"description\":\"Main product image URL in the archived V7 format.\"},\"imageList\":{\"type\":\"array\",\"description\":\"Product gallery image URLs in the archived V7 format.\",\"items\":{\"type\":\"string\"}},\"description\":{\"type\":\"string\",\"description\":\"Product description returned as HTML in the archived V7 format.\"},\"deliveryTime\":{\"type\":\"string\",\"description\":\"Delivery time text returned in the archived V7 format.\"},\"expressFee\":{\"type\":\"integer\",\"description\":\"Reported shipping fee in the archived V7 format, returned as an integer.\"},\"startQuantity\":{\"type\":\"integer\",\"description\":\"Starting order quantity reported in the archived V7 format.\"},\"skuVoList\":{\"type\":\"array\",\"description\":\"SKU rows observed in the archived V7 format.\",\"items\":{\"type\":\"object\",\"properties\":{\"price\":{\"type\":\"integer\",\"description\":\"Reported SKU price in the archived V7 format, returned as an integer.\"},\"stock\":{\"type\":\"integer\",\"description\":\"Reported SKU stock quantity in the archived V7 format.\"},\"skuAttr\":{\"type\":\"array\",\"description\":\"SKU attributes returned in the archived V7 format.\",\"items\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"Display name of the archived SKU attribute.\"},\"enumValue\":{\"type\":\"string\",\"description\":\"Display value of the archived SKU attribute.\"},\"enumImageUrl\":{\"type\":\"string\",\"description\":\"Image URL for the archived SKU attribute value.\"}}}}}}}}}}},\"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/v7\"")' />

<p>Retrieves Taobao or Tmall product details by item ID through the V7 endpoint. Use it to perform direct product lookup for catalog research, product monitoring, or ecommerce analysis.</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/v7?token=YOUR_API_KEY&itemId=VALUE'
```

```text [🤖 AI Prompt]
I want to use the "Product Details (V7)" API from JustOneAPI.
Base URL: https://api.justoneapi.com.
API Path: /api/taobao/get-item-detail/v7?token=YOUR_API_KEY&itemId=VALUE
API Endpoint: BASE_URL + /api/taobao/get-item-detail/v7?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-v7-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/v7?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/v7?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/v7?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/v7?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/v7?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-v7-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 product and SKU information returned by Item Detail V7. |
| <code>data.id</code> | <code>string</code> | Taobao product ID, returned as a string. |
| <code>data.title</code> | <code>string</code> | Title returned for the product. |
| <code>data.categoryId</code> | <code>string</code> | Product category ID, returned as a string. |
| <code>data.shopId</code> | <code>string</code> | Taobao shop ID, returned as a string. |
| <code>data.shopName</code> | <code>string</code> | Shop name returned for the product. |
| <code>data.price</code> | <code>string &#124; integer</code> | Product price in its original representation. Current samples use a string and the archived format uses an integer. |
| <code>data.originPrice</code> | <code>string</code> | Original product price returned as text. |
| <code>data.deliveryPrice</code> | <code>string</code> | Reported delivery price, returned as text. |
| <code>data.images</code> | <code>array</code> | Product gallery image URLs. |
| <code>data.images[]</code> | <code>string</code> | - |
| <code>data.videoUrl</code> | <code>string</code> | Product video URL, when available. |
| <code>data.descArray</code> | <code>array</code> | Image URLs returned for the product description. |
| <code>data.descArray[]</code> | <code>string</code> | - |
| <code>data.properties</code> | <code>array</code> | Attribute name and value pairs returned for the product. |
| <code>data.properties[]</code> | <code>object</code> | - |
| <code>data.properties[].key</code> | <code>string</code> | Name of the product attribute. |
| <code>data.properties[].value</code> | <code>string</code> | Value of the product attribute. |
| <code>data.specsList</code> | <code>array</code> | Selectable specification groups and their options. |
| <code>data.specsList[]</code> | <code>object</code> | - |
| <code>data.specsList[].name</code> | <code>string</code> | Display name of the specification group. |
| <code>data.specsList[].pid</code> | <code>string</code> | Specification property ID, returned as a string. |
| <code>data.specsList[].values</code> | <code>array</code> | Selectable options in the specification group. |
| <code>data.specsList[].values[]</code> | <code>object</code> | - |
| <code>data.specsList[].values[].name</code> | <code>string</code> | Display name of the specification option. |
| <code>data.specsList[].values[].vid</code> | <code>string</code> | Specification option ID, returned as a string. |
| <code>data.specsList[].values[].image</code> | <code>string</code> | Image URL for the specification option. It can be empty or omitted. |
| <code>data.specs</code> | <code>object</code> | Specification options grouped by their display names. |
| <code>data.specs.{key}</code> | <code>object</code> | Options keyed by the property and option ID pair. |
| <code>data.specs.{key}.{key}</code> | <code>array</code> | Option display name followed by an image URL when present. The image URL can be empty. |
| <code>data.specs.{key}.{key}[]</code> | <code>string</code> | Display name or image URL at this position in the option. |
| <code>data.skus</code> | <code>array</code> | SKU rows returned in the current product detail format. |
| <code>data.skus[]</code> | <code>object</code> | - |
| <code>data.skus[].id</code> | <code>string</code> | Serialized specification option pairs for the SKU. A trailing separator can appear. |
| <code>data.skus[].skuId</code> | <code>string &#124; integer</code> | Taobao SKU ID. It can be returned as a string or an integer. |
| <code>data.skus[].img</code> | <code>string</code> | Image URL returned for the SKU. |
| <code>data.skus[].price</code> | <code>string</code> | Reported price for the SKU, returned as text. |
| <code>data.skus[].origin_price</code> | <code>string</code> | Reported original price for the SKU, returned as text. |
| <code>data.skus[].quantity</code> | <code>string</code> | Reported stock quantity for the SKU, returned as text. |
| <code>data.subject</code> | <code>string</code> | Product title returned in the archived V7 format. |
| <code>data.detailUrl</code> | <code>string</code> | Product detail page URL returned in the archived V7 format. |
| <code>data.mainImg</code> | <code>string</code> | Main product image URL in the archived V7 format. |
| <code>data.imageList</code> | <code>array</code> | Product gallery image URLs in the archived V7 format. |
| <code>data.imageList[]</code> | <code>string</code> | - |
| <code>data.description</code> | <code>string</code> | Product description returned as HTML in the archived V7 format. |
| <code>data.deliveryTime</code> | <code>string</code> | Delivery time text returned in the archived V7 format. |
| <code>data.expressFee</code> | <code>integer</code> | Reported shipping fee in the archived V7 format, returned as an integer. |
| <code>data.startQuantity</code> | <code>integer</code> | Starting order quantity reported in the archived V7 format. |
| <code>data.skuVoList</code> | <code>array</code> | SKU rows observed in the archived V7 format. |
| <code>data.skuVoList[]</code> | <code>object</code> | - |
| <code>data.skuVoList[].price</code> | <code>integer</code> | Reported SKU price in the archived V7 format, returned as an integer. |
| <code>data.skuVoList[].stock</code> | <code>integer</code> | Reported SKU stock quantity in the archived V7 format. |
| <code>data.skuVoList[].skuAttr</code> | <code>array</code> | SKU attributes returned in the archived V7 format. |
| <code>data.skuVoList[].skuAttr[]</code> | <code>object</code> | - |
| <code>data.skuVoList[].skuAttr[].name</code> | <code>string</code> | Display name of the archived SKU attribute. |
| <code>data.skuVoList[].skuAttr[].enumValue</code> | <code>string</code> | Display value of the archived SKU attribute. |
| <code>data.skuVoList[].skuAttr[].enumImageUrl</code> | <code>string</code> | Image URL for the archived SKU attribute value. |

</div>

## Response Example

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

