当前位置:网站首页>继续来学习有关淘宝的API接口的使用——获得店铺的所有商品 API
继续来学习有关淘宝的API接口的使用——获得店铺的所有商品 API
2022-08-02 14:36:00 【分享干货的猫】
为了进行电商平台 的API开发,首先我们需要做下面几件事情。
1)开发者注册一个账号
2)然后为每个 应用注册一个应用程序键(App Key) 。
3)下载 API的SDK并掌握基本的API基础知识和调用
4)利用SDK接口和对象,传入AppKey或者必要的时候获取并传入SessionKey来进行程序开发。
5)利用平台的文档中心和API测试工具,对接口进行测试。从而了解返回信息,方便程序获取。
以上是一般 API应用开发的关键流程,其中通过文档中心和API测试工具,进行概念了解和接口信息查询很重要。因为这些数据就是我们需要在逐步显示出来的。的API很多,不过都分为了好几个领域,慢慢就会了解深入了。
请求地址: https://api-gw.onebound.cn/taobao/item_search_shop
名称 | 类型 | 必须 | 描述 |
---|---|---|---|
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版本 |
请求参数
请求参数:shop_id=433655136&page=1&sort=
参数说明: shop_id:shop_id page:页码
sort:排序[new,bid,sale]
(new 新品,bid:价格,sale:销量,bid加_前缀为从大到小排序)
请求示例
-- 请求示例 url 默认请求参数已经URL编码处理 curl -i "https://api-gw.onebound.cn/taobao/item_search_shop/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&shop_id=433655136&page=1&sort="
Request address:
https://api-gw.onebound.cn/taobao/item_search_shop/?key=您的key&
&shop_id=150920153&page=2&sort=&cache=no&&lang=zh-CN&secret=注册获取
---------------------------------------
Result Object:
---------------------------------------
{
"items": {
"shop_id": "150920153",
"page": "2",
"has_next_page": "true",
"real_total_results": "265",
"total_results": "265",
"page_size": 19,
"page_count": 14,
"_ddf": "ti",
"item": [
{
"num_iid": "560381715239",
"pic_url": "https://img.alicdn.com/imgextra/i4/2838892713/O1CN012395vn1VubHqTgl3n_!!0-item_pic.jpg",
"title": "【官方正品】Huawei/华为耳机插口转化器CM20耳机转接头type-c",
"promotion_price": "29.00",
"price": "29.00",
"sales": 109502,
"quantity": "4522",
"seller_nick": "华为官方旗舰店",
"seller_id": "2838892713",
"shop_id": "150920153",
"shop_title": "华为官方旗舰店",
"is_tmall": "true",
"detail_url": "https://item.taobao.com/item.htm?id=560381715239"
},
{
"num_iid": "628318379125",
"pic_url": "https://img.alicdn.com/imgextra/i1/2838892713/O1CN01ev0WEN1VubITmLKgO_!!0-item_pic.jpg",
"title": "华为/HUAWEI WATCH GT2Pro华为手表智能运动手表健康管理蓝牙连接蓝宝石玻璃两周续航",
"promotion_price": "2188.00",
"price": "2188.00",
"sales": 90648,
"quantity": "1082",
"seller_nick": "华为官方旗舰店",
"seller_id": "2838892713",
"shop_id": "150920153",
"shop_title": "华为官方旗舰店",
"is_tmall": "true",
"detail_url": "https://item.taobao.com/item.htm?id=628318379125"
},
{
"num_iid": "644140119611",
"pic_url": "https://img.alicdn.com/imgextra/i4/2838892713/O1CN01mtvOPF1VubIUvTvP5_!!0-item_pic.jpg",
"title": "华为路由AX2 Pro智能加速儿童上网保护畅享4K影片提供手游加速",
"promotion_price": "229.00",
"price": "229.00",
"sales": 84966,
"quantity": "796",
"seller_nick": "华为官方旗舰店",
"seller_id": "2838892713",
"shop_id": "150920153",
"shop_title": "华为官方旗舰店",
"is_tmall": "true",
"detail_url": "https://item.taobao.com/item.htm?id=644140119611"
},
{
"num_iid": "602932107731",
"pic_url": "https://img.alicdn.com/imgextra/i1/2838892713/O1CN01yjGK1X1VubFE0ydnt_!!0-item_pic.jpg",
"title": "Huawei/华为无线充电器超级快充Mate30ProMax27W",
"promotion_price": "199.00",
"price": "199.00",
"sales": 75807,
"quantity": "113",
"seller_nick": "华为官方旗舰店",
"seller_id": "2838892713",
"shop_id": "150920153",
"shop_title": "华为官方旗舰店",
"is_tmall": "true",
"detail_url": "https://item.taobao.com/item.htm?id=602932107731"
},
{
"num_iid": "660456845796",
"pic_url": "https://img.alicdn.com/imgextra/i3/2838892713/O1CN016h31Im1VubIIduPo4_!!0-item_pic.jpg",
"title": "【立即抢购】Huawei WATCH GT3华为手表gt3华为gt3蓝牙通话定位华为智能手表男款女款运动手表血氧心率监测",
"promotion_price": "1488.00",
"price": "1488.00",
"sales": 74438,
"quantity": "16303",
"seller_nick": "华为官方旗舰店",
"seller_id": "2838892713",
"shop_id": "150920153",
"shop_title": "华为官方旗舰店",
"is_tmall": "true",
"detail_url": "https://item.taobao.com/item.htm?id=660456845796"
},
{
"num_iid": "656714563274",
"pic_url": "https://img.alicdn.com/imgextra/i4/2838892713/O1CN019Ft2TY1VubIcBVH2b_!!0-item_pic.jpg",
"title": "【赠充电器】HUAWEI/华为 P50 新款智能手机鸿蒙手机直面屏摄影拍照旗舰游戏通话新款华为官方旗舰店正品官网",
"promotion_price": "4488.00",
"price": "4488.00",
"sales": 62415,
"quantity": "3982",
"seller_nick": "华为官方旗舰店",
"seller_id": "2838892713",
"shop_id": "150920153",
"shop_title": "华为官方旗舰店",
"is_tmall": "true",
"detail_url": "https://item.taobao.com/item.htm?id=656714563274"
},
{
"num_iid": "652797551998",
"pic_url": "https://img.alicdn.com/imgextra/i1/2838892713/O1CN01dhASjK1VubIWNhZWB_!!0-item_pic.jpg",
"title": "华为智慧屏SE65 超高清全面屏幕液晶电视机 手机一碰投屏声控电视",
"promotion_price": "3199.00",
"price": "3199.00",
"sales": 61138,
"quantity": "7979",
"seller_nick": "华为官方旗舰店",
"seller_id": "2838892713",
"shop_id": "150920153",
"shop_title": "华为官方旗舰店",
"is_tmall": "true",
"detail_url": "https://item.taobao.com/item.htm?id=652797551998"
},
{
"num_iid": "627672353315",
"pic_url": "https://img.alicdn.com/imgextra/i3/2838892713/O1CN01Jwlppe1VubH8Z1dzc_!!0-item_pic.jpg",
"title": "【官方正品】Huawei/华为超级快充充电器Max22.5W SE华为快充",
"promotion_price": "69.00",
"price": "69.00",
"sales": 57364,
"quantity": "735",
"seller_nick": "华为官方旗舰店",
"seller_id": "2838892713",
"shop_id": "150920153",
"shop_title": "华为官方旗舰店",
"is_tmall": "true",
"detail_url": "https://item.taobao.com/item.htm?id=627672353315"
},
{
"num_iid": "665822542125",
"pic_url": "https://img.alicdn.com/imgextra/i4/2838892713/O1CN017zdrsv1VubHQGumai_!!0-item_pic.jpg",
"title": "华为超级快充充电器(Max 40W) 智能输出电流 8重安全保护",
"promotion_price": "159.00",
"price": "159.00",
"sales": 52675,
"quantity": "4483",
"seller_nick": "华为官方旗舰店",
"seller_id": "2838892713",
"shop_id": "150920153",
"shop_title": "华为官方旗舰店",
"is_tmall": "true",
"detail_url": "https://item.taobao.com/item.htm?id=665822542125"
},
{
"num_iid": "627740661715",
"pic_url": "https://img.alicdn.com/imgextra/i3/2838892713/O1CN013zJExN1VubINLqzBV_!!0-item_pic.jpg",
"title": "【立即抢购】华为WATCH FIT new华为手表智能手表运动健康管理强续航轻薄全彩大屏男女同款心率监测HUAWEI",
"promotion_price": "799.00",
"price": "799.00",
"sales": 49447,
"quantity": "2347",
"seller_nick": "华为官方旗舰店",
"seller_id": "2838892713",
"shop_id": "150920153",
"shop_title": "华为官方旗舰店",
"is_tmall": "true",
"detail_url": "https://item.taobao.com/item.htm?id=627740661715"
},
{
"num_iid": "652103723866",
"pic_url": "https://img.alicdn.com/imgextra/i1/2838892713/O1CN010a3tcY1VubINMd3Po_!!0-item_pic.jpg",
"title": "【立即抢购】华为手环6 Pro智能手环华为手表全天候血氧监测全面屏长续航运动手环智能心率检测HUAWEI",
"promotion_price": "449.00",
"price": "449.00",
"sales": 49183,
"quantity": "6506",
"seller_nick": "华为官方旗舰店",
"seller_id": "2838892713",
"shop_id": "150920153",
"shop_title": "华为官方旗舰店",
"is_tmall": "true",
"detail_url": "https://item.taobao.com/item.htm?id=652103723866"
},
{
"num_iid": "646010191048",
"pic_url": "https://img.alicdn.com/imgextra/i3/2838892713/O1CN01gllecN1VubIXrvp3j_!!0-item_pic.jpg",
"title": "华为平板HUAWEI MatePad Pro 10.8英寸2021款鸿蒙HarmonyOS教育数码学生电脑8GB内存",
"promotion_price": "3099.00",
"price": "3099.00",
"sales": 48442,
"quantity": "2637",
"seller_nick": "华为官方旗舰店",
"seller_id": "2838892713",
"shop_id": "150920153",
"shop_title": "华为官方旗舰店",
"is_tmall": "true",
"detail_url": "https://item.taobao.com/item.htm?id=646010191048"
},
{
"num_iid": "643253238510",
"pic_url": "https://img.alicdn.com/imgextra/i1/2838892713/O1CN01rgen751VubIONBkFk_!!0-item_pic.jpg",
"title": "【立即抢购】华为WATCH3华为手表智能手表鸿蒙HarmonyOS独立通话强劲续航畅连通话血氧监测心率检测运动手表",
"promotion_price": "2199.00",
"price": "2199.00",
"sales": 48143,
"quantity": "2452",
"seller_nick": "华为官方旗舰店",
"seller_id": "2838892713",
"shop_id": "150920153",
"shop_title": "华为官方旗舰店",
"is_tmall": "true",
"detail_url": "https://item.taobao.com/item.htm?id=643253238510"
},
{
"num_iid": "631851235420",
"pic_url": "https://img.alicdn.com/imgextra/i1/2838892713/O1CN01yAkKNS1VubGz4EMsW_!!0-item_pic.jpg",
"title": "【官方正品】Huawei/华为 6A数据线高品质线芯1m线长",
"promotion_price": "59.00",
"price": "59.00",
"sales": 43479,
"quantity": "4175",
"seller_nick": "华为官方旗舰店",
"seller_id": "2838892713",
"shop_id": "150920153",
"shop_title": "华为官方旗舰店",
"is_tmall": "true",
"detail_url": "https://item.taobao.com/item.htm?id=631851235420"
},
{
"num_iid": "623495130470",
"pic_url": "https://img.alicdn.com/imgextra/i4/2838892713/O1CN014BeOwv1VubISiNlvy_!!0-item_pic.jpg",
"title": "Huawei/华为通话手环 B6蓝牙耳机智能运动心率感应男女通用跑步官方新品专业健康监测清晰稳定通话",
"promotion_price": "999.00",
"price": "999.00",
"sales": 43465,
"quantity": "827",
"seller_nick": "华为官方旗舰店",
"seller_id": "2838892713",
"shop_id": "150920153",
"shop_title": "华为官方旗舰店",
"is_tmall": "true",
"detail_url": "https://item.taobao.com/item.htm?id=623495130470"
},
{
"num_iid": "655524197256",
"pic_url": "https://img.alicdn.com/imgextra/i2/2838892713/O1CN01SvLlLd1VubIQ1KbM4_!!0-item_pic.jpg",
"title": "HUAWEI nova 9 Pro 全网通双3200万前置Vlog镜头鸿蒙手机100W超快充华为手机256GB内存华为官方旗舰店",
"promotion_price": "3299.00",
"price": "3299.00",
"sales": 40559,
"quantity": "2411",
"seller_nick": "华为官方旗舰店",
"seller_id": "2838892713",
"shop_id": "150920153",
"shop_title": "华为官方旗舰店",
"is_tmall": "true",
"detail_url": "https://item.taobao.com/item.htm?id=655524197256"
},
{
"num_iid": "673653128280",
"pic_url": "https://img.alicdn.com/imgextra/i1/2838892713/O1CN01W6Bedu1VubIOC5cDK_!!0-item_pic.jpg",
"title": "【含充电器】华为/HUAWEI 畅享50 新款智能手机学生补贴大电池直面屏大音量鸿蒙手机华为旗舰官网正品老人机",
"promotion_price": "1299.00",
"price": "1299.00",
"sales": 37888,
"quantity": "6482",
"seller_nick": "华为官方旗舰店",
"seller_id": "2838892713",
"shop_id": "150920153",
"shop_title": "华为官方旗舰店",
"is_tmall": "true",
"detail_url": "https://item.taobao.com/item.htm?id=673653128280"
},
{
"num_iid": "669297864781",
"pic_url": "https://img.alicdn.com/imgextra/i1/2838892713/O1CN01ospS7n1VubIJKqE2Y_!!0-item_pic.jpg",
"title": "HUAWEI/华为nova9 SE 新款华为智能手机学生补贴鸿蒙手机高清摄影快充游戏全面屏华为官方旗舰店正品官网老人",
"promotion_price": "2199.00",
"price": "2199.00",
"sales": 37748,
"quantity": "7461",
"seller_nick": "华为官方旗舰店",
"seller_id": "2838892713",
"shop_id": "150920153",
"shop_title": "华为官方旗舰店",
"is_tmall": "true",
"detail_url": "https://item.taobao.com/item.htm?id=669297864781"
},
{
"num_iid": "662217987752",
"pic_url": "https://img.alicdn.com/imgextra/i1/2838892713/O1CN01RuaqQq1VubISkoHGQ_!!0-item_pic.jpg",
"title": "HUAWEI/华为nova 8 SE 新款智能手机学生补贴鸿蒙手机高清摄影华为超级快充游戏华为官方旗舰店官网老人机",
"promotion_price": "2099.00",
"price": "2099.00",
"sales": 37172,
"quantity": "375",
"seller_nick": "华为官方旗舰店",
"seller_id": "2838892713",
"shop_id": "150920153",
"shop_title": "华为官方旗舰店",
"is_tmall": "true",
"detail_url": "https://item.taobao.com/item.htm?id=662217987752"
}
]
},
"error_code": "0000",
"reason": "ok",
"secache": "6865409bad30ade70221855bbfa37578",
"secache_time": 1659405802,
"secache_date": "2022-08-02 10:03:22",
"translate_status": "",
"translate_time": 0,
"language": {
"default_lang": "cn",
"current_lang": "cn"
},
"error": "",
"cache": 0,
"api_info": "today:38 max:10100 all[81=38+26+17];expires:2030-12-31",
"execution_time": "0.775",
"server_time": "Beijing/2022-08-02 10:03:22",
"client_ip": "106.6.35.126",
"call_args": {
"seller_nick": "150920153",
"start_price": "2"
},
"api_type": "taobao",
"translate_language": "zh-CN",
"translate_engine": "google_new",
"server_memory": "1.05MB",
"request_id": "gw-4.62e885e9ef9a7",
"last_id": "1122339930"
}
边栏推荐
猜你喜欢
随机推荐
页面返回顶部和固定导航栏js基础案例
中国服装行业已形成一套完整的产业体系
scroll、offset、client事件的用法及区别
PAT Class A 1145 Hash - Average Lookup Time
2022/7/15,我的人生中第一篇博客,不忘初心,砥砺前行!
BOM(Browser Object Model)浏览器对象模型相关概念
阅读,是最便宜的高贵
初入c语言
2022-07-09 第五小组 瞒春 学习笔记
中科驭数等单位牵头发布行业首部DPU评测方法技术白皮书
2022-07-13 第五小组 瞒春 学习笔记
Servlet基础详解
【无标题】
ShardingSphere基本介绍及核心概念
为什么四个字节的float表示的范围比八个字节的long要广?
Typora永久使用,彻底解决This beta version of Typora is expired.
树状DP(记忆化搜索)PAT甲级 1079 1090 1106
2022-07-11 第五小组 瞒春 学习笔记
公司最大的内卷,是“管理错位”
第六章-6.1-堆-6.2-维护堆的性质-6.3-建堆