• 简易介绍如何使用淘宝商品详情 API(关键词搜索商品列表API)


    淘宝(Taobao)是中国一家快速发展的电商平台,为了帮助开发者更好地接入淘宝,平台提供了丰富的 API 接口供开发者使用,其中包括获取淘宝商品详情的 API。接下来,我们将介绍如何使用淘宝商品详情 API。

    1.获取淘宝开发者账号

    在使用淘宝API 之前,需要先注册账号。注册成功后可以获取到相应的key 和Secret 用于调用 API。

    2.了解淘宝商品详情 API

    淘宝商品详情 API 提供了多种接口可以使用。此接口可以获取到指定商品的详细信息,例如价格、标题、图片、描述、所属类目等信息。使用这个接口需要提供商品的 id。

    3.调用淘宝商品详情 API

    淘宝商品详情 API 可以使用多种编程语言来调用。以下是 Python 代码的示例:

     

    1. {
    2. "item": {
    3. "num_iid": "652874751412",
    4. "title": "北欧轻奢布艺沙发 小户型简约现代客厅ins风网红款三双人订制沙发",
    5. "desc_short": "",
    6. "price": 480,
    7. "total_price": "",
    8. "suggestive_price": "",
    9. "orginal_price": 480,
    10. "nick": "惜情yqq1127",
    11. "num": 1531,
    12. "detail_url": "https://item.taobao.com/item.htm?id=652874751412",
    13. "pic_url": "//img.alicdn.com/imgextra/i4/2568161054/O1CN01aYBriY1Jem9UDtt9e_!!2568161054.jpg",
    14. "brand": "#0 工厂",
    15. "brandId": "",
    16. "rootCatId": "",
    17. "cid": 50020632,
    18. "desc": "
      \n
      \n http://img.alicdn.com/imgextra/i3/2568161054/O1CN01LFmSOU1Jem9QOjMPb_!!2568161054.jpg\" />\n http://img.alicdn.com/imgextra/i3/2568161054/O1CN014vyOOT1Jem9DpHz3Y_!!2568161054.jpg\" />\n http://img.alicdn.com/imgextra/i1/2568161054/O1CN01B3PpsA1Jem9N8V7uf_!!2568161054.jpg\" />\n http://img.alicdn.com/imgextra/i2/2568161054/O1CN015JbyeY1Jem9MZshUt_!!2568161054.jpg\" />\n http://img.alicdn.com/imgextra/i1/2568161054/O1CN01HXSoxx1Jem9RvgzHN_!!2568161054.jpg\" />\n http://img.alicdn.com/imgextra/i3/2568161054/O1CN01IEultA1Jem9MdEx8R_!!2568161054.jpg\" />\n http://img.alicdn.com/imgextra/i3/2568161054/O1CN0176K98O1Jem9QOjE69_!!2568161054.jpg\" />\n http://img.alicdn.com/imgextra/i4/2568161054/O1CN013Pxp1O1Jem9RvgeTv_!!2568161054.jpg\" />\n http://img.alicdn.com/imgextra/i1/2568161054/O1CN01SfyZ8M1Jem9QOi1Gx_!!2568161054.jpg\" />\n http://img.alicdn.com/imgextra/i4/2568161054/O1CN01bb1POa1Jem9Sdgve2_!!2568161054.jpg\" />\n http://img.alicdn.com/imgextra/i3/2568161054/O1CN018Eo9dV1Jem9KV0y79_!!2568161054.jpg\" />\n http://img.alicdn.com/imgextra/i1/2568161054/O1CN01vuEofr1Jem9Nzy9xY_!!2568161054.jpg\" />\n http://img.alicdn.com/imgextra/i4/2568161054/O1CN01qw9sAi1Jem8wkNKpy_!!2568161054.jpg\" />\n http://img.alicdn.com/imgextra/i1/2568161054/O1CN01HeFhFw1Jem8rLnjBY_!!2568161054.jpg\" />\n http://img.alicdn.com/imgextra/i2/2568161054/O1CN01SNgjoi1Jem9QOil15_!!2568161054.jpg\" />\n http://img.alicdn.com/imgextra/i2/2568161054/O1CN01RXf3RA1Jem9DpHVwj_!!2568161054.jpg\" />\n http://img.alicdn.com/imgextra/i4/2568161054/O1CN01gZmZjt1Jem9ISThgm_!!2568161054.jpg\" />\n http://img.alicdn.com/imgextra/i2/2568161054/O1CN01YL0FHM1Jem9PQTjX9_!!2568161054.jpg\" />\n http://img.alicdn.com/imgextra/i4/2568161054/O1CN01UhsEhZ1Jem8yvJIhZ_!!2568161054.jpg\" />\n
      \n
      https://www.o0b.cn/i.php?t.png&rid=gw-3.6520b34fc4432&p=3060574805&k=i_key&t=1696641875\" style=\"display:none\" />",
    19. "item_imgs": [
    20. {
    21. "url": "//img.alicdn.com/imgextra/i4/2568161054/O1CN01aYBriY1Jem9UDtt9e_!!2568161054.jpg"
    22. },
    23. {
    24. "url": "//img.alicdn.com/imgextra/i3/2568161054/O1CN01kjOfNb1Jem9DmWn8Y_!!2568161054.jpg"
    25. },
    26. {
    27. "url": "//img.alicdn.com/imgextra/i1/2568161054/O1CN01HoB9ha1Jem9DmWn8r_!!2568161054.jpg"
    28. },
    29. {
    30. "url": "//img.alicdn.com/imgextra/i4/2568161054/O1CN011PjP2P1Jem9MXEUFT_!!2568161054.jpg"
    31. },
    32. {
    33. "url": "//img.alicdn.com/imgextra/i3/2568161054/O1CN01KUfBFL1Jem9KTTMn1_!!2568161054.jpg"
    34. }
    35. ],
    36. "item_weight": "",
    37. "post_fee": "",
    38. "freight": "",
    39. "express_fee": "",
    40. "ems_fee": "",
    41. "shipping_to": "",
    42. "video": {
    43. "url": null
    44. },
    45. "sample_id": "",
    46. "props_name": "31480:14306495906:几人坐:脚踏90*60*48cm;31480:14306495907:几人坐:双人165*95*67cm;31480:14306495908:几人坐:三人210*95*67cm;31480:14306495909:几人坐:单人100*95*67cm;31480:21480914361:几人坐:四人位240*95*67cm;31480:21480914362:几人坐:大四人320*95*76cm;31480:1387571900:几人坐:3米贵妃沙发;31480:32527954:几人坐:定制尺寸;1627207:28321:颜色分类:乳白色 尺寸颜色可定制;1627207:28321:颜色分类:乳白色 尺寸颜色可定制;1627207:28321:颜色分类:乳白色 尺寸颜色可定制;1627207:28321:颜色分类:乳白色 尺寸颜色可定制;1627207:28321:颜色分类:乳白色 尺寸颜色可定制;1627207:28321:颜色分类:乳白色 尺寸颜色可定制;1627207:28321:颜色分类:乳白色 尺寸颜色可定制;1627207:28321:颜色分类:乳白色 尺寸颜色可定制",
    47. "prop_imgs": {
    48. "prop_img": [
    49. {
    50. "properties": "1627207:28321",
    51. "url": "http://img.alicdn.com/imgextra/i1/2568161054/O1CN017GTZ4h1Jem9Qra1ap_!!2568161054.jpg"
    52. }
    53. ]
    54. },
    55. "props_imgs": {
    56. "prop_img": [
    57. {
    58. "properties": "1627207:28321",
    59. "url": "http://img.alicdn.com/imgextra/i1/2568161054/O1CN017GTZ4h1Jem9Qra1ap_!!2568161054.jpg"
    60. }
    61. ]
    62. },
    63. "property_alias": "",
    64. "props": [
    65. {
    66. "name": "品牌",
    67. "value": "#0 工厂"
    68. },
    69. {
    70. "name": "型号",
    71. "value": "520"
    72. },
    73. {
    74. "name": "材质",
    75. "value": "木"
    76. },
    77. {
    78. "name": "木质材质",
    79. "value": "松木"
    80. },
    81. {
    82. "name": "面料",
    83. "value": "绒布"
    84. },
    85. {
    86. "name": "风格",
    87. "value": "北欧"
    88. },
    89. {
    90. "name": "几人坐",
    91. "value": "脚踏90*60*48cm,双人165*95*67cm,三人210*95*67cm,单人100*95*67cm,四人位240*95*67cm,大四人320*95*76cm,3米贵妃沙发,定制尺寸"
    92. },
    93. {
    94. "name": "颜色分类",
    95. "value": "乳白色"
    96. },
    97. {
    98. "name": "填充物",
    99. "value": "海绵"
    100. },
    101. {
    102. "name": "结构工艺",
    103. "value": "木质工艺"
    104. },
    105. {
    106. "name": "是否可定制",
    107. "value": "是"
    108. },
    109. {
    110. "name": "沙发组合形式",
    111. "value": "U形"
    112. },
    113. {
    114. "name": "是否可拆洗",
    115. "value": "是"
    116. },
    117. {
    118. "name": "适用对象",
    119. "value": "成年人"
    120. },
    121. {
    122. "name": "是否带储物空间",
    123. "value": "否"
    124. },
    125. {
    126. "name": "产地",
    127. "value": "上海"
    128. },
    129. {
    130. "name": "地市",
    131. "value": "上海市"
    132. },
    133. {
    134. "name": "区县",
    135. "value": "奉贤区"
    136. },
    137. {
    138. "name": "是否组装",
    139. "value": "否"
    140. },
    141. {
    142. "name": "出租车是否可运输",
    143. "value": "否"
    144. },
    145. {
    146. "name": "填充物硬度",
    147. "value": "软"
    148. },
    149. {
    150. "name": "款式定位",
    151. "value": "经济型"
    152. }
    153. ],
    154. "total_sold": "-1",
    155. "skus": {
    156. "sku": [
    157. {
    158. "price": 480,
    159. "total_price": 0,
    160. "orginal_price": 480,
    161. "properties": "31480:14306495906;1627207:28321",
    162. "properties_name": "31480:14306495906:几人坐:脚踏90*60*48cm;1627207:28321:颜色分类:乳白色 尺寸颜色可定制",
    163. "quantity": 200,
    164. "sku_id": "4881047531343"
    165. },
    166. {
    167. "price": 1688,
    168. "total_price": 0,
    169. "orginal_price": 1688,
    170. "properties": "31480:14306495907;1627207:28321",
    171. "properties_name": "31480:14306495907:几人坐:双人165*95*67cm;1627207:28321:颜色分类:乳白色 尺寸颜色可定制",
    172. "quantity": 135,
    173. "sku_id": "4881047531344"
    174. },
    175. {
    176. "price": 2088,
    177. "total_price": 0,
    178. "orginal_price": 2088,
    179. "properties": "31480:14306495908;1627207:28321",
    180. "properties_name": "31480:14306495908:几人坐:三人210*95*67cm;1627207:28321:颜色分类:乳白色 尺寸颜色可定制",
    181. "quantity": 196,
    182. "sku_id": "4881047531345"
    183. },
    184. {
    185. "price": 968,
    186. "total_price": 0,
    187. "orginal_price": 968,
    188. "properties": "31480:14306495909;1627207:28321",
    189. "properties_name": "31480:14306495909:几人坐:单人100*95*67cm;1627207:28321:颜色分类:乳白色 尺寸颜色可定制",
    190. "quantity": 200,
    191. "sku_id": "4881047531346"
    192. },
    193. {
    194. "price": 2388,
    195. "total_price": 0,
    196. "orginal_price": 2388,
    197. "properties": "31480:21480914361;1627207:28321",
    198. "properties_name": "31480:21480914361:几人坐:四人位240*95*67cm;1627207:28321:颜色分类:乳白色 尺寸颜色可定制",
    199. "quantity": 200,
    200. "sku_id": "5039985183001"
    201. },
    202. {
    203. "price": 3188,
    204. "total_price": 0,
    205. "orginal_price": 3188,
    206. "properties": "31480:21480914362;1627207:28321",
    207. "properties_name": "31480:21480914362:几人坐:大四人320*95*76cm;1627207:28321:颜色分类:乳白色 尺寸颜色可定制",
    208. "quantity": 200,
    209. "sku_id": "5039985183002"
    210. },
    211. {
    212. "price": 3400,
    213. "total_price": 0,
    214. "orginal_price": 3400,
    215. "properties": "31480:1387571900;1627207:28321",
    216. "properties_name": "31480:1387571900:几人坐:3米贵妃沙发;1627207:28321:颜色分类:乳白色 尺寸颜色可定制",
    217. "quantity": 200,
    218. "sku_id": "5039984824000"
    219. },
    220. {
    221. "price": 3000,
    222. "total_price": 0,
    223. "orginal_price": 3000,
    224. "properties": "31480:32527954;1627207:28321",
    225. "properties_name": "31480:32527954:几人坐:定制尺寸;1627207:28321:颜色分类:乳白色 尺寸颜色可定制",
    226. "quantity": 200,
    227. "sku_id": "5039985183003"
    228. }
    229. ]
    230. },
    231. "seller_id": "2568161054",
    232. "sales": 0,
    233. "shop_id": "567158267",
    234. "props_list": {
    235. "31480:14306495906": "几人坐:脚踏90*60*48cm",
    236. "31480:14306495907": "几人坐:双人165*95*67cm",
    237. "31480:14306495908": "几人坐:三人210*95*67cm",
    238. "31480:14306495909": "几人坐:单人100*95*67cm",
    239. "31480:21480914361": "几人坐:四人位240*95*67cm",
    240. "31480:21480914362": "几人坐:大四人320*95*76cm",
    241. "31480:1387571900": "几人坐:3米贵妃沙发",
    242. "31480:32527954": "几人坐:定制尺寸",
    243. "1627207:28321": "颜色分类:乳白色 尺寸颜色可定制"
    244. },
    245. "seller_info": {
    246. "nick": "惜情yqq1127",
    247. "item_score": 4.98198,
    248. "score_p": 4.98198,
    249. "delivery_score": 4.98198,
    250. "shop_type": "",
    251. "user_num_id": "2568161054",
    252. "sid": null,
    253. "title": "",
    254. "zhuy": "https://shop567158267",
    255. "cert": null,
    256. "open_time": "",
    257. "credit_score": null,
    258. "shop_name": "现代布艺沙发"
    259. },
    260. "tmall": true,
    261. "error": "",
    262. "location": "江苏南通",
    263. "data_from": "Ha",
    264. "has_discount": "false",
    265. "is_promotion": "false",
    266. "promo_type": null,
    267. "props_img": {
    268. "1627207:28321": "http://img.alicdn.com/imgextra/i1/2568161054/O1CN017GTZ4h1Jem9Qra1ap_!!2568161054.jpg"
    269. },
    270. "format_check": "ok",
    271. "desc_img": [
    272. "http://img.alicdn.com/imgextra/i3/2568161054/O1CN01LFmSOU1Jem9QOjMPb_!!2568161054.jpg",
    273. "http://img.alicdn.com/imgextra/i3/2568161054/O1CN014vyOOT1Jem9DpHz3Y_!!2568161054.jpg",
    274. "http://img.alicdn.com/imgextra/i1/2568161054/O1CN01B3PpsA1Jem9N8V7uf_!!2568161054.jpg",
    275. "http://img.alicdn.com/imgextra/i2/2568161054/O1CN015JbyeY1Jem9MZshUt_!!2568161054.jpg",
    276. "http://img.alicdn.com/imgextra/i1/2568161054/O1CN01HXSoxx1Jem9RvgzHN_!!2568161054.jpg",
    277. "http://img.alicdn.com/imgextra/i3/2568161054/O1CN01IEultA1Jem9MdEx8R_!!2568161054.jpg",
    278. "http://img.alicdn.com/imgextra/i3/2568161054/O1CN0176K98O1Jem9QOjE69_!!2568161054.jpg",
    279. "http://img.alicdn.com/imgextra/i4/2568161054/O1CN013Pxp1O1Jem9RvgeTv_!!2568161054.jpg",
    280. "http://img.alicdn.com/imgextra/i1/2568161054/O1CN01SfyZ8M1Jem9QOi1Gx_!!2568161054.jpg",
    281. "http://img.alicdn.com/imgextra/i4/2568161054/O1CN01bb1POa1Jem9Sdgve2_!!2568161054.jpg",
    282. "http://img.alicdn.com/imgextra/i3/2568161054/O1CN018Eo9dV1Jem9KV0y79_!!2568161054.jpg",
    283. "http://img.alicdn.com/imgextra/i1/2568161054/O1CN01vuEofr1Jem9Nzy9xY_!!2568161054.jpg",
    284. "http://img.alicdn.com/imgextra/i4/2568161054/O1CN01qw9sAi1Jem8wkNKpy_!!2568161054.jpg",
    285. "http://img.alicdn.com/imgextra/i1/2568161054/O1CN01HeFhFw1Jem8rLnjBY_!!2568161054.jpg",
    286. "http://img.alicdn.com/imgextra/i2/2568161054/O1CN01SNgjoi1Jem9QOil15_!!2568161054.jpg",
    287. "http://img.alicdn.com/imgextra/i2/2568161054/O1CN01RXf3RA1Jem9DpHVwj_!!2568161054.jpg",
    288. "http://img.alicdn.com/imgextra/i4/2568161054/O1CN01gZmZjt1Jem9ISThgm_!!2568161054.jpg",
    289. "http://img.alicdn.com/imgextra/i2/2568161054/O1CN01YL0FHM1Jem9PQTjX9_!!2568161054.jpg",
    290. "http://img.alicdn.com/imgextra/i4/2568161054/O1CN01UhsEhZ1Jem8yvJIhZ_!!2568161054.jpg"
    291. ],
    292. "shop_item": [],
    293. "relate_items": []
    294. },

     

     

  • 相关阅读:
    穿越障碍:最小路径和的高效算法比较【python力扣题64】
    基于Springboot+MySQL的个人健康监控管理系统
    最近学习内容(2023-10-21)
    WebGL 同时使用多幅纹理
    Android中Handler机制和原理是什么?
    快速排序模拟实现
    学生信息管理-数据库版
    攻防世界----lottery
    《Python+Kivy(App开发)从入门到实践》自学笔记:简单UX部件——Image图片
    Gitlab SSRF 漏洞复现 CVE-2021-22214
  • 原文地址:https://blog.csdn.net/API_Json/article/details/133632313