Skip to content

淘宝 & 天猫 API - 商品详情 (V3)

此接口已过期

此接口已过时,可能会在未来的版本中被移除。请尽快迁移到新版本。

prod-global
GET
/api/taobao/get-item-detail/v3

获取淘宝/天猫商品详情数据,包括基本元数据(标题、商品ID、类别)、媒体资源(图片)、店铺信息、商品状态和价格。

典型用例:

  • 价格监控和促销追踪
  • 构建产品目录并丰富商品内容(例如图片)
  • 电商分析和竞争对手追踪

亮点

  • 基于应用的数据源。
  • 准确的优惠券后价格。
  • 适用于此接口支持的所有商品。

请求参数

参数名位置类型必填说明
tokenquerystring此 API 服务的访问令牌。
itemIdquerystring淘宝/天猫上的唯一商品标识符(商品ID)。

代码示例

💡 环境说明

默认示例使用 https://api.justoneapi.com (prod-global)。中国大陆地区建议替换为 http://47.117.133.51:30015 (prod-cn) 以获得更好的访问体验。详见 环境选择

bash
# 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
curl -X GET "https://api.justoneapi.com/api/taobao/get-item-detail/v3?token=YOUR_API_KEY&itemId=VALUE"
text
我想使用 Just One API 提供的“商品详情 (V3)”接口。
接口地址: https://api.justoneapi.com/api/taobao/get-item-detail/v3
HTTP 方法: GET
身份验证: 在 URL 后添加查询参数“?token=您的API密钥”。
OpenAPI 定义: https://docs.justoneapi.com/openapi/taobao-tmall-apis/product-details-v3-zh.json

请求参数说明:
- token (query): 此 API 服务的访问令牌。 (必填)
- itemId (query): 淘宝/天猫上的唯一商品标识符(商品ID)。 (必填)

返回格式: JSON

响应处理与错误码:
1. 需通过返回体中的 "code" 字段判断业务结果(code 为 0 表示成功)。
2. 超时建议:建议将请求超时时间设置为至少 60 秒。
3. 业务码说明:
   - 0: 成功
   - 100: Token 无效或已失效
   - 301: 采集失败,请重试
   - 302: 超出速率限制
   - 303: 超出每日配额
   - 400: 参数错误
   - 500: 内部服务器错误
   - 600: 权限不足
   - 601: 余额不足

请帮我用我擅长的编程语言写一个脚本来调用这个接口,并处理返回结果。
python
# 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
import requests

url = "https://api.justoneapi.com/api/taobao/get-item-detail/v3?token=YOUR_API_KEY&itemId=VALUE"
response = requests.get(url)
print(response.json())
js
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
const response = await fetch("https://api.justoneapi.com/api/taobao/get-item-detail/v3?token=YOUR_API_KEY&itemId=VALUE", {
  method: "GET"
});
const data = await response.json();
console.log(data);
java
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Main {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.justoneapi.com/api/taobao/get-item-detail/v3?token=YOUR_API_KEY&itemId=VALUE"))
            .method("GET", HttpRequest.BodyPublishers.noBody())
            .build();

        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}
go
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	client := &http.Client{}
	url := "https://api.justoneapi.com/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()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
php
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.justoneapi.com/api/taobao/get-item-detail/v3?token=YOUR_API_KEY&itemId=VALUE");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
curl_close($ch);
echo $response;

响应结果

