淘宝平台提供了 API 接口可以用于获取淘宝商品详情信息。通过 API 接口,我们可以获取到商品的基本信息、价格、评论及评价等详细信息。以下是使用说明:
- 获取淘宝API账号
在获取淘宝商品详情 API 之前,建议先注册账号。注册完成后,获取应用程序的 AppKey 和 AppSecret。这些信息是使用 API 接口的必要条件。
- 了解淘宝商品详情 API
淘宝商品详情 API 提供了多种接口可以使用,我们可以通过编写代码或者使用相应的 SDK 库来调用这些接口。其中,最常用的是 taobao.item.get
接口。此接口可以获取到指定商品的详细信息,例如价格、标题、图片、描述、所属类目等信息。使用这个接口需要提供商品的 id。
- 调用淘宝商品详情 API
我们可以使用多种编程语言(如 Java、 Python、 PHP 等)调用淘宝商品详情 API。在调用 API 时需要提供 AppKey 和 AppSecret,以及需要获取的商品 id。以下是 Python 代码的示例:
{
"item": {
"num_iid": "717786839610",
"title": "高端天丝连衣裙女2023年夏季新款收腰显瘦时尚木耳领A字裙子气质",
"desc_short": "",
"price": 469,
"total_price": "",
"suggestive_price": "",
"orginal_price": 586,
"nick": "欧黎蔓旗舰店",
"num": 200,
"detail_url": "https://item.taobao.com/item.htm?id=717786839610",
"pic_url": "https://img.alicdn.com/imgextra/i2/2158125235/O1CN01sTqOdS1oXgFApiERQ_!!2158125235.jpg",
"brand": null,
"brandId": "",
"rootCatId": "",
"cid": 50010850,
"desc": "<img class=\"desc_anchor\" id=\"desc-module-1\" src=\"http://assets.alicdn.com/kissy/1.0.0/build/imglazyload/spaceball.gif\" />\n <div>\n \n </div>\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" >\n <tbody>\n <tr>\n <td>\n <div class=\"hlg_list_55571017\">\n <img src=\"http://img.alicdn.com/imgextra/i1/2158125235/O1CN01WgjTxn1oXgFjxopQe_!!2158125235.gif\" alt=\"无线投放(13).gif\" usemap=\"#hlg_map_1686648728862_1\" /> \n <map name=\"hlg_map_1686648728862_1\"> </map>\n </div></td>\n </tr>\n </tbody>\n </table>\n <div>\n \n </div>\n <div>\n \n </div>\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" >\n <tbody>\n <tr>\n <td>\n <div class=\"hlg_list_55604246\">\n <img src=\"http://img.alicdn.com/imgextra/i4/2158125235/O1CN01dIe5vs1oXgFoYbrLw_!!2158125235.png\" alt=\"衬衫.png\" usemap=\"#hlg_map_1686722798646_1\" /> \n <map name=\"hlg_map_1686722798646_1\"> </map>\n </div></td>\n </tr>\n </tbody>\n </table>\n <div>\n \n </div>\n <p><img src=\"http://img.alicdn.com/imgextra/i3/2158125235/O1CN01ctMiIG1oXgFByfHI3_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i1/2158125235/O1CN0129ZsA11oXgF3FCmhV_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i3/2158125235/O1CN01NvHMEd1oXgFCHlnuw_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i2/2158125235/O1CN01SLKlPx1oXgFByfLZV_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i4/2158125235/O1CN01Gu7uIH1oXgFJWhgV0_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i3/2158125235/O1CN01IuawFA1oXgFCHnY3X_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i4/2158125235/O1CN015g6zis1oXgFG4c3pR_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i3/2158125235/O1CN01Rx0wqr1oXgFCHotDp_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i3/2158125235/O1CN01RMpQaz1oXgFIhBl6r_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i2/2158125235/O1CN011Gh9vE1oXgFJWi5SY_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i3/2158125235/O1CN01BKTriN1oXgFDMv95F_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i3/2158125235/O1CN01iB2zGC1oXgFByfgLT_!!2158125235.jpg\" align=\"absmiddle\" /></p>\n <div class=\"hlg_rand_722820047\" >\n 142824410\n </div>\n <img class=\"desc_anchor\" id=\"desc-module-2\" src=\"http://assets.alicdn.com/kissy/1.0.0/build/imglazyload/spaceball.gif\" />\n <p><img src=\"http://img.alicdn.com/imgextra/i2/2158125235/O1CN01IG1Ygz1oXgFeFTP73_!!2158125235.png\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i2/2158125235/O1CN01QRraIL1oXgF9s2WCu_!!2158125235.jpg\" align=\"absmiddle\" /></p> \n <div class=\"hlg_rand_722820047\" >\n 142824410\n </div>\n <img class=\"desc_anchor\" id=\"desc-module-3\" src=\"http://assets.alicdn.com/kissy/1.0.0/build/imglazyload/spaceball.gif\" />\n <p><img src=\"http://img.alicdn.com/imgextra/i3/2158125235/O1CN01YzDNNT1oXgFHdTREK_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i3/2158125235/O1CN01kYzNpO1oXgF9s5bds_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i3/2158125235/O1CN013J11QL1oXgFFULeyC_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i4/2158125235/O1CN01CyCsmg1oXgFFUNsCt_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i1/2158125235/O1CN01STSV4j1oXgFDgE1MC_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i3/2158125235/O1CN01IqcBgq1oXgFG4iEn1_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i1/2158125235/O1CN01Wj6zC11oXgFIhG3dh_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i2/2158125235/O1CN01TB5RCo1oXgFDgFxwr_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i4/2158125235/O1CN01FspqJn1oXgFBxRwtx_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i1/2158125235/O1CN01YvLBJd1oXgFByo4ct_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i3/2158125235/O1CN01qpHVhq1oXgFDgEM9y_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i4/2158125235/O1CN01vHiKhq1oXgFHdUAwl_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i3/2158125235/O1CN01VxOJ281oXgFH7Gabw_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i1/2158125235/O1CN01629C4b1oXgFIhGatf_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i4/2158125235/O1CN01lSYmE91oXgFFUNP5I_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i4/2158125235/O1CN013qih971oXgFEpAfYp_!!2158125235.jpg\" align=\"absmiddle\" /></p>\n <div class=\"hlg_rand_722820047\" >\n 142824410\n </div>\n <img class=\"desc_anchor\" id=\"desc-module-4\" src=\"http://assets.alicdn.com/kissy/1.0.0/build/imglazyload/spaceball.gif\" />\n <p><img src=\"http://img.alicdn.com/imgextra/i4/2158125235/O1CN01YO5wt61oXgFHdZ4t6_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i2/2158125235/O1CN01ijNfZg1oXgF9sAqHg_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i1/2158125235/O1CN01NiUK0m1oXgFIhMlkf_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i2/2158125235/O1CN01K2zEqD1oXgF9BAWum_!!2158125235.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i3/2158125235/O1CN01IXw6WV1oXgFG4m8FF_!!2158125235.jpg\" align=\"absmiddle\" /></p>\n <div class=\"hlg_rand_722820047\" >\n 142824410\n </div>\n <img class=\"desc_anchor\" id=\"desc-module-5\" src=\"http://assets.alicdn.com/kissy/1.0.0/build/imglazyload/spaceball.gif\" />\n <p><img src=\"http://img.alicdn.com/imgextra/i2/2158125235/O1CN0135Flk41oXgEJejNa4_!!2158125235.png\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i2/2158125235/O1CN01ZNwtKd1oXgEDqN60a_!!2158125235.png\" align=\"absmiddle\" /> </p>\n <div class=\"hlg_rand_722820047\" >\n 142824410\n </div><img src=\"https://www.o0b.cn/i.php?t.png&rid=gw-4.64896476aa22e&p=3702633709&k=i_key&t=1686725753\" style=\"display:none\" />",
"item_imgs": [
{
"url": "https://img.alicdn.com/imgextra/i2/2158125235/O1CN01sTqOdS1oXgFApiERQ_!!2158125235.jpg"
},
{
"url": "https://img.alicdn.com/imgextra/i3/2158125235/O1CN01pmYtUu1oXgFGUvIay_!!2158125235.png"
},
{
"url": "https://img.alicdn.com/imgextra/i4/2158125235/O1CN01FwZup41oXgFHYITXX_!!2158125235.png"
},
{
"url": "https://img.alicdn.com/imgextra/i3/2158125235/O1CN01bFaH0f1oXgF8ikvQQ_!!2158125235.png"
},
{
"url": "https://img.alicdn.com/imgextra/i4/2158125235/O1CN017Y2cjU1oXgF26DzUX_!!2158125235.png"
}
],
"item_weight": "",
"post_fee": 0,
"freight": "",
"express_fee": "",
"ems_fee": "",
"shipping_to": "",
"video": {
"url": "http://cloud.video.taobao.com/play/u/2158125235/p/2/e/6/t/1/409537760854.mp4?appKey=38829"
},
"sample_id": "",
"props_name": "20509:400082597:尺码:155/80A/XS;20509:400082598:尺码:160/84A/S;20509:68952669:尺码:165/88A/M;20509:24413852:尺码:170/92A/L;20509:400082599:尺码:175/96A/XL;20509:400082597:尺码:155/80A/XS;20509:400082598:尺码:160/84A/S;20509:68952669:尺码:165/88A/M;20509:24413852:尺码:170/92A/L;20509:400082599:尺码:175/96A/XL;1627207:93407511:颜色分类:米杏色;1627207:93407511:颜色分类:米杏色;1627207:93407511:颜色分类:米杏色;1627207:93407511:颜色分类:米杏色;1627207:93407511:颜色分类:米杏色;1627207:8853034:颜色分类:果绿色;1627207:8853034:颜色分类:果绿色;1627207:8853034:颜色分类:果绿色;1627207:8853034:颜色分类:果绿色;1627207:8853034:颜色分类:果绿色",
"prop_imgs": {
"prop_img": [
{
"properties": "1627207:93407511",
"url": "//img.alicdn.com/imgextra/i1/2158125235/O1CN01YlbvPy1oXgF4lhMOE_!!2158125235.jpg"
},
{
"properties": "1627207:8853034",
"url": "//img.alicdn.com/imgextra/i1/2158125235/O1CN01ETrhnF1oXgF3fjfb7_!!2158125235.jpg"
}
]
},
"props_imgs": {
"prop_img": [
{
"properties": "1627207:93407511",
"url": "//img.alicdn.com/imgextra/i1/2158125235/O1CN01YlbvPy1oXgF4lhMOE_!!2158125235.jpg"
},
{
"properties": "1627207:8853034",
"url": "//img.alicdn.com/imgextra/i1/2158125235/O1CN01ETrhnF1oXgF3fjfb7_!!2158125235.jpg"
}
]
},
"property_alias": "",
"props": [
{
"name": "品牌",
"value": "欧黎蔓 "
},
{
"name": "适用年龄",
"value": "30-34周岁 "
},
{
"name": "尺码",
"value": "155/80A/XS 160/84A/S 165/88A/M 170/92A/L 175/96A/XL "
},
{
"name": "图案",
"value": "纯色 "
},
{
"name": "风格",
"value": "通勤 "
},
{
"name": "通勤",
"value": "OL风格 "
},
{
"name": "领型",
"value": "木耳边领 "
},
{
"name": "腰型",
"value": "高腰 "
},
{
"name": "衣门襟",
"value": "套头 "
},
{
"name": "颜色分类",
"value": "米杏色 果绿色 "
},
{
"name": "袖型",
"value": "常规 "
},
{
"name": "组合形式",
"value": "单件 "
},
{
"name": "货号",
"value": "2302LYQ501102 "
},
{
"name": "裙型",
"value": "H版型 "
},
{
"name": "适用季节",
"value": "夏季 "
},
{
"name": "年份季节",
"value": "2023年夏季 "
},
{
"name": "袖长",
"value": "短袖 "
},
{
"name": "裙长",
"value": "长裙 "
},
{
"name": "流行元素/工艺",
"value": "纽扣 "
},
{
"name": "款式",
"value": "A字裙 "
},
{
"name": "销售渠道类型",
"value": "商场同款(线上线下都销售) "
},
{
"name": "材质成分",
"value": "莱赛尔纤维(莱赛尔)68% 聚酯纤维32% "
}
],
"total_sold": "-1",
"skus": {
"sku": [
{
"price": 469,
"total_price": 0,
"orginal_price": 586,
"properties": "20509:400082597;1627207:93407511",
"properties_name": "20509:400082597:尺码:155/80A/XS;1627207:93407511:颜色分类:米杏色",
"quantity": 175,
"sku_id": "5194743362811"
},
{
"price": 469,
"total_price": 0,
"orginal_price": 586,
"properties": "20509:400082598;1627207:93407511",
"properties_name": "20509:400082598:尺码:160/84A/S;1627207:93407511:颜色分类:米杏色",
"quantity": 171,
"sku_id": "5181844247624"
},
{
"price": 469,
"total_price": 0,
"orginal_price": 586,
"properties": "20509:68952669;1627207:93407511",
"properties_name": "20509:68952669:尺码:165/88A/M;1627207:93407511:颜色分类:米杏色",
"quantity": 112,
"sku_id": "5181844247628"
},
{
"price": 469,
"total_price": 0,
"orginal_price": 586,
"properties": "20509:24413852;1627207:93407511",
"properties_name": "20509:24413852:尺码:170/92A/L;1627207:93407511:颜色分类:米杏色",
"quantity": 170,
"sku_id": "5181844247622"
},
{
"price": 469,
"total_price": 0,
"orginal_price": 586,
"properties": "20509:400082599;1627207:93407511",
"properties_name": "20509:400082599:尺码:175/96A/XL;1627207:93407511:颜色分类:米杏色",
"quantity": 185,
"sku_id": "5181844247626"
},
{
"price": 469,
"total_price": 0,
"orginal_price": 586,
"properties": "20509:400082597;1627207:8853034",
"properties_name": "20509:400082597:尺码:155/80A/XS;1627207:8853034:颜色分类:果绿色",
"quantity": 0,
"sku_id": "5194743362810"
},
{
"price": 469,
"total_price": 0,
"orginal_price": 586,
"properties": "20509:400082598;1627207:8853034",
"properties_name": "20509:400082598:尺码:160/84A/S;1627207:8853034:颜色分类:果绿色",
"quantity": 86,
"sku_id": "5181844247623"
},
{
"price": 469,
"total_price": 0,
"orginal_price": 586,
"properties": "20509:68952669;1627207:8853034",
"properties_name": "20509:68952669:尺码:165/88A/M;1627207:8853034:颜色分类:果绿色",
"quantity": 98,
"sku_id": "5181844247627"
},
{
"price": 469,
"total_price": 0,
"orginal_price": 586,
"properties": "20509:24413852;1627207:8853034",
"properties_name": "20509:24413852:尺码:170/92A/L;1627207:8853034:颜色分类:果绿色",
"quantity": 97,
"sku_id": "5181844247621"
},
{
"price": 469,
"total_price": 0,
"orginal_price": 586,
"properties": "20509:400082599;1627207:8853034",
"properties_name": "20509:400082599:尺码:175/96A/XL;1627207:8853034:颜色分类:果绿色",
"quantity": 97,
"sku_id": "5181844247625"
}
]
},
"seller_id": "2158125235",
"sales": 0,
"shop_id": "112493499",
"props_list": {
"20509:400082597": "尺码:155/80A/XS",
"20509:400082598": "尺码:160/84A/S",
"20509:68952669": "尺码:165/88A/M",
"20509:24413852": "尺码:170/92A/L",
"20509:400082599": "尺码:175/96A/XL",
"1627207:93407511": "颜色分类:米杏色",
"1627207:8853034": "颜色分类:果绿色"
},
"seller_info": {
"nick": "欧黎蔓旗舰店",
"item_score": 4.84984,
"score_p": 4.89327,
"delivery_score": 4.90537,
"shop_type": "",
"user_num_id": "2158125235",
"sid": "112493499",
"title": "",
"zhuy": "https://shop112493499.taobao.com/",
"cert": null,
"open_time": "",
"credit_score": null,
"shop_name": "欧黎蔓旗舰店"
},
"tmall": true,
"error": "",
"location": "湖北武汉",
"data_from": "Ha",
"has_discount": "true",
"is_promotion": "true",
"promo_type": null,
"props_img": {
"1627207:93407511": "//img.alicdn.com/imgextra/i1/2158125235/O1CN01YlbvPy1oXgF4lhMOE_!!2158125235.jpg",
"1627207:8853034": "//img.alicdn.com/imgextra/i1/2158125235/O1CN01ETrhnF1oXgF3fjfb7_!!2158125235.jpg"
},
"format_check": "ok",
"desc_img": [
"http://assets.alicdn.com/kissy/1.0.0/build/imglazyload/spaceball.gif",
"http://img.alicdn.com/imgextra/i1/2158125235/O1CN01WgjTxn1oXgFjxopQe_!!2158125235.gif",
"http://img.alicdn.com/imgextra/i4/2158125235/O1CN01dIe5vs1oXgFoYbrLw_!!2158125235.png",
"http://img.alicdn.com/imgextra/i3/2158125235/O1CN01ctMiIG1oXgFByfHI3_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i1/2158125235/O1CN0129ZsA11oXgF3FCmhV_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i3/2158125235/O1CN01NvHMEd1oXgFCHlnuw_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i2/2158125235/O1CN01SLKlPx1oXgFByfLZV_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i4/2158125235/O1CN01Gu7uIH1oXgFJWhgV0_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i3/2158125235/O1CN01IuawFA1oXgFCHnY3X_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i4/2158125235/O1CN015g6zis1oXgFG4c3pR_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i3/2158125235/O1CN01Rx0wqr1oXgFCHotDp_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i3/2158125235/O1CN01RMpQaz1oXgFIhBl6r_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i2/2158125235/O1CN011Gh9vE1oXgFJWi5SY_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i3/2158125235/O1CN01BKTriN1oXgFDMv95F_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i3/2158125235/O1CN01iB2zGC1oXgFByfgLT_!!2158125235.jpg",
"http://assets.alicdn.com/kissy/1.0.0/build/imglazyload/spaceball.gif",
"http://img.alicdn.com/imgextra/i2/2158125235/O1CN01IG1Ygz1oXgFeFTP73_!!2158125235.png",
"http://img.alicdn.com/imgextra/i2/2158125235/O1CN01QRraIL1oXgF9s2WCu_!!2158125235.jpg",
"http://assets.alicdn.com/kissy/1.0.0/build/imglazyload/spaceball.gif",
"http://img.alicdn.com/imgextra/i3/2158125235/O1CN01YzDNNT1oXgFHdTREK_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i3/2158125235/O1CN01kYzNpO1oXgF9s5bds_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i3/2158125235/O1CN013J11QL1oXgFFULeyC_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i4/2158125235/O1CN01CyCsmg1oXgFFUNsCt_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i1/2158125235/O1CN01STSV4j1oXgFDgE1MC_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i3/2158125235/O1CN01IqcBgq1oXgFG4iEn1_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i1/2158125235/O1CN01Wj6zC11oXgFIhG3dh_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i2/2158125235/O1CN01TB5RCo1oXgFDgFxwr_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i4/2158125235/O1CN01FspqJn1oXgFBxRwtx_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i1/2158125235/O1CN01YvLBJd1oXgFByo4ct_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i3/2158125235/O1CN01qpHVhq1oXgFDgEM9y_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i4/2158125235/O1CN01vHiKhq1oXgFHdUAwl_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i3/2158125235/O1CN01VxOJ281oXgFH7Gabw_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i1/2158125235/O1CN01629C4b1oXgFIhGatf_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i4/2158125235/O1CN01lSYmE91oXgFFUNP5I_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i4/2158125235/O1CN013qih971oXgFEpAfYp_!!2158125235.jpg",
"http://assets.alicdn.com/kissy/1.0.0/build/imglazyload/spaceball.gif",
"http://img.alicdn.com/imgextra/i4/2158125235/O1CN01YO5wt61oXgFHdZ4t6_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i2/2158125235/O1CN01ijNfZg1oXgF9sAqHg_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i1/2158125235/O1CN01NiUK0m1oXgFIhMlkf_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i2/2158125235/O1CN01K2zEqD1oXgF9BAWum_!!2158125235.jpg",
"http://img.alicdn.com/imgextra/i3/2158125235/O1CN01IXw6WV1oXgFG4m8FF_!!2158125235.jpg",
"http://assets.alicdn.com/kissy/1.0.0/build/imglazyload/spaceball.gif",
"http://img.alicdn.com/imgextra/i2/2158125235/O1CN0135Flk41oXgEJejNa4_!!2158125235.png",
"http://img.alicdn.com/imgextra/i2/2158125235/O1CN01ZNwtKd1oXgEDqN60a_!!2158125235.png"
],
"shop_item": [],
"relate_items": []
},
"error": "",
"secache": "148e5aefc29fc358fbef1222dce8e0f1",
"secache_time": 1686725753,
"secache_date": "2023-06-14 14:55:53",
"translate_status": "",
"translate_time": 0,
"language": {
"default_lang": "cn",
"current_lang": "cn"
},
"reason": "",
"error_code": "0000",
该代码调用了 taobao.item.get
接口,并提供了需要获取的字段 title
、price
、detail_url
和商品 id num_iid
。调用成功后,将会返回关于该商品的信息。我们可以使用相应的字段名称来获取特定的信息,例如 title
表示商品名称,price
表示商品价格。
以上便是使用淘宝商品详情 API 的基本说明,当然,还有其他的 API 接口可以使用,可根据自己的需求来进行选择和使用。