lazada电商API接口是针对lazada提供的电商服务平台,为开发人员提供了简单、可靠的技术来与lazada电商平台进行数据交互,实现一系列开发、管理和营销等操作。其中包括商品详情API接口,通过这个API接口商家可以获取商品的详细信息,包括商品标题、价格、库存、销量等。
公共参数
请求地址: 注册调用请求key
名称 | 类型 | 必须 | 描述 |
---|---|---|---|
key | String | 是 | 调用key(必须以GET方式拼接在URL中) |
secret | String | 是 | 调用密钥 |
api_name | String | 是 | API接口名称(包括在请求地址中)[item_search,item_get,item_search_shop等] |
cache | String | 否 | [yes,no]默认yes,将调用缓存的数据,速度比较快 |
result_type | String | 否 | [json,jsonu,xml,serialize,var_export]返回数据格式,默认为json,jsonu输出的内容中文可以直接阅读 |
lang | String | 否 | [cn,en,ru]翻译语言,默认cn简体中文 |
version | String | 否 | API版本 |
请求参数
请求参数:num_iid=267690734&nation=co.th
参数说明:num_iid:lazada商品ID(是对应国家不同国家的ID不能通用)
nation:国家
国家域名后缀可选值如下:co.id、com.my、com.ph、sg、co.th、vn
响应参数
Version: Date:
名称 | 类型 | 必须 | 示例值 | 描述 |
---|---|---|---|---|
item |
item[] | 0 | 获得lazada商品详情 | |
num_iid |
String | 0 | 267690734 | 宝贝ID |
title |
String | 0 | 中国新年假期交付63年2月2日!!城市豪宅鞋鞋高跟鞋男士正商务正装男士鞋鞋牛津牛津向左急转福特男性电影ShoeFree。 | 商品标题 |
price |
Float | 0 | 7.70 | 价格 |
nick |
String | 0 | URBAN SAFARI | 卖家昵称 |
pic_url |
String | 0 | //my-test-11.slatic.net/original/208de91b5132477f8a723c82c56c3a58.jpg | 宝贝图片 |
detail_url |
String | 0 | https://www.lazada.co.th/products/2-63-urban-luxury-oxfords-shoefree-i267690734-s418579763.html | 宝贝链接 |
brand |
String | 0 | MAJE | 品牌 |
orginal_price |
Float | 0 | 7.70 | 原价 |
skus |
Mix | 0 | {"sku": [{"properties": "0:0", "properties_name": "0:0:颜色:小号", "price": "7.70", "orginal_price": "7.70", "quantity": 716, "sku_id": 3184603612387 }]} | 商品规格信息列表 |
props_name |
String | 0 | 0:0:小号:;0:1:中号:;0:2:大号: | 商品属性名 |
props_img |
Mix | 0 | 属性图片 | |
item_imgs |
Mix | 0 | [{"url": "//my-test-11.slatic.net/original/208de91b5132477f8a723c82c56c3a58.jpg"}] | 商品图片列表 |
seller |
Mix | 0 | ||
desc |
String | 0 | ||
props_list |
Mix | 0 | {"0:0": "颜色:小号"} | 商品属性 |
seller_info |
Mix | 0 | {"level": "", "shop_type": "A", "user_num_id": "2620712400", "cid": null, "delivery_score": null, "item_score": null, "score_p": null, "city": "广东 广州", "shop_name": "深圳市福田区尚我佳日用制品厂", "nick": "尚我佳日用品厂", "zhuy": "https://m.1688.com/winport/b2b-262071240083f4c.html", "sid": "b2b-262071240083f4c"} | 卖家信息 |
num |
Int | 0 | 2191 | |
post_fee |
Float | 0 | 9.00 | 邮费 |
language |
String | 0 | th | |
currency_code |
String | 0 | THB | |
property_alias |
String | 0 | 0:0:小号;0:1:中号;0:2:大号 | 属性别名 |
PHP请求示例(Curl、PHP、PHPsdk、JAVA、C#、Python、Golang、javascript、JS-SDK...)
&secret=<您自己的apiSecret>&num_iid=267690734&nation=co.th";
$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": "267690734",
"title": "城市奢华男士鞋正式鞋高跟鞋商务套装男牛津鞋尖头牛津鞋男士皮革婚礼",
"price": 232,
"nick": "URBAN SAFARI",
"pic_url": "//my-test-11.slatic.net/original/208de91b5132477f8a723c82c56c3a58.jpg",
"detail_url": "https://www.lazada.co.th/products/oxfords-i267690734-s418579763.html",
"brand": "No Brand",
"orginal_price": null,
"skus": {
"sku": [
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1950,
"properties": "30097:95204;30585:133117",
"properties_name": "30097:95204:涂料:白色;30585:133117:大小:38",
"sku_id": "418579756"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1949,
"properties": "30097:95204;30585:133137",
"properties_name": "30097:95204:涂料:白色;30585:133137:大小:39",
"sku_id": "418579757"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1947,
"properties": "30097:95204;30585:133146",
"properties_name": "30097:95204:涂料:白色;30585:133146:大小:40",
"sku_id": "418579758"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1948,
"properties": "30097:95204;30585:133152",
"properties_name": "30097:95204:涂料:白色;30585:133152:大小:41",
"sku_id": "418579759"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1946,
"properties": "30097:95204;30585:133157",
"properties_name": "30097:95204:涂料:白色;30585:133157:大小:42",
"sku_id": "418579760"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1946,
"properties": "30097:95204;30585:133165",
"properties_name": "30097:95204:涂料:白色;30585:133165:大小:43",
"sku_id": "418579761"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1949,
"properties": "30097:95204;30585:133172",
"properties_name": "30097:95204:涂料:白色;30585:133172:大小:44",
"sku_id": "418579762"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1949,
"properties": "30097:95204;30585:133178",
"properties_name": "30097:95204:涂料:白色;30585:133178:大小:45",
"sku_id": "418579763"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1948,
"properties": "30097:95204;30585:133177",
"properties_name": "30097:95204:涂料:白色;30585:133177:大小:46",
"sku_id": "418579764"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1950,
"properties": "30097:95204;30585:133198",
"properties_name": "30097:95204:涂料:白色;30585:133198:大小:47",
"sku_id": "418579765"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1950,
"properties": "30097:95204;30585:133204",
"properties_name": "30097:95204:涂料:白色;30585:133204:大小:48",
"sku_id": "418579766"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1950,
"properties": "30097:4660;30585:133117",
"properties_name": "30097:4660:涂料:黑色;30585:133117:大小:38",
"sku_id": "418579767"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1950,
"properties": "30097:4660;30585:133137",
"properties_name": "30097:4660:涂料:黑色;30585:133137:大小:39",
"sku_id": "418579768"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1946,
"properties": "30097:4660;30585:133146",
"properties_name": "30097:4660:涂料:黑色;30585:133146:大小:40",
"sku_id": "418579769"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1947,
"properties": "30097:4660;30585:133152",
"properties_name": "30097:4660:涂料:黑色;30585:133152:大小:41",
"sku_id": "418579770"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1947,
"properties": "30097:4660;30585:133157",
"properties_name": "30097:4660:涂料:黑色;30585:133157:大小:42",
"sku_id": "418579771"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1948,
"properties": "30097:4660;30585:133165",
"properties_name": "30097:4660:涂料:黑色;30585:133165:大小:43",
"sku_id": "418579772"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1949,
"properties": "30097:4660;30585:133172",
"properties_name": "30097:4660:涂料:黑色;30585:133172:大小:44",
"sku_id": "418579773"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1949,
"properties": "30097:4660;30585:133178",
"properties_name": "30097:4660:涂料:黑色;30585:133178:大小:45",
"sku_id": "418579774"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1949,
"properties": "30097:4660;30585:133177",
"properties_name": "30097:4660:涂料:黑色;30585:133177:大小:46",
"sku_id": "418579775"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1950,
"properties": "30097:4660;30585:133198",
"properties_name": "30097:4660:涂料:黑色;30585:133198:大小:47",
"sku_id": "418579776"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1950,
"properties": "30097:4660;30585:133204",
"properties_name": "30097:4660:涂料:黑色;30585:133204:大小:48",
"sku_id": "418579777"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1950,
"properties": "30097:4799;30585:133117",
"properties_name": "30097:4799:涂料:棕色;30585:133117:大小:38",
"sku_id": "418579778"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1950,
"properties": "30097:4799;30585:133137",
"properties_name": "30097:4799:涂料:棕色;30585:133137:大小:39",
"sku_id": "418579779"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1950,
"properties": "30097:4799;30585:133146",
"properties_name": "30097:4799:涂料:棕色;30585:133146:大小:40",
"sku_id": "418579780"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1950,
"properties": "30097:4799;30585:133152",
"properties_name": "30097:4799:涂料:棕色;30585:133152:大小:41",
"sku_id": "418579781"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1948,
"properties": "30097:4799;30585:133157",
"properties_name": "30097:4799:涂料:棕色;30585:133157:大小:42",
"sku_id": "418579782"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1948,
"properties": "30097:4799;30585:133165",
"properties_name": "30097:4799:涂料:棕色;30585:133165:大小:43",
"sku_id": "418579783"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1949,
"properties": "30097:4799;30585:133172",
"properties_name": "30097:4799:涂料:棕色;30585:133172:大小:44",
"sku_id": "418579784"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1949,
"properties": "30097:4799;30585:133178",
"properties_name": "30097:4799:涂料:棕色;30585:133178:大小:45",
"sku_id": "418579785"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1949,
"properties": "30097:4799;30585:133177",
"properties_name": "30097:4799:涂料:棕色;30585:133177:大小:46",
"sku_id": "418579786"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1950,
"properties": "30097:4799;30585:133198",
"properties_name": "30097:4799:涂料:棕色;30585:133198:大小:47",
"sku_id": "418579787"
},
{
"total_price": 0,
"price": 232,
"orginal_price": 417,
"quantity": 1950,
"properties": "30097:4799;30585:133204",
"properties_name": "30097:4799:涂料:棕色;30585:133204:大小:48",
"sku_id": "418579788"
}
]
},
"prop_imgs": {
"prop_img": [
{
"properties": "30097:4660",
"url": "//my-test-11.slatic.net/original/00b3ab8196673755dff35a21b7daaf14.jpg"
},
{
"properties": "30097:4799",
"url": "//my-test-11.slatic.net/original/5cd049094680f6f029cea8de5aba45e6.jpg"
},
{
"properties": "30097:95204",
"url": "//my-test-11.slatic.net/original/208de91b5132477f8a723c82c56c3a58.jpg"
}
]
},
"props_name": "30097:95204:涂料:白色;30097:4660:涂料:黑色;30097:4799:涂料:棕色;30585:133117:大小:38;30585:133137:大小:39;30585:133146:大小:40;30585:133152:大小:41;30585:133157:大小:42;30585:133165:大小:43;30585:133172:大小:44;30585:133178:大小:45;30585:133177:大小:46;30585:133198:大小:47;30585:133204:大小:48",
"props_img": {
"30097:4660": "//my-test-11.slatic.net/original/00b3ab8196673755dff35a21b7daaf14.jpg",
"30097:4799": "//my-test-11.slatic.net/original/5cd049094680f6f029cea8de5aba45e6.jpg",
"30097:95204": "//my-test-11.slatic.net/original/208de91b5132477f8a723c82c56c3a58.jpg"
},
"item_imgs": [
{
"url": "//my-test-11.slatic.net/original/208de91b5132477f8a723c82c56c3a58.jpg"
},
{
"url": "//my-test-11.slatic.net/original/208de91b5132477f8a723c82c56c3a58.jpg"
},
{
"url": "//my-test-11.slatic.net/original/208de91b5132477f8a723c82c56c3a58.jpg"
},
{
"url": "//my-test-11.slatic.net/original/208de91b5132477f8a723c82c56c3a58.jpg"
}
],
"seller": [],
"desc": "จุดขายสินค้า:
1. หนังคุณภาพสูงหนังนุ่มและละเอียดอ่อนพื้นผิวใสระบายอากาศได้ดีและสะดวกสบาย
2. ตกแต่งโลหะมีสไตล์และสวยงาม
3. ระบายอากาศภายในสะดวกสบายระบายอากาศได้ดีและไม่อับ
4. พื้นรองเท้ายางกันลื่นและทนต่อการสึกหรอ
",
"props_list": {
"30097:95204": "涂料:白色",
"30097:4660": "涂料:黑色",
"30097:4799": "涂料:棕色",
"30585:133117": "大小:38",
"30585:133137": "大小:39",
"30585:133146": "大小:40",
"30585:133152": "大小:41",
"30585:133157": "大小:42",
"30585:133165": "大小:43",
"30585:133172": "大小:44",
"30585:133178": "大小:45",
"30585:133177": "大小:46",
"30585:133198": "大小:47",
"30585:133204": "大小:48"
},
"seller_info": {
"nick": "URBAN SAFARI",
"tltle": "URBAN SAFARI",
"shop_name": "URBAN SAFARI",
"user_num_id": "71550",
"zhuy": "//www.lazada.co.th/shop/urban-safari/?itemId=267690734&channelSource=pdp",
"level": 3
},
"num": 64310,
"post_fee": "ฟรี",
"language": "th",
"currency_code": "THB",
"property_alias": "30097:95204:白色;30585:133117:38;30097:95204:白色;30585:133137:39;30097:95204:白色;30585:133146:40;30097:95204:白色;30585:133152:41;30097:95204:白色;30585:133157:42;30097:95204:白色;30585:133165:43;30097:95204:白色;30585:133172:44;30097:95204:白色;30585:133178:45;30097:95204:白色;30585:133177:46;30097:95204:白色;30585:133198:47;30097:95204:白色;30585:133204:48;30097:4660:黑色;30585:133117:38;30097:4660:黑色;30585:133137:39;30097:4660:黑色;30585:133146:40;30097:4660:黑色;30585:133152:41;30097:4660:黑色;30585:133157:42;30097:4660:黑色;30585:133165:43;30097:4660:黑色;30585:133172:44;30097:4660:黑色;30585:133178:45;30097:4660:黑色;30585:133177:46;30097:4660:黑色;30585:133198:47;30097:4660:黑色;30585:133204:48;30097:4799:棕色;30585:133117:38;30097:4799:棕色;30585:133137:39;30097:4799:棕色;30585:133146:40;30097:4799:棕色;30585:133152:41;30097:4799:棕色;30585:133157:42;30097:4799:棕色;30585:133165:43;30097:4799:棕色;30585:133172:44;30097:4799:棕色;30585:133178:45;30097:4799:棕色;30585:133177:46;30097:4799:棕色;30585:133198:47;30097:4799:棕色;30585:133204:48"
},
"secache": "142ca71401476a77b9155576ca350664",
"secache_time": 1614924434,
"secache_date": "2021-03-05 14:07:14",
"translate_status": "ok",
"translate_time": 0.882,
"language": {
"current_lang": "cn",
"source_lang": "th"
},
"error": "",
"reason": "",
"error_code": "0000",
"cache": 1,
"api_info": "today: max:10000",
"execution_time": 0.935,
"server_time": "Beijing/2021-03-10 17:07:19",
"client_ip": "106.6.35.144",
"call_args": {
"num_iid": "267690734",
"is_promotion": "co.th"
},
"api_type": "lazada",
"translate_language": "zh-CN",
"translate_engine": "google_cn",
"server_memory": "3.07MB",
"request_id": "gw-1.60488c46c8c8e"
}