• 虾皮shopee电商数据平台官方API接口根据商品ID获取商品产品详情返回值说明


    商品详情API接口可以提供商品的基本信息,如名称、描述、价格、图片等,帮助电子商务平台展示和推荐商品。此外,还可以提供商品的库存信息、销售数据、评论信息等,帮助平台进行数据分析和管理。

    shopee.item_get-根据ID获取取商品详情

    公共参数

    请求地址: 注册调用key请求接入

    名称类型必须描述
    keyString调用key(必须以GET方式拼接在URL中)
    secretString调用密钥
    api_nameStringAPI接口名称(包括在请求地址中)[item_search,item_get,item_search_shop等]
    cacheString[yes,no]默认yes,将调用缓存的数据,速度比较快
    result_typeString[json,jsonu,xml,serialize,var_export]返回数据格式,默认为json,jsonu输出的内容中文可以直接阅读
    langString[cn,en,ru]翻译语言,默认cn简体中文
    versionStringAPI版本

    请求参数

    请求参数:num_iid=264070136/5637247041&country=.com.my

    参数说明:num_iid:商品ID-country:网站后缀(.com.my;.vn;.ph)

    响应参数

    Version: Date:

    名称类型必须示例值描述

    num_iid

    Bigint05637247041宝贝ID

    title

    String0Fashionable plus size womens dress 2020 new spring and summer dress was thin and thin and fat sister dress two-piece suit宝贝标题

    price

    Float022.17价格

    orginal_price

    String031.68原价

    num

    Int03836库存

    detail_url

    String0https://shopee.com.my/product/264070136/5637247041宝贝链接

    pic_url

    String0https://cf.shopee.com.my/file/f8bc1116ea922e5ed87a492390b1cc1a宝贝图片

    brand

    String0No Brand品牌名称

    favcount

    Int02027

    desc

    String0

    skus

    Mix0{"sku": [{"price": "39", "total_price": null, "orginal_price": "39.00", "properties": "0:0", "properties_name": "0:0:T-shirt+skirt:M 建议【42.5-50KG】", "quantity": "305", "sku_id": "3166598625985"}]商品规格信息列表

    has_discount

    String0true

    item_size

    String0

    cid

    Int016

    currency

    String0MYR

    size_chart

    String0https://cf.shopee.com.my/file/6105b7c64414c2012908bff679b9321d

    sales

    Int0138销量

    item_imgs

    Mix0[{ "url": "https://cf.shopee.com.my/file/f8bc1116ea922e5ed87a492390b1cc1a"}商品图片

    discount

    String030%

    location

    String0Mainland China发货地

    shop_id

    Int0151372205店铺ID

    seller_info

    Mix0{"nick": "qzq1274334183.my", "city": "Mainland China", "level": 12, "seller_promotion_refresh_time": "2021-01-19 02:00:00", "zhuy": "https://shopee.com.my/shop/264070136/search", "shop_type": "A"}卖家信息

    prop_imgs

    Mix0[]属性图片

    props_list

    Mix0{20509:9974422: 尺码:36}商品属性

    props_name

    String00:0:T-shirt+skirt:M 建议【42.5-50KG】;0:1:T-shirt+skirt:L 建议 【50-57.5kg】;商品属性名

    props

    Mix0[{ "name": "产地","value": "中国" }]商品详情

    current_lang

    String0en

    currency_code

    String0MYR

    props_img

    Mix01627207:28326": "//img.alicdn.com/imgextra/i2/2844096782/O1CN01VrjpXt1zyCc9DvERE_!!2844096782.jpg属性图片

    shop_item

    Mix0[]

    relate_items

    Mix0[]

    tmall

    Boolean0false是否天猫

    error

    String0错误信息

    warning

    String0price_json error;skus miss;警告信息

    url_log

    Mix0[]

    method

    String0item_tmall:pget_item

    promo_type

    String0

    Java请求示例

    1. import java.io.BufferedReader;
    2. import java.io.IOException;
    3. import java.io.InputStream;
    4. import java.io.InputStreamReader;
    5. import java.io.Reader;
    6. import java.net.URL;
    7. import java.nio.charset.Charset;
    8. import org.json.JSONException;
    9. import org.json.JSONObject;
    10. import java.io.PrintWriter;
    11. import java.net.URLConnection;
    12. public class Example {
    13. private static String readAll(Reader rd) throws IOException {
    14. StringBuilder sb = new StringBuilder();
    15. int cp;
    16. while ((cp = rd.read()) != -1) {
    17. sb.append((char) cp);
    18. }
    19. return sb.toString();
    20. }
    21. public static JSONObject postRequestFromUrl(String url, String body) throws IOException, JSONException {
    22. URL realUrl = new URL(url);
    23. URLConnection conn = realUrl.openConnection();
    24. conn.setDoOutput(true);
    25. conn.setDoInput(true);
    26. PrintWriter out = new PrintWriter(conn.getOutputStream());
    27. out.print(body);
    28. out.flush();
    29. InputStream instream = conn.getInputStream();
    30. try {
    31. BufferedReader rd = new BufferedReader(new InputStreamReader(instream, Charset.forName("UTF-8")));
    32. String jsonText = readAll(rd);
    33. JSONObject json = new JSONObject(jsonText);
    34. return json;
    35. } finally {
    36. instream.close();
    37. }
    38. }
    39. public static JSONObject getRequestFromUrl(String url) throws IOException, JSONException {
    40. URL realUrl = new URL(url);
    41. URLConnection conn = realUrl.openConnection();
    42. InputStream instream = conn.getInputStream();
    43. try {
    44. BufferedReader rd = new BufferedReader(new InputStreamReader(instream, Charset.forName("UTF-8")));
    45. String jsonText = readAll(rd);
    46. JSONObject json = new JSONObject(jsonText);
    47. return json;
    48. } finally {
    49. instream.close();
    50. }
    51. }
    52. public static void main(String[] args) throws IOException, JSONException {
    53. // 请求示例 url 默认请求参数已经URL编码处理
    54. String url = "https://shopee/item_get/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=264070136/5637247041&country=.com.my";
    55. JSONObject json = getRequestFromUrl(url);
    56. System.out.println(json.toString());
    57. }
    58. }

    响应示例

    1. {
    2. "item": {
    3. "num_iid": "5637247041",
    4. "title": "Fashionable plus size women's dress 2020 new spring and summer dress was thin and thin and fat sister dress two-piece suit",
    5. "price": 22.18,
    6. "orginal_price": 31.68,
    7. "num": 17907,
    8. "detail_url": "https://shopee.com.my/jewellery-emas-cop-916-gold-bracelet-elet-gold-bracelet-gelang-tangan-bracelets-charms-cute-bracelet-emas-korea-i.264070136.5637247041?",
    9. "pic_url": "https://cf.shopee.com.my/file/f8bc1116ea922e5ed87a492390b1cc1a",
    10. "brand": null,
    11. "desc": "Brand: Other/Other\nStyle: Sweet and Fresh/College\nPopular elements: buttons, gauze, stitching\nStyle: skirt suit\nsleeve length: short sleeve\nFabric/Material: Other/Polyester (Polyester Fiber)\nIngredient content: 71% (inclusive)-80% (inclusive)\nWhether to add cashmere: no cashmere\nTime to market: Spring 2020\nDelivery time:\nShipped on the same day before subscripting at 18:00 every day,\nIt is estimated that it will take 4-10 days for normal goods to arrive at your hands\n\nMasa penghantaran\nDihantar pada hari yang sama sebelum pukul 18:00 setiap hari\nDihantar keesokan harinya selepas jam 18:00.\nDianggarkan memerlukan masa 4-10 hari untuk barang biasa sampai tangan anda\n\nPakaian wanita bersaiz plus bergaya.Pakaian musim bunga dan musim panas dalam 2020 yang baru\nkurus dan gemuk itu berpakaian yg dua kepinghttps://www.o0b.cn/i.php?t.png&rid=gw-4.6531ed5256d51&p=1778787569&k=i_key&t=1697770837\" style=\"display:none\" />",
    12. "skus": {
    13. "sku": [
    14. {
    15. "price": 22.18,
    16. "orginal_price": 31.68,
    17. "properties": "2:3",
    18. "properties_name": "2:3:skirt:2XL 【建议65-72.5kg】",
    19. "quantity": 998,
    20. "sku_id": 19329148701
    21. },
    22. {
    23. "price": 44.36,
    24. "orginal_price": 63.36,
    25. "properties": "0:5",
    26. "properties_name": "0:5:T-shirt+skirt:4XL【建议82.5-90kg】",
    27. "quantity": 985,
    28. "sku_id": 19329148691
    29. },
    30. {
    31. "price": 22.18,
    32. "orginal_price": 31.68,
    33. "properties": "2:4",
    34. "properties_name": "2:4:skirt:3XL 【建议72.5-82.5kg】",
    35. "quantity": 999,
    36. "sku_id": 19329148702
    37. },
    38. {
    39. "price": 44.36,
    40. "orginal_price": 63.36,
    41. "properties": "0:2",
    42. "properties_name": "0:2:T-shirt+skirt:XL 【建议57.5-65kg】",
    43. "quantity": 992,
    44. "sku_id": 19329148688
    45. },
    46. {
    47. "price": 44.36,
    48. "orginal_price": 63.36,
    49. "properties": "0:3",
    50. "properties_name": "0:3:T-shirt+skirt:2XL 【建议65-72.5kg】",
    51. "quantity": 989,
    52. "sku_id": 19329148689
    53. },
    54. {
    55. "price": 44.36,
    56. "orginal_price": 63.36,
    57. "properties": "0:1",
    58. "properties_name": "0:1:T-shirt+skirt:L 建议 【50-57.5kg】",
    59. "quantity": 983,
    60. "sku_id": 19329148687
    61. },
    62. {
    63. "price": 22.18,
    64. "orginal_price": 31.68,
    65. "properties": "2:5",
    66. "properties_name": "2:5:skirt:4XL【建议82.5-90kg】",
    67. "quantity": 997,
    68. "sku_id": 19329148703
    69. },
    70. {
    71. "price": 26.66,
    72. "orginal_price": 38.08,
    73. "properties": "1:4",
    74. "properties_name": "1:4:T-shirt:3XL 【建议72.5-82.5kg】",
    75. "quantity": 999,
    76. "sku_id": 19329148696
    77. },
    78. {
    79. "price": 26.66,
    80. "orginal_price": 38.08,
    81. "properties": "1:3",
    82. "properties_name": "1:3:T-shirt:2XL 【建议65-72.5kg】",
    83. "quantity": 999,
    84. "sku_id": 19329148695
    85. },
    86. {
    87. "price": 26.66,
    88. "orginal_price": 38.08,
    89. "properties": "1:5",
    90. "properties_name": "1:5:T-shirt:4XL【建议82.5-90kg】",
    91. "quantity": 998,
    92. "sku_id": 19329148697
    93. },
    94. {
    95. "price": 44.36,
    96. "orginal_price": 63.36,
    97. "properties": "0:4",
    98. "properties_name": "0:4:T-shirt+skirt:3XL 【建议72.5-82.5kg】",
    99. "quantity": 992,
    100. "sku_id": 19329148690
    101. },
    102. {
    103. "price": 22.18,
    104. "orginal_price": 31.68,
    105. "properties": "2:1",
    106. "properties_name": "2:1:skirt:L 建议 【50-57.5kg】",
    107. "quantity": 1000,
    108. "sku_id": 19329148699
    109. },
    110. {
    111. "price": 22.18,
    112. "orginal_price": 31.68,
    113. "properties": "2:0",
    114. "properties_name": "2:0:skirt:M 建议【42.5-50KG】",
    115. "quantity": 1000,
    116. "sku_id": 19329148698
    117. },
    118. {
    119. "price": 44.36,
    120. "orginal_price": 63.36,
    121. "properties": "0:0",
    122. "properties_name": "0:0:T-shirt+skirt:M 建议【42.5-50KG】",
    123. "quantity": 982,
    124. "sku_id": 19329148686
    125. },
    126. {
    127. "price": 26.66,
    128. "orginal_price": 38.08,
    129. "properties": "1:0",
    130. "properties_name": "1:0:T-shirt:M 建议【42.5-50KG】",
    131. "quantity": 998,
    132. "sku_id": 19329148692
    133. },
    134. {
    135. "price": 22.18,
    136. "orginal_price": 31.68,
    137. "properties": "2:2",
    138. "properties_name": "2:2:skirt:XL 【建议57.5-65kg】",
    139. "quantity": 997,
    140. "sku_id": 19329148700
    141. },
    142. {
    143. "price": 26.66,
    144. "orginal_price": 38.08,
    145. "properties": "1:2",
    146. "properties_name": "1:2:T-shirt:XL 【建议57.5-65kg】",
    147. "quantity": 1000,
    148. "sku_id": 19329148694
    149. },
    150. {
    151. "price": 26.66,
    152. "orginal_price": 38.08,
    153. "properties": "1:1",
    154. "properties_name": "1:1:T-shirt:L 建议 【50-57.5kg】",
    155. "quantity": 999,
    156. "sku_id": 19329148693
    157. }
    158. ]
    159. },
    160. "has_discount": "false",
    161. "item_size": [
    162. "T-shirt+skirt",
    163. "T-shirt",
    164. "skirt"
    165. ],
    166. "cid": 100017,
    167. "categories": [
    168. {
    169. "catid": 100017,
    170. "display_name": "Women Clothes",
    171. "is_default_subcat": false,
    172. "no_sub": false
    173. },
    174. {
    175. "catid": 100104,
    176. "display_name": "Dresses",
    177. "is_default_subcat": false,
    178. "no_sub": true
    179. }
    180. ],
    181. "currency": "MYR",
    182. "sales": 337,
    183. "item_imgs": {
    184. "item_img": [
    185. {
    186. "url": "https://cf.shopee.com.my/file/f8bc1116ea922e5ed87a492390b1cc1a"
    187. },
    188. {
    189. "url": "https://cf.shopee.com.my/file/c0d49dfae84b81468269a17714742adb"
    190. },
    191. {
    192. "url": "https://cf.shopee.com.my/file/f4dd56edbe0ccc13ca2cba0d6ba5167a"
    193. },
    194. {
    195. "url": "https://cf.shopee.com.my/file/35f35de0d5826c4969a42483b34d8bea"
    196. },
    197. {
    198. "url": "https://cf.shopee.com.my/file/14b7804a2a87c70fa763c518ce6ec583"
    199. },
    200. {
    201. "url": "https://cf.shopee.com.my/file/e1bc3fe36abc09c00ead17243b9825f0"
    202. },
    203. {
    204. "url": "https://cf.shopee.com.my/file/ab490d68394575366c36cee16ad0f86e"
    205. },
    206. {
    207. "url": "https://cf.shopee.com.my/file/a6148259a00b460f5e30ba04a327f9a3"
    208. },
    209. {
    210. "url": "https://cf.shopee.com.my/file/e1bc5d2bb3c010af4f688e6f22a63eca"
    211. }
    212. ]
    213. },
    214. "location": "Mainland China",
    215. "shop_id": 264070136,
    216. "prop_imgs": {
    217. "prop_img": [
    218. {
    219. "properties": "0:0",
    220. "url": "https://cf.shopee.com.my/file/81bea46afa4113012b7330cc3c846428"
    221. },
    222. {
    223. "properties": "0:1",
    224. "url": "https://cf.shopee.com.my/file/c0d49dfae84b81468269a17714742adb"
    225. },
    226. {
    227. "properties": "0:2",
    228. "url": "https://cf.shopee.com.my/file/f4dd56edbe0ccc13ca2cba0d6ba5167a"
    229. }
    230. ]
    231. },
    232. "props_list": {
    233. "2:3": "skirt:2XL 【建议65-72.5kg】",
    234. "0:5": "T-shirt+skirt:4XL【建议82.5-90kg】",
    235. "2:4": "skirt:3XL 【建议72.5-82.5kg】",
    236. "0:2": "T-shirt+skirt:XL 【建议57.5-65kg】",
    237. "0:3": "T-shirt+skirt:2XL 【建议65-72.5kg】",
    238. "0:1": "T-shirt+skirt:L 建议 【50-57.5kg】",
    239. "2:5": "skirt:4XL【建议82.5-90kg】",
    240. "1:4": "T-shirt:3XL 【建议72.5-82.5kg】",
    241. "1:3": "T-shirt:2XL 【建议65-72.5kg】",
    242. "1:5": "T-shirt:4XL【建议82.5-90kg】",
    243. "0:4": "T-shirt+skirt:3XL 【建议72.5-82.5kg】",
    244. "2:1": "skirt:L 建议 【50-57.5kg】",
    245. "2:0": "skirt:M 建议【42.5-50KG】",
    246. "0:0": "T-shirt+skirt:M 建议【42.5-50KG】",
    247. "1:0": "T-shirt:M 建议【42.5-50KG】",
    248. "2:2": "skirt:XL 【建议57.5-65kg】",
    249. "1:2": "T-shirt:XL 【建议57.5-65kg】",
    250. "1:1": "T-shirt:L 建议 【50-57.5kg】"
    251. },
    252. "_ddf": "boy",
    253. "props_img": {
    254. "0:0": "https://cf.shopee.com.my/file/81bea46afa4113012b7330cc3c846428",
    255. "0:1": "https://cf.shopee.com.my/file/c0d49dfae84b81468269a17714742adb",
    256. "0:2": "https://cf.shopee.com.my/file/f4dd56edbe0ccc13ca2cba0d6ba5167a"
    257. },
    258. "format_check": "ok",
    259. "desc_img": [],
    260. "shop_item": [],
    261. "relate_items": []
    262. },
    263. "error": "",
    264. "secache": "da67365cb819d7c288d8451ffd8c3692",
    265. "secache_time": 1697770837,
    266. "secache_date": "2023-10-20 11:00:37",
    267. "translate_status": "",
    268. "translate_time": 0,
    269. "language": {
    270. "default_lang": "cn",
    271. "current_lang": "cn"
    272. },
    273. "reason": "",
    274. "error_code": "0000",
    275. "cache": 0,
    276. "api_info": "today:53 max:10100 all[142=53+18+71];expires:2030-12-31",
    277. "execution_time": "3.138",
    278. "server_time": "Beijing/2023-10-20 11:00:37",
    279. "client_ip": "106.6.36.241",
    280. "call_args": {
    281. "num_iid": "264070136/5637247041",
    282. "is_promotion": ".com.my"
    283. },
    284. "api_type": "shopee",
    285. "translate_language": "zh-CN",
    286. "translate_engine": "baidu",
    287. "server_memory": "0.81MB",
    288. "request_id": "gw-4.6531ed5256d51",
    289. "last_id": "2205249143"
    290. }
  • 相关阅读:
    LNMP 平台搭建(四十)
    手把手教你Magisk安装
    CS:GO开服架设服务器搭建游戏配置方法教程教学插件配置下载资源配置
    Vue2基础学习
    python-爬虫(可直接使用)
    实景无人直播系统哪个最好用?呆头鹅无人直播系统
    vue笔记
    【牛客网-前端笔试题】——Javascript专项练习5
    etcd实现大规模服务治理应用实战
    大数据研发工程师面试
  • 原文地址:https://blog.csdn.net/2301_78159247/article/details/133941629