1688API技术解析,实现获得1688商品详情

    要实现获得1688商品详情,你需要使用1688 API。1688 API是阿里巴巴旗下的开放平台,它提供了一套丰富的接口,可以让开发者通过编程的方式获取到1688网站上的商品信息。

首先,你需要在阿里开放平台注册一个账号,并创建一个应用。然后,根据1688开放平台的文档,了解和学习相关的API接口。

获得1688商品详情的一般步骤如下:

1. 获取AccessToken:首先需要获取一个有效的AccessToken,以进行后续的请求操作。你可以使用阿里开放平台提供的OAuth认证方式获取AccessToken,具体的流程可以参考开放平台的文档。

2. 构造请求URL:根据接口文档,构造获取商品详情的请求URL。一般来说,你需要提供商品的ID或者其他相关的参数作为请求的参数。

3. 发送请求:使用HTTP请求库发送GET或者POST请求,将构造好的请求URL发送给1688服务器。

4. 解析响应:收到服务器的响应后,你需要对返回的数据进行解析,提取出需要的商品详情信息。

1688API技术解析,实现获得1688商品详情_第1张图片

点击获取key和secret

阿里巴巴中国站获得1688商品详情 API 返回值说明

请求参数

请求参数:num_iid=610947572360

参数说明:num_iid:1688商品ID
sales_data:&sales_data=1 获取近30天成交数据
agent:&agent=1 获取1688分销代发价格数据

