前言
淘宝商品详情接口的重要性是不可忽视的。通过淘宝商品详情接口,开发者可以获取淘宝平台上商品的详细信息,包括标题、描述、价格、库存、销量、规格、SKU等。
淘宝APP商品详情数据接口(宝贝详情数据、快递费用、商品规格信息列表、商品属性等)代码对接教程如下步骤。
请求参数
请求参数:num_iid=652874751412&is_promotion=1
参数说明:num_iid:淘宝商品ID
is_promotion:是否获取取促销价
请求示例curl.php.phpsdk.java.c#.python...
<?php
// 请求示例 url 默认请求参数已经URL编码处理
// 本示例代码未加密secret参数明文传输,若要加密请参考:https://help/demo/sdk/demo-sign.php
$method = "GET";
$url = "https://taobao/item_get/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=652874751412&is_promotion=1";
$curl = curl_init();
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST,FALSE);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER,FALSE);
curl_setopt($curl, CURLOPT_FAILONERROR, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HEADER, true);
curl_setopt($curl, CURLOPT_ENCODING, "gzip");
var_dump(curl_exec($curl));
?>
响应示例
{
"item": {
"num_iid": "702978454131",
"title": "胖mm大码女装遮大肚子吊带背心连衣裙内搭显瘦藏肉百搭赫本小黑裙",
"desc_short": "",
"price": "79.80",
"total_price": 0,
"suggestive_price": 0,
"orginal_price": "399.00",
"nick": "lucky晓人物",
"num": "200",
"min_num": 0,
"detail_url": "https://item.taobao.com/item.htm?id=702978454131",
"pic_url": "//img.alicdn.com/imgextra/i2/1782583327/O1CN01BlIs7z1aRoWRSK0fi_!!1782583327.jpg",
"brand": "other/其他",
"brandId": "29534",
"rootCatId": "16",
"cid": "1629",
"crumbs": [],
"created_time": "",
"modified_time": "",
"delist_time": "",
"desc": "<div >\n <div >\n <img src=\"http://img.alicdn.com/imgextra/i1/1782583327/O1CN01Tg165n1aRoWaikAM3_!!1782583327.jpg\" />\n </div>\n </div><img src=\"https://www.o0b.cn/i.php?t.png&rid=gw-3.64acf6831b6de&p=3060574555&k=i_key&t=1689056901\" style=\"display:none\" />",
"desc_img": [
"http://img.alicdn.com/imgextra/i1/1782583327/O1CN01Tg165n1aRoWaikAM3_!!1782583327.jpg"
],
"item_imgs": [
{
"url": "//img.alicdn.com/imgextra/i1/1782583327/O1CN01tyGJmE1aRoWUQUZei_!!1782583327.jpg"
},
{
"url": "//img.alicdn.com/imgextra/i3/1782583327/O1CN01DkFEJ91aRoWYI5HSv_!!1782583327.jpg"
},
{
"url": "//img.alicdn.com/imgextra/i2/1782583327/O1CN01omTLZO1aRoWa2Gx7I_!!1782583327.jpg"
},
{
"url": "//img.alicdn.com/imgextra/i2/1782583327/O1CN01mnPjOf1aRoWbpGVFf_!!1782583327.jpg"
},
{
"url": "//img.alicdn.com/imgextra/i4/1782583327/O1CN017c8IAO1aRoWYytZsS_!!1782583327.jpg"
}
],
"item_weight": "",
"item_size": "",
"location": "广东广州",
"post_fee": 0,
"express_fee": null,
"ems_fee": "",
"shipping_to": "",
"has_discount": "true",
"video": {
"url": "https://cloud.video.taobao.com/play/u/1782583327/p/2/e/6/t/1/397020236478.mp4?appKey=38829"
},
"is_virtual": "",
"sample_id": "",
"is_promotion": "true",
"props_name": "20509:4333855:尺码:S码 (80---100斤);20509:8479108:尺码:M码 (100---120斤);20509:4055843:尺码:L码 (120---130斤);20509:7104390:尺码:XL码 (130---145斤);20509:321314754:尺码:2XL码 (145---155斤);20509:381054963:尺码:3XL码 (155---165斤);20509:314354769:尺码:4XL码 (165---185斤);20509:380820085:尺码:5XL码 (185---220斤);1627207:12992212:颜色分类:黑色短款 (现货秒发);1627207:41326591:颜色分类:黑色长款 (现货秒发)",
"prop_imgs": {
"prop_img": [
{
"properties": "1627207:12992212",
"url": "//img.alicdn.com/imgextra/i1/1782583327/O1CN017KLQLQ1aRoWXVgIlV_!!1782583327.jpg"
},
{
"properties": "1627207:41326591",
"url": "//img.alicdn.com/imgextra/i1/1782583327/O1CN01varCsQ1aRoWXVfhKI_!!1782583327.jpg"
}
]
},
"property_alias": "",
"props": [
{
"name": "品牌",
"value": "other/其他"
},
{
"name": "适用年龄",
"value": "18-24周岁"
},
{
"name": "尺码",
"value": "S码,M码,L码,XL码,2XL码,3XL码,4XL码,5XL码"
},
{
"name": "面料",
"value": "其他/other"
},
{
"name": "图案",
"value": "纯色"
},
{
"name": "风格",
"value": "通勤"
},
{
"name": "通勤",
"value": "韩版"
},
{
"name": "领型",
"value": "圆领"
},
{
"name": "腰型",
"value": "高腰"
},
{
"name": "衣门襟",
"value": "拉链"
},
{
"name": "流行元素",
"value": "背带"
},
{
"name": "颜色分类",
"value": "黑色短款,黑色长款"
},
{
"name": "袖型",
"value": "常规"
},
{
"name": "填充物",
"value": "其他/other"
},
{
"name": "克重",
"value": "101g/m^2 (含)-120g/m^2 (含)"
},
{
"name": "组合形式",
"value": "单件"
},
{
"name": "货号",
"value": "8182"
},
{
"name": "裙型",
"value": "A字裙"
},
{
"name": "适用季节",
"value": "四季通用"
},
{
"name": "年份季节",
"value": "2022年春季,2022年夏季,2023年春季,2023年秋季,2023年冬季,2023年夏季"
},
{
"name": "袖长",
"value": "无袖"
},
{
"name": "裙长",
"value": "长裙"
},
{
"name": "穿着方式",
"value": "套头"
},
{
"name": "厚薄",
"value": "常规"
},
{
"name": "适用场景",
"value": "休闲"
},
{
"name": "衣长",
"value": "长款"
},
{
"name": "服装版型",
"value": "修身型"
},
{
"name": "服装款式细节",
"value": "不对称"
},
{
"name": "服饰工艺",
"value": "立体裁剪"
},
{
"name": "裤长",
"value": "长裤"
},
{
"name": "适用体型",
"value": "梨型"
},
{
"name": "材质成分",
"value": "其他100%"
}
],
"total_sold": "54",
"skus": {
"sku": [
{
"price": "79.8",
"total_price": 0,
"orginal_price": "79.8",
"properties": "20509:4333855;1627207:12992212",
"properties_name": "20509:4333855:尺码:S码 (80---100斤);1627207:12992212:颜色分类:黑色短款 (现货秒发)",
"quantity": "17",
"sku_id": "4948686340492"
},
{
"price": "79.8",
"total_price": 0,
"orginal_price": "79.8",
"properties": "20509:8479108;1627207:12992212",
"properties_name": "20509:8479108:尺码:M码 (100---120斤);1627207:12992212:颜色分类:黑色短款 (现货秒发)",
"quantity": "10",
"sku_id": "4948686340493"
},
{
"price": "79.8",
"total_price": 0,
"orginal_price": "79.8",
"properties": "20509:4055843;1627207:12992212",
"properties_name": "20509:4055843:尺码:L码 (120---130斤);1627207:12992212:颜色分类:黑色短款 (现货秒发)",
"quantity": "23",
"sku_id": "4948686340494"
},
{
"price": "79.8",
"total_price": 0,
"orginal_price": "79.8",
"properties": "20509:7104390;1627207:12992212",
"properties_name": "20509:7104390:尺码:XL码 (130---145斤);1627207:12992212:颜色分类:黑色短款 (现货秒发)",
"quantity": "6",
"sku_id": "4948686340495"
},
{
"price": "79.8",
"total_price": 0,
"orginal_price": "79.8",
"properties": "20509:321314754;1627207:12992212",
"properties_name": "20509:321314754:尺码:2XL码 (145---155斤);1627207:12992212:颜色分类:黑色短款 (现货秒发)",
"quantity": "16",
"sku_id": "4948686340496"
},
{
"price": "79.8",
"total_price": 0,
"orginal_price": "79.8",
"properties": "20509:381054963;1627207:12992212",
"properties_name": "20509:381054963:尺码:3XL码 (155---165斤);1627207:12992212:颜色分类:黑色短款 (现货秒发)",
"quantity": "14",
"sku_id": "4948686340497"
},
{
"price": "79.8",
"total_price": 0,
"orginal_price": "79.8",
"properties": "20509:314354769;1627207:12992212",
"properties_name": "20509:314354769:尺码:4XL码 (165---185斤);1627207:12992212:颜色分类:黑色短款 (现货秒发)",
"quantity": "7",
"sku_id": "4948686340498"
},
{
"price": "79.8",
"total_price": 0,
"orginal_price": "79.8",
"properties": "20509:380820085;1627207:12992212",
"properties_name": "20509:380820085:尺码:5XL码 (185---220斤);1627207:12992212:颜色分类:黑色短款 (现货秒发)",
"quantity": "19",
"sku_id": "4948686340499"
},
{
"price": "89.77",
"total_price": 0,
"orginal_price": "89.77",
"properties": "20509:4333855;1627207:41326591",
"properties_name": "20509:4333855:尺码:S码 (80---100斤);1627207:41326591:颜色分类:黑色长款 (现货秒发)",
"quantity": "19",
"sku_id": "4948686340500"
},
{
"price": "89.77",
"total_price": 0,
"orginal_price": "89.77",
"properties": "20509:8479108;1627207:41326591",
"properties_name": "20509:8479108:尺码:M码 (100---120斤);1627207:41326591:颜色分类:黑色长款 (现货秒发)",
"quantity": "28",
"sku_id": "4948686340501"
},
{
"price": "89.77",
"total_price": 0,
"orginal_price": "89.77",
"properties": "20509:4055843;1627207:41326591",
"properties_name": "20509:4055843:尺码:L码 (120---130斤);1627207:41326591:颜色分类:黑色长款 (现货秒发)",
"quantity": "16",
"sku_id": "4948686340502"
},
{
"price": "89.77",
"total_price": 0,
"orginal_price": "89.77",
"properties": "20509:7104390;1627207:41326591",
"properties_name": "20509:7104390:尺码:XL码 (130---145斤);1627207:41326591:颜色分类:黑色长款 (现货秒发)",
"quantity": "38",
"sku_id": "4948686340503"
},
{
"price": "89.77",
"total_price": 0,
"orginal_price": "89.77",
"properties": "20509:321314754;1627207:41326591",
"properties_name": "20509:321314754:尺码:2XL码 (145---155斤);1627207:41326591:颜色分类:黑色长款 (现货秒发)",
"quantity": "4",
"sku_id": "4948686340504"
},
{
"price": "89.77",
"total_price": 0,
"orginal_price": "89.77",
"properties": "20509:381054963;1627207:41326591",
"properties_name": "20509:381054963:尺码:3XL码 (155---165斤);1627207:41326591:颜色分类:黑色长款 (现货秒发)",
"quantity": "19",
"sku_id": "4948686340505"
},
{
"price": "89.77",
"total_price": 0,
"orginal_price": "89.77",
"properties": "20509:314354769;1627207:41326591",
"properties_name": "20509:314354769:尺码:4XL码 (165---185斤);1627207:41326591:颜色分类:黑色长款 (现货秒发)",
"quantity": "49",
"sku_id": "4948686340506"
},
{
"price": "89.77",
"total_price": 0,
"orginal_price": "89.77",
"properties": "20509:380820085;1627207:41326591",
"properties_name": "20509:380820085:尺码:5XL码 (185---220斤);1627207:41326591:颜色分类:黑色长款 (现货秒发)",
"quantity": "8",
"sku_id": "4948686340507"
}
]
},
"seller_id": "1782583327",
"sales": 62,
"shop_id": "105862786",
"props_list": {
"20509:4333855": "尺码:S码 (80---100斤)",
"20509:8479108": "尺码:M码 (100---120斤)",
"20509:4055843": "尺码:L码 (120---130斤)",
"20509:7104390": "尺码:XL码 (130---145斤)",
"20509:321314754": "尺码:2XL码 (145---155斤)",
"20509:381054963": "尺码:3XL码 (155---165斤)",
"20509:314354769": "尺码:4XL码 (165---185斤)",
"20509:380820085": "尺码:5XL码 (185---220斤)",
"1627207:12992212": "颜色分类:黑色短款 (现货秒发)",
"1627207:41326591": "颜色分类:黑色长款 (现货秒发)"
},
"seller_info": {
"nick": "lucky晓人物",
"item_score": "4.8 ",
"score_p": "4.8 ",
"delivery_score": "4.8 ",
"shop_type": "C",
"user_num_id": "1782583327",
"sid": "105862786",
"title": "胖胖胖同学",
"zhuy": "https://shop105862786.taobao.com/",
"shop_name": "胖胖胖同学"
},
"tmall": false,
"error": "",
"warning": "",
"url_log": [],
"fav_count": "462",
"fans_count": "7270",
"freight": "快递: 快递包邮",
"props_imgs": {
"prop_img": [
{
"properties": "1627207:12992212",
"url": "//img.alicdn.com/imgextra/i1/1782583327/O1CN017KLQLQ1aRoWXVgIlV_!!1782583327.jpg"
},
{
"properties": "1627207:41326591",
"url": "//img.alicdn.com/imgextra/i1/1782583327/O1CN01varCsQ1aRoWXVfhKI_!!1782583327.jpg"
}
]
},
"_ddf": "xdl",
"promo_type": null,
"props_img": {
"1627207:12992212": "//img.alicdn.com/imgextra/i1/1782583327/O1CN017KLQLQ1aRoWXVgIlV_!!1782583327.jpg",
"1627207:41326591": "//img.alicdn.com/imgextra/i1/1782583327/O1CN01varCsQ1aRoWXVfhKI_!!1782583327.jpg"
},
"format_check": "ok",
"shop_item": [],
"relate_items": []
},
"error": "",
"secache": "71d69d4088ced803d59da75b1ecef9fd",
"secache_time": 1689056901,
"secache_date": "2023-07-11 14:28:21",
"translate_status": "",
"translate_time": 0,
"language": {
"default_lang": "cn",
"current_lang": "cn"
},
"reason": "",
"error_code": "0000",
"cache": 0,
"api_info": "today:221 max:10100 all[660=221+34+405];expires:2030-12-31",
"execution_time": "2.495",
"server_time": "Beijing/2023-07-11 14:28:21",
"client_ip": "182.108.169.91",
"call_args": {
"num_iid": "702978454131",
"is_promotion": "1"
},
"api_type": "taobao",
"translate_language": "zh-CN",
"translate_engine": "baidu",
"server_memory": "6.15MB",
"request_id": "gw-3.64acf6831b6de",
"last_id": "1864141477"
}