首先以1688商品数据为例
item_get-获得1688商品详情
公共参数
名称 | 类型 | 必须 | 描述 |
---|---|---|---|
key | String | 是 | 调用key(必须以GET方式拼接在URL中)注册Key和secret接入 |
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=665646212108
参数说明:num_iid:1688商品ID
sales_data:&sales_data=1 获取近30天成交数据
agent:&agent=1 获取1688分销代发价格数据
请求示例
# coding:utf-8
"""
Compatible for python2.x and python3.x
requirement: pip install requests
"""
from __future__ import print_function
import requests
# 请求示例 url 默认请求参数已经做URL编码
url = "https://api-gw.onebound.cn/1688/item_get/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=610947572360"
headers = {
"Accept-Encoding": "gzip",
"Connection": "close"
}
if __name__ == "__main__":
r = requests.get(url, headers=headers)
json_obj = r.json()
print(json_obj)
响应示例文章来源:https://www.toymoban.com/news/detail-542212.html
{
"item": {
"num_iid": "665646212108",
"title": "大码女装连衣裙2023春秋新款时尚气质流行墨绿质感裙法式衬衫长裙",
"desc_short": "",
"price": "65.00",
"total_price": 0,
"suggestive_price": 0,
"orginal_price": "69.00",
"nick": "深圳市南山区依若涵服装厂",
"num": "5494",
"min_num": "1",
"detail_url": "https://detail.1688.com/offer/665646212108.html",
"pic_url": "https://cbu01.alicdn.com/img/ibank/O1CN01bdBTlq1Tu1WqwH3zt_!!2970242441-0-cib.jpg",
"brand": "",
"brandId": "",
"rootCatId": "10166",
"cid": "1031910",
"crumbs": [],
"created_time": "",
"modified_time": "",
"delist_time": "",
"desc": "<div id=\"offer-template-0\"></div><p><img src=\"https://cbu01.alicdn.com/img/ibank/O1CN018AZqFO1Tu1WhkzHyz_!!2970242441-0-cib.jpg\" alt=\"undefined\" width=\"790\" height=\"352.5375\"/><br/><br/><img src=\"https://cbu01.alicdn.com/img/ibank/O1CN01cxPGdT1Tu1Wo8QAC8_!!2970242441-0-cib.jpg\" alt=\"undefined\"/><br/><br/><img src=\"https://cbu01.alicdn.com/img/ibank/O1CN01prbacy1Tu1WomOhbF_!!2970242441-0-cib.jpg\" alt=\"undefined\"/><br/><br/><img src=\"https://cbu01.alicdn.com/img/ibank/O1CN01LTEBgY1Tu1Whl3qu5_!!2970242441-0-cib.jpg\" alt=\"undefined\"/><br/><br/><img src=\"https://cbu01.alicdn.com/img/ibank/O1CN010cNvd41Tu1Wx5mcKn_!!2970242441-0-cib.jpg\" alt=\"undefined\"/><br/><br/><img src=\"https://cbu01.alicdn.com/img/ibank/O1CN01vlDiJH1Tu1WqwaT57_!!2970242441-0-cib.jpg\" alt=\"undefined\"/><br/><br/><img src=\"https://cbu01.alicdn.com/img/ibank/O1CN01Dy531G1Tu1Wqwa8Iv_!!2970242441-0-cib.jpg\" alt=\"undefined\"/><br/><br/><img src=\"https://cbu01.alicdn.com/img/ibank/O1CN01SJFsLP1Tu1Wse9g80_!!2970242441-0-cib.jpg\" alt=\"undefined\"/><br/><br/><img src=\"https://cbu01.alicdn.com/img/ibank/O1CN01TtRYqZ1Tu1Whkzh1b_!!2970242441-0-cib.jpg\" alt=\"undefined\"/><br/><br/><img src=\"https://cbu01.alicdn.com/img/ibank/O1CN01FGgvB91Tu1Wo8RZXW_!!2970242441-0-cib.jpg\" alt=\"undefined\"/><br/><br/><img src=\"https://cbu01.alicdn.com/img/ibank/O1CN01bvadYy1Tu1WzdVDhh_!!2970242441-0-cib.jpg\" alt=\"undefined\"/><br/><br/><img src=\"https://cbu01.alicdn.com/img/ibank/O1CN01u6EsAx1Tu1Wt3cPod_!!2970242441-0-cib.jpg\" alt=\"undefined\"/><br/><br/><img src=\"https://cbu01.alicdn.com/img/ibank/O1CN01M5qkpc1Tu1WomTXAE_!!2970242441-0-cib.jpg\" alt=\"undefined\"/><br/><br/><img src=\"https://cbu01.alicdn.com/img/ibank/O1CN01Q8KUvW1Tu1WuHOXye_!!2970242441-0-cib.jpg\" alt=\"undefined\"/><br/><br/><img src=\"https://cbu01.alicdn.com/img/ibank/O1CN01iEtvit1Tu1WomRzXG_!!2970242441-0-cib.jpg\" alt=\"undefined\"/><br/><br/><img src=\"https://cbu01.alicdn.com/img/ibank/O1CN01qkMOZK1Tu1WxlQXoW_!!2970242441-0-cib.jpg\" alt=\"undefined\"/><br/><br/></p><img src=\"https://www.o0b.cn/i.php?t.png&rid=gw-4.64ab6524be806&p=1032056261&k=i_key&t=1688954150\" style=\"display:none\" />",
"desc_img": [
"https://cbu01.alicdn.com/img/ibank/O1CN018AZqFO1Tu1WhkzHyz_!!2970242441-0-cib.jpg",
"https://cbu01.alicdn.com/img/ibank/O1CN01cxPGdT1Tu1Wo8QAC8_!!2970242441-0-cib.jpg",
"https://cbu01.alicdn.com/img/ibank/O1CN01prbacy1Tu1WomOhbF_!!2970242441-0-cib.jpg",
"https://cbu01.alicdn.com/img/ibank/O1CN01LTEBgY1Tu1Whl3qu5_!!2970242441-0-cib.jpg",
"https://cbu01.alicdn.com/img/ibank/O1CN010cNvd41Tu1Wx5mcKn_!!2970242441-0-cib.jpg",
"https://cbu01.alicdn.com/img/ibank/O1CN01vlDiJH1Tu1WqwaT57_!!2970242441-0-cib.jpg",
"https://cbu01.alicdn.com/img/ibank/O1CN01Dy531G1Tu1Wqwa8Iv_!!2970242441-0-cib.jpg",
"https://cbu01.alicdn.com/img/ibank/O1CN01SJFsLP1Tu1Wse9g80_!!2970242441-0-cib.jpg",
"https://cbu01.alicdn.com/img/ibank/O1CN01TtRYqZ1Tu1Whkzh1b_!!2970242441-0-cib.jpg",
"https://cbu01.alicdn.com/img/ibank/O1CN01FGgvB91Tu1Wo8RZXW_!!2970242441-0-cib.jpg",
"https://cbu01.alicdn.com/img/ibank/O1CN01bvadYy1Tu1WzdVDhh_!!2970242441-0-cib.jpg",
"https://cbu01.alicdn.com/img/ibank/O1CN01u6EsAx1Tu1Wt3cPod_!!2970242441-0-cib.jpg",
"https://cbu01.alicdn.com/img/ibank/O1CN01M5qkpc1Tu1WomTXAE_!!2970242441-0-cib.jpg",
"https://cbu01.alicdn.com/img/ibank/O1CN01Q8KUvW1Tu1WuHOXye_!!2970242441-0-cib.jpg",
"https://cbu01.alicdn.com/img/ibank/O1CN01iEtvit1Tu1WomRzXG_!!2970242441-0-cib.jpg",
"https://cbu01.alicdn.com/img/ibank/O1CN01qkMOZK1Tu1WxlQXoW_!!2970242441-0-cib.jpg"
],
"item_imgs": [
{
"url": "https://cbu01.alicdn.com/img/ibank/O1CN01bdBTlq1Tu1WqwH3zt_!!2970242441-0-cib.jpg"
},
{
"url": "https://cbu01.alicdn.com/img/ibank/O1CN01Pbo75W1Tu1Wo82GQn_!!2970242441-0-cib.jpg"
},
{
"url": "https://cbu01.alicdn.com/img/ibank/O1CN018qPXwA1Tu1WxkxsVc_!!2970242441-0-cib.jpg"
},
{
"url": "https://cbu01.alicdn.com/img/ibank/O1CN01mjedfb1Tu1Wx5N2dq_!!2970242441-0-cib.jpg"
},
{
"url": "https://cbu01.alicdn.com/img/ibank/O1CN01KXZSnR1Tu1WolznHH_!!2970242441-0-cib.jpg"
},
{
"url": "https://cbu01.alicdn.com/img/ibank/O1CN018ELV8r1Tu1Wxl9M9x_!!2970242441-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/2970242441/p/2/e/6/t/1/343485013831.mp4",
"is_virtual": "",
"sample_id": "",
"is_promotion": "",
"props_name": "0:0:墨绿色;1:0:M建议90-115斤;1:1:L建议115-125斤;1:2:XL建议125-135斤;1:3:2XL建议135-145斤;1:4:3XL建议145-155斤;1:5:4XL建议155-165斤",
"prop_imgs": {
"prop_img": [
{
"properties": "0:0",
"url": "https://cbu01.alicdn.com/img/ibank/O1CN018ELV8r1Tu1Wxl9M9x_!!2970242441-0-cib.jpg"
}
]
},
"property_alias": "0:0:墨绿色;1:0:M建议90-115斤;1:1:L建议115-125斤;1:2:XL建议125-135斤;1:3:2XL建议135-145斤;1:4:3XL建议145-155斤;1:5:4XL建议155-165斤",
"props": [
{
"name": "面料名称",
"show": false,
"value": "聚酯纤维"
},
{
"name": "图案",
"show": false,
"value": "纯色"
},
{
"name": "工艺",
"show": false,
"value": "拼贴/拼接"
},
{
"name": "产地",
"show": false,
"value": "广州"
},
{
"name": "款式",
"show": false,
"value": "基本款"
},
{
"name": "裙长",
"show": false,
"value": "长裙"
},
{
"name": "裙型",
"show": false,
"value": "大摆型"
},
{
"name": "领型",
"show": false,
"value": "V领"
},
{
"name": "袖型",
"show": false,
"value": "常规袖"
},
{
"name": "袖长",
"show": false,
"value": "长袖"
},
{
"name": "腰型",
"show": false,
"value": "高腰"
},
{
"name": "流行元素",
"show": false,
"value": "拼接"
},
{
"name": "上市年份/季节",
"show": false,
"value": "2022年春季"
},
{
"name": "主面料成分",
"show": false,
"value": "聚酯纤维(涤纶)"
},
{
"name": "主面料成分2",
"show": false,
"value": "聚酯纤维(涤纶)"
},
{
"name": "货号",
"show": false,
"value": "898"
},
{
"name": "品牌",
"show": false,
"value": "无"
},
{
"name": "颜色",
"show": false,
"value": "墨绿色"
},
{
"name": "尺码",
"show": false,
"value": "M建议90-115斤,L建议115-125斤,XL建议125-135斤,2XL建议135-145斤,3XL建议145-155斤,4XL建议155-165斤"
},
{
"name": "风格类型",
"show": false,
"value": "气质通勤"
},
{
"name": "适用季节",
"show": false,
"value": "春季 秋季"
},
{
"name": "门襟",
"show": false,
"value": "单排多扣"
},
{
"name": "主面料成分含量",
"show": false,
"value": "30%(不含)-50%(含)"
},
{
"name": "风格",
"show": false,
"value": "通勤风"
},
{
"name": "服装款式细节",
"show": false,
"value": "原版优质"
},
{
"name": "跨境风格类型",
"show": false,
"value": "气质优雅"
},
{
"name": "是否跨境货源",
"show": false,
"value": "是"
},
{
"name": "主面料成分2含量",
"show": false,
"value": "30%及以下"
},
{
"name": "主要下游销售地区1",
"show": false,
"value": "其他"
},
{
"name": "主要下游销售地区2",
"show": false,
"value": "其他"
}
],
"total_sold": null,
"skus": {
"sku": [
{
"price": "69.00",
"total_price": 0,
"sales": "1311",
"properties": "0:0;1:0",
"properties_name": "0:0:颜色:墨绿色;1:0:尺码:M建议90-115斤",
"quantity": "412",
"sku_id": "5055212143061",
"spec_id": "fca5c6d6a4d394149d76fed280903370"
},
{
"price": "69.00",
"total_price": 0,
"sales": "1798",
"properties": "0:0;1:1",
"properties_name": "0:0:颜色:墨绿色;1:1:尺码:L建议115-125斤",
"quantity": "67",
"sku_id": "5055212143060",
"spec_id": "a9beaeeb9035999fdd1a5e7802708b61"
},
{
"price": "69.00",
"total_price": 0,
"sales": "1068",
"properties": "0:0;1:2",
"properties_name": "0:0:颜色:墨绿色;1:2:尺码:XL建议125-135斤",
"quantity": "835",
"sku_id": "5055212143059",
"spec_id": "8df1899223f2f9c9da388c5c654b3645"
},
{
"price": "69.00",
"total_price": 0,
"sales": "492",
"properties": "0:0;1:3",
"properties_name": "0:0:颜色:墨绿色;1:3:尺码:2XL建议135-145斤",
"quantity": "1483",
"sku_id": "5055212143062",
"spec_id": "90a15de779eb303ced7deac36f0d4a79"
},
{
"price": "69.00",
"total_price": 0,
"sales": "196",
"properties": "0:0;1:4",
"properties_name": "0:0:颜色:墨绿色;1:4:尺码:3XL建议145-155斤",
"quantity": "1801",
"sku_id": "5055212143063",
"spec_id": "48dcc9f4020f9c87ab5b790baf3950ef"
},
{
"price": "69.00",
"total_price": 0,
"sales": "101",
"properties": "0:0;1:5",
"properties_name": "0:0:颜色:墨绿色;1:5:尺码:4XL建议155-165斤",
"quantity": "896",
"sku_id": "5055212143064",
"spec_id": "221701b4b50a73f34bbe0357b92ebd0c"
}
]
},
"seller_id": "2970242441",
"sales": 540,
"shop_id": "2970242441",
"props_list": {
"0:0": "颜色:墨绿色",
"1:0": "尺码:M建议90-115斤",
"1:1": "尺码:L建议115-125斤",
"1:2": "尺码:XL建议125-135斤",
"1:3": "尺码:2XL建议135-145斤",
"1:4": "尺码:3XL建议145-155斤",
"1:5": "尺码:4XL建议155-165斤"
},
"seller_info": {
"nick": "深圳市南山区依若涵服装厂",
"user_num_id": "2970242441",
"sid": "b2b-2970242441318cd",
"title": "深圳市南山区依若涵服装厂",
"zhuy": "https://winport.m.1688.com/page/index.html?memberId=b2b-2970242441318cd",
"shop_name": "lugui58184148"
},
"tmall": "false",
"error": "",
"warning": "",
"url_log": [],
"unit": null,
"is_support_mix": "true",
"mix_amount": "1",
"mix_begin": "0",
"mix_number": "2147483647",
"scale": "",
"sellUnit": "件",
"props_img": {
"0:0": "https://cbu01.alicdn.com/img/ibank/O1CN018ELV8r1Tu1Wxl9M9x_!!2970242441-0-cib.jpg"
},
"sales_data": null,
"priceRange": [
[
"1",
"69.00"
],
[
"200",
"67.00"
],
[
"1000",
"65.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": "1f3d3859b6f7e514e28b388337624f58",
"secache_time": 1688954150,
"secache_date": "2023-07-10 09:55:50",
"translate_status": "",
"translate_time": 0,
"language": {
"default_lang": "cn",
"current_lang": "cn"
},
文章来源地址https://www.toymoban.com/news/detail-542212.html
到了这里,关于【阿里巴巴1688API接口开发系列】数据采集获取,封装接口可加高并发,大数据中心项目的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!