---------------------------------------
Result Object:
---------------------------------------
{
	"item": {
		"num_iid": "730270304091",
		"title": "女装字母针织衫女2023早秋新款简约圆领撞色高级感毛织上衣18882",
		"desc_short": "",
		"price": "84.00",
		"total_price": 0,
		"suggestive_price": 0,
		"orginal_price": "89.00",
		"nick": "Allo Fu品牌旗舰店",
		"num": "1301",
		"min_num": "3",
		"detail_url": "https://detail.1688.com/offer/730270304091.html",
		"pic_url": "https://cbu01.alicdn.com/img/ibank/O1CN01GIOM7g2LISQHR85KJ_!!971979669-0-cib.jpg",
		"brand": "",
		"brandId": "",
		"rootCatId": "10166",
		"cid": "127386001",
		"crumbs": [],
		"created_time": "",
		"modified_time": "",
		"delist_time": "",
		"desc": "
", "desc_img": [ "https://cbu01.alicdn.com/img/ibank/O1CN01HuGcSX2LISQIiKdon_!!971979669-0-cib.jpg", "https://cbu01.alicdn.com/img/ibank/O1CN01HJlYAa2LISQEwhAj5_!!971979669-0-cib.jpg", "https://cbu01.alicdn.com/img/ibank/O1CN017tiy8e2LISQBnWBKa_!!971979669-0-cib.jpg", "https://cbu01.alicdn.com/img/ibank/O1CN01roeJg82LISQ3Bl0bo_!!971979669-0-cib.jpg", "https://cbu01.alicdn.com/img/ibank/O1CN01cdyGUJ2LISQ9kBmBC_!!971979669-0-cib.jpg", "https://cbu01.alicdn.com/img/ibank/O1CN01jMnhtc2LISQIiKRNQ_!!971979669-0-cib.jpg", "https://cbu01.alicdn.com/img/ibank/O1CN01c6uKAy2LISQBy5x6E_!!971979669-0-cib.jpg", "https://cbu01.alicdn.com/img/ibank/O1CN01TAFvgO2LISQ7tVZ8z_!!971979669-0-cib.jpg", "https://cbu01.alicdn.com/img/ibank/O1CN01TtWxUK2LISQGTUKFO_!!971979669-0-cib.jpg", "https://cbu01.alicdn.com/img/ibank/O1CN01N2hZGH2LISQ7tVELa_!!971979669-0-cib.jpg", "https://cbu01.alicdn.com/img/ibank/O1CN01s5UcgN2LISQD1uBOp_!!971979669-0-cib.jpg", "https://cbu01.alicdn.com/img/ibank/O1CN01RP3uVd2LISQEHQg3W_!!971979669-0-cib.jpg", "https://cbu01.alicdn.com/img/ibank/O1CN0104hh7E2LISQ7tVMfm_!!971979669-0-cib.jpg", "https://cbu01.alicdn.com/img/ibank/O1CN018RNvM52LISQBnXn9o_!!971979669-0-cib.jpg", "https://cbu01.alicdn.com/img/ibank/O1CN01B3nWZd2LISQAgwPxR_!!971979669-0-cib.jpg" ], "item_imgs": [ { "url": "https://cbu01.alicdn.com/img/ibank/O1CN01yZC2P62LISQHR6wYK_!!971979669-0-cib.jpg" }, { "url": "https://cbu01.alicdn.com/img/ibank/O1CN01EUX0lc2LISQFu3HGQ_!!971979669-0-cib.jpg" }, { "url": "https://cbu01.alicdn.com/img/ibank/O1CN01RgzTyf2LISQCjAkCO_!!971979669-0-cib.jpg" }, { "url": "https://cbu01.alicdn.com/img/ibank/O1CN01MZ2rUh2LISQDzKmp8_!!971979669-0-cib.jpg" }, { "url": "https://cbu01.alicdn.com/img/ibank/O1CN01CkLv012LISQGOLlfb_!!971979669-0-cib.jpg" } ], "item_weight": "", "item_size": "", "location": "广东省广州市", "post_fee": null, "express_fee": "", "ems_fee": "", "shipping_to": "", "has_discount": "", "video": "https://cloud.video.taobao.com/play/u/971979669/p/2/e/6/t/1/421109835032.mp4", "is_virtual": "", "sample_id": "", "is_promotion": "", "props_name": "0:0:颜色:灰色;0:1:颜色:粉色;0:2:颜色:白;0:3:颜色:黑色;0:4:颜色:黄色;0:5:颜色:兰色;0:6:颜色:杏;0:7:颜色:白色等毛料 预售24-26号", "prop_imgs": { "prop_img": [ { "properties": "0:0", "url": "https://cbu01.alicdn.com/img/ibank/O1CN01OD5piW2LISQFQnRe3_!!971979669-0-cib.jpg" }, { "properties": "0:1", "url": "https://cbu01.alicdn.com/img/ibank/O1CN01rxRNLt2LISQEHL2Hp_!!971979669-0-cib.jpg" }, { "properties": "0:2", "url": "https://cbu01.alicdn.com/img/ibank/O1CN01p87oex2LISQT2LFgh_!!971979669-0-cib.jpg" }, { "properties": "0:3", "url": "https://cbu01.alicdn.com/img/ibank/O1CN0117EoIJ2LISQGTQhIZ_!!971979669-0-cib.jpg" }, { "properties": "0:4", "url": "https://cbu01.alicdn.com/img/ibank/O1CN01ff7ZdP2LISQIiDznn_!!971979669-0-cib.jpg" }, { "properties": "0:5", "url": "https://cbu01.alicdn.com/img/ibank/O1CN01v8DNmk2LISQWmPVjE_!!971979669-0-cib.jpg" }, { "properties": "0:6", "url": "https://cbu01.alicdn.com/img/ibank/O1CN01bVzFCl2LISQRjZQ9M_!!971979669-0-cib.jpg" } ] }, "property_alias": "0:0:灰色;0:1:粉色;0:2:白;0:3:黑色;0:4:黄色;0:5:兰色;0:6:杏;0:7:白色等毛料 预售24-26号", "props": [ { "name": "货号", "value": "L18882(KAW50)" }, { "name": "品牌", "value": "Allo Fu" }, { "name": "面料名称", "value": "马海毛混纺" }, { "name": "主面料成分2", "value": "羊毛" }, { "name": "主面料成分", "value": "马海毛" }, { "name": "图案", "value": "拼色" }, { "name": "厚薄", "value": "薄" }, { "name": "组合形式", "value": "单件" }, { "name": "款式", "value": "套头" }, { "name": "版型", "value": "宽松型" }, { "name": "袖型", "value": "常规袖" }, { "name": "上市年份/季节", "value": "2023年秋季" }, { "name": "领型", "value": "圆领" }, { "name": "袖长", "value": "三分袖" }, { "name": "流行元素", "value": "拼接" }, { "name": "衣长", "value": "普通款(50cm<衣长≤65cm)" }, { "name": "工艺", "value": "拼贴/拼接" }, { "name": "颜色", "value": "灰色,粉色,白,黑色,黄色,兰色,杏,白色等毛料 预售24-26号" }, { "name": "风格类型", "value": "日韩休闲" }, { "name": "穿着方式", "value": "套头" }, { "name": "主面料成分含量", "value": "30%以下" }, { "name": "主面料成分2含量", "value": "30%以下" }, { "name": "门襟", "value": "套头" }, { "name": "风格", "value": "韩系风" }, { "name": "跨境风格类型", "value": "舒适休闲" }, { "name": "是否跨境货源", "value": "是" }, { "name": "主要下游销售地区1", "value": "欧美" }, { "name": "主要下游销售地区2", "value": "东南亚" } ], "total_sold": null, "skus": { "sku": [ { "price": "89.00", "total_price": 0, "sales": "151", "properties": "0:0", "properties_name": "0:0:颜色:灰色", "quantity": "186", "sku_id": "5059873632883", "spec_id": "6a67a0c231ddcbfe73c4ab1dfcaa0ced" }, { "price": "89.00", "total_price": 0, "sales": "19", "properties": "0:1", "properties_name": "0:1:颜色:粉色", "quantity": "197", "sku_id": "5059873632880", "spec_id": "b1a1765aa55aec4e02d84ce81ac546d2" }, { "price": "89.00", "total_price": 0, "sales": "90", "properties": "0:2", "properties_name": "0:2:颜色:白", "quantity": "165", "sku_id": "5244728119590", "spec_id": "22b7a81fb5dc71355474adb9a897a959" }, { "price": "89.00", "total_price": 0, "sales": "38", "properties": "0:3", "properties_name": "0:3:颜色:黑色", "quantity": "189", "sku_id": "5059873632881", "spec_id": "f561c4f7cdb23de81fc2303ebf1e8f55" }, { "price": "89.00", "total_price": 0, "sales": "20", "properties": "0:4", "properties_name": "0:4:颜色:黄色", "quantity": "192", "sku_id": "5059873632884", "spec_id": "36c58a69219820709b9475e70bd789d4" }, { "price": "89.00", "total_price": 0, "sales": "13", "properties": "0:5", "properties_name": "0:5:颜色:兰色", "quantity": "192", "sku_id": "5244728119592", "spec_id": "94747cbad6f33a76561813352956a3ec" }, { "price": "89.00", "total_price": 0, "sales": "48", "properties": "0:6", "properties_name": "0:6:颜色:杏", "quantity": "180", "sku_id": "5244728119591", "spec_id": "d14cb9acf93d73bfbdbbea86ced9ca51" }, { "price": "89.00", "total_price": 0, "sales": "0", "properties": "0:7", "properties_name": "0:7:颜色:白色等毛料 预售24-26号", "quantity": "0", "sku_id": "5079533017876", "spec_id": "99b021f7d6009c90d436699caff8f7ae" } ] }, "seller_id": "971979669", "sales": 502, "shop_id": "971979669", "props_list": { "0:0": "颜色:灰色", "0:1": "颜色:粉色", "0:2": "颜色:白", "0:3": "颜色:黑色", "0:4": "颜色:黄色", "0:5": "颜色:兰色", "0:6": "颜色:杏", "0:7": "颜色:白色等毛料 预售24-26号" }, "seller_info": { "nick": "Allo Fu品牌旗舰店", "user_num_id": "971979669", "sid": "xingxingyl", "title": "Allo Fu品牌旗舰店", "zhuy": "https://winport.m.1688.com/page/index.html?memberId=xingxingyl", "shop_name": "广州衣夫服饰有限公司" }, "tmall": "false", "error": "", "warning": "", "url_log": [], "unit": null, "is_support_mix": "true", "mix_amount": "500", "mix_begin": "0", "mix_number": "2147483647", "scale": "", "sellUnit": "件", "props_img": { "0:0": "https://cbu01.alicdn.com/img/ibank/O1CN01OD5piW2LISQFQnRe3_!!971979669-0-cib.jpg", "0:1": "https://cbu01.alicdn.com/img/ibank/O1CN01rxRNLt2LISQEHL2Hp_!!971979669-0-cib.jpg", "0:2": "https://cbu01.alicdn.com/img/ibank/O1CN01p87oex2LISQT2LFgh_!!971979669-0-cib.jpg", "0:3": "https://cbu01.alicdn.com/img/ibank/O1CN0117EoIJ2LISQGTQhIZ_!!971979669-0-cib.jpg", "0:4": "https://cbu01.alicdn.com/img/ibank/O1CN01ff7ZdP2LISQIiDznn_!!971979669-0-cib.jpg", "0:5": "https://cbu01.alicdn.com/img/ibank/O1CN01v8DNmk2LISQWmPVjE_!!971979669-0-cib.jpg", "0:6": "https://cbu01.alicdn.com/img/ibank/O1CN01bVzFCl2LISQRjZQ9M_!!971979669-0-cib.jpg" }, "sales_data": null, "priceRange": [ [ "3", "89.00" ], [ "10", "84.00" ] ], "priceRangeOriginal": [], "_ddf": "ti", "sales_info": { "seller_num": "", "repeat_rate_purchase": "", "per_capita_purchases": "", "comment_num": "", "comment_url": "" }, "format_check": "ok", "shop_item": [], "relate_items": [] }, "error": "", "secache": "1437bd0794c1fedb41882166a9d6545d", "secache_time": 1692947909, "secache_date": "2023-08-25 15:18:29", "translate_status": "", "translate_time": 0, "language": { "default_lang": "cn", "current_lang": "cn" }, "reason": "", "error_code": "0000", "cache": 1, "api_info": "today:65 max:10100 all[133=65+33+35];expires:2030-12-31", "execution_time": "0.041", "server_time": "Beijing/2023-08-26 15:43:18", "client_ip": "61.131.236.100", "call_args": { "num_iid": "730270304091" }, "api_type": "1688", "translate_language": "zh-CN", "translate_engine": "baidu", "server_memory": "0.85MB", "request_id": "gw-4.64e9ad1609fd1", "last_id": "1983562487" }

具体的实现步骤会因不同的编程语言和开发环境而有所不同。建议你参考阿里开放平台的1688 API文档,选择适合自己的开发语言和工具,按照文档提供的规范和示例代码进行开发。

需要注意的是,使用1688 API获取商品详情涉及到阿里巴巴的数据和服务,你需要遵守相关的使用规定和条款,并确保自己的开发行为合法合规。

你可能感兴趣的:(API,Python,1688,github,python)