json
{
  "code": 0,
  "data": {
    "apiStack": [
      {
        "name": "esi",
        "value": "{\"item\":{\"sellCount\":\"3000+\",\"skuText\":\"配送至:罗湖区,请选择商品规格\",\"images\":[\"https://img.alicdn.com/imgextra/..."
      }
    ],
    "debug": {
      "app": "detailcache",
      "cachedTimestamp": "2026-02-26T03:01:54",
      "host": "[email protected]",
      "dataFrom": "tair"
    },
    "feature": {
      "isOnLine": "true",
      "tcloudToH5": "true"
    },
    "item": {
      "brandValueId": "3300940",
      "businessId": "default",
      "cartUrl": "https://h5.m.taobao.com/awp/base/cart.htm",
      "categoryId": "50011993",
      "commentCount": "0",
      "countMultiple": [],
      "exParams": {},
      "favcount": "119",
      "h5DescV6": "false",
      "h5ItemUrl": "https://new.m.taobao.com/detail.htm?id=1019694598833&hybrid=true",
      "h5moduleDescUrl": "//mdetail.tmall.com/templates/pages/itemDesc?id=1019694598833",
      "images": [
        "//img.alicdn.com/imgextra/i1/379424083/O1CN01OJockE1g24GDEQgbN_!!4611686018427383123-2-item_pic.png"
      ],
      "itemId": "1019694598833",
      "moduleDescParams": {
        "f": "desc/icoss156110212570d8d7f9e784afa0",
        "id": "1019694598833"
      },
      "moduleDescUrl": "//hws.m.taobao.com/d/modulet/v5/WItemMouldDesc.do?id=1019694598833&f=icoss156110212570d8d7f9e784afa0",
      "newTaobaoH5DescUrl": "https://market.m.taobao.com/app/detail-project/desc/index.html?id=1019694598833&descVersion=7.0&type...",
      "openDecoration": "false",
      "pcADescUrl": "//market.m.taobao.com/app/detail-project/desc/index.html?id=1019694598833&descVersion=7.0&type=1&f=i...",
      "rootCategoryId": "1801",
      "skuText": "请选择商品规格 ",
      "subtitle": "",
      "taobaoDescUrl": "https://market.m.taobao.com/app/detail-project/desc/index.html?id=1019694598833&descVersion=7.0&type...",
      "taobaoPcDescUrl": "https://market.m.taobao.com/app/detail-project/desc/index.html?id=1019694598833&descVersion=6.0&type...",
      "title": "【李佳琦直播间爆品日付定金】珀莱雅红宝石水乳2.0套装紧致抗皱",
      "tmallDescUrl": "//mdetail.tmall.com/templates/pages/desc?id=1019694598833"
    },
    "mockData": "{\"delivery\":{},\"trade\":{\"buyEnable\":true,\"cartEnable\":true},\"feature\":{\"hasSku\":true,\"showSku\":true}...",
    "params": {
      "trackParams": {
        "brandId": "3300940",
        "BC_type": "B",
        "categoryId": "50011993"
      }
    },
    "props": {
      "groupProps": [
        {
          "基本信息": [
            {
              "品牌": "PROYA/珀莱雅"
            }
          ]
        }
      ]
    },
    "props2": {},
    "propsCut": "品牌 面部护理套装 化妆品备案编号/注册证号 功效 注册信息 产地 适用人群 保质期 包装种类 是否为特殊用途化妆品 生产厂家信息 产品类别 单品数量 ",
    "rate": {
      "goodRateInfo": {
        "goodRateRatio3m": "0.0",
        "goodRateRatioAll": "0.0",
        "rateCnt3m": "0",
        "rateCntAll": "0"
      },
      "invite": {
        "inviteText": "",
        "showInvite": "false"
      }
    },
    "resource": {
      "entrances": {
        "askAll": {
          "icon": "https://img.alicdn.com/tps/TB1tVU6PpXXXXXFaXXXXXXXXXXX-102-60.png",
          "link": "https://meta.m.taobao.com/app/mtb/taobao-ugc/ask/list?disableNav=YES&refId=1019694598833",
          "text": "对宝贝有疑问?可以向已买的人求助"
        }
      }
    },
    "seller": {
      "allItemCount": "379",
      "atmophereMask": "true",
      "atmosphereColor": "#ffffff",
      "atmosphereImg": "https://img.alicdn.com/imgextra/i2/379424083/O1CN01Seo8Tn1g23k80lTm6_!!379424083.jpg",
      "atmosphereMaskColor": "#59000000",
      "backgroundPic": "https://img.alicdn.com/imgextra/i3/O1CN01xTAR63288IdQsnpY9_!!6000000007887-0-tps-750-750.jpg",
      "brandIcon": "//gw.alicdn.com/tfs/TB1lkPnjeH2gK0jSZFEXXcqMpXa-368-52.png?getAvatar=avatar",
      "brandIconRatio": "7.3",
      "creditLevel": "20",
      "creditLevelIcon": "//gw.alicdn.com/imgextra/i1/O1CN01VD9Iap25oweneR31D_!!6000000007574-2-tps-120-60.png",
      "dataTypeLabels": [
        {
          "labelCode": "threshold_repurchase_rate",
          "outputName": "超43%的人复购",
          "processedValue": "43%"
        }
      ],
      "detail4ShopLabelInfo": {
        "dataTypeLabels": [
          {
            "labelCode": "new_shop_open_year",
            "outputName": "15年老店",
            "processedValue": "15"
          }
        ],
        "dsrLabels": [
          {
            "labelCode": "goods_label_1",
            "outputName": "88VIP好评率98%",
            "processedValue": "88VIP好评率98%"
          }
        ],
        "featureMap": {
          "nps_value": "5.0",
          "experience_ork": "99",
          "service_level": "高",
          "logistics_ork": "99",
          "service_ork": "99",
          "logistics_value": "5.0",
          "is_db": "Y",
          "nps_star_num_out": "5.0",
          "service_value": "5.0",
          "experience_desc": "99",
          "goods_level": "高",
          "bc_type": "tm",
          "goods_ork": "99",
          "goods_value": "5.0",
          "logistics_level": "高",
          "experience_level": "高"
        },
        "goodDynamicLabels": [],
        "overallScore": "5.0",
        "serviceTypeLabels": [],
        "stylizedTypeLabels": []
      },
      "entranceList": [
        {
          "action": [
            {
              "key": "open_url",
              "params": {
                "url": "//shop.m.taobao.com/shop/shop_index.htm?user_id=379424083&item_id=1019694598833&currentClickTime=-1"
              }
            }
          ],
          "backgroundColor": "#59000000",
          "borderColor": "#59ffffff",
          "text": "进店逛逛",
          "textColor": "#ffffff"
        }
      ],
      "evaluates": [
        {
          "level": "1",
          "levelBackgroundColor": "#EEEEEE",
          "levelText": "高",
          "levelTextColor": "#999999",
          "score": "4.8 ",
          "title": "宝贝描述",
          "tmallLevelBackgroundColor": "#EEEEEE",
          "tmallLevelTextColor": "#999999",
          "type": "desc"
        }
      ],
      "evaluates2": [
        {
          "level": "1",
          "levelText": "高",
          "levelTextColor": "#f0f0f0",
          "score": "4.8 ",
          "scoreTextColor": "#ffffff",
          "title": "宝贝描述",
          "titleColor": "#ffffff",
          "type": "desc"
        }
      ],
      "fans": "2496万",
      "fbt2User": "珀莱雅官方旗舰店",
      "goodDynamicLabels": [
        {
          "labelCode": "threshold_repurchase_rate",
          "outputName": "超43%的人复购",
          "processedValue": "43%"
        }
      ],
      "goodRatePercentage": "100.00%",
      "newItemCount": "45",
      "overallScore": "5.0",
      "pcShopUrl": "//shop60637940.taobao.com",
      "rankLevelPic": "//img.alicdn.com/imgextra/i2/O1CN01BqRQGe28GXgm1qhik_!!6000000007905-2-tps-133-24.png",
      "sellerNick": "珀莱雅官方旗舰店",
      "sellerType": "B",
      "serviceTypeLabels": [
        {
          "labelCode": "threshold_ww_good_cst_eva_rate_30d",
          "outputName": "客服满意度97%",
          "processedValue": "97%"
        }
      ],
      "shopCard": "掌柜近期上新45件宝贝,速览",
      "shopIcon": "//img.alicdn.com/imgextra//i4/379424083/O1CN01ocORhv1g23s1B1Y7i_!!379424083.png",
      "shopId": "60637940",
      "shopName": "珀莱雅官方旗舰店",
      "shopTextColor": "#ffffff",
      "shopType": "B",
      "shopUrl": "tmall://page.tm/shop?item_id=1019694598833&shopId=60637940",
      "shopVersion": "0",
      "showShopLinkIcon": "false",
      "simpleShopDOStatus": "1",
      "startsIcon": "https://img.alicdn.com/imgextra/i4/O1CN018GrFIW1Zx7vwjt3Jg_!!6000000003260-2-tps-91-14.png",
      "stylizedTypeLabels": [],
      "taoShopUrl": "//shop.m.taobao.com/shop/shop_index.htm?user_id=379424083&item_id=1019694598833",
      "useFallbackImage": "true",
      "userId": "379424083"
    },
    "skuBase": {
      "props": [
        {
          "name": "商品规格",
          "pid": "-1",
          "values": [
            {
              "image": "//img.alicdn.com/imgextra/i3/379424083/O1CN01IndZtP1g24GEdq67U_!!379424083.jpg",
              "name": "水120ml+乳120ml",
              "vid": "-1"
            }
          ]
        }
      ],
      "skus": [
        {
          "propPath": "-1:-1",
          "skuId": "6196136571178"
        }
      ]
    },
    "vertical": {
      "askAll": {
        "showNum": "2",
        "askIcon": "https://img.alicdn.com/tps/TB1tVU6PpXXXXXFaXXXXXXXXXXX-102-60.png",
        "askText": "宝贝好不好,问问已买的人",
        "modelList": null,
        "answerText": null,
        "questNum": "0",
        "linkUrl": "https://meta.m.taobao.com/app/mtb/taobao-ugc/ask/list?disableNav=YES&refId=1019694598833",
        "model4XList": null,
        "title": "问大家",
        "answerIcon": null
      }
    }
  }
}

💡 提示:为简化展示,列表类数据样例仅保留 1-2 条记录,实际返回条数以接口响应为准。