电商API接口如何使用(教你获取数据)

什么是API接口

api接口指的是应用程序编程接口,是一些预先定义的函数,或指软件系统不同组成部分衔接的约定。用来提供应用程序与开发人员基于某软件或硬件得以访问的一组例程,而又无需访问原码,或理解内部工作机制的细节。

一个好的短信API接口平台在收发短信时响应迅速,基本不需要等待,可以快速获取所需的验证码、信息通知等。比如,当人们注册账号,需要使用短信验证码进行身份验证时,好的短信API接口平台在收到相应指令后,可以快速响应,并将验证短信发送到指定用户的手机上。根本不需要等待,大大提升了用户体验。

高品质API接口平台的另一个特点是24小时不间断发送。目前,一些老旧、实力雄厚的平台基本可以满足这一要求,24小时随时发送各类服务短信,快捷、稳定、无故障,满足客户需求。

点击测试

电商API接口如何使用(教你获取数据)_第1张图片

名称 类型 必须 描述
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版本

请求参数

请求参数:num_iid=674926899801&is_promotion=1

参数说明:num_iid:淘宝商品ID
is_promotion:是否获取取促销价

 API返回结果

Request address:
https://api-gw.onebound.cn/taobao/item_get/?key=&
&num_iid=674926899801&is_promotion=1&cache=no&&lang=zh-CN&secret=
---------------------------------------
Result Object:
---------------------------------------
{
	"item": {
		"num_iid": "674926899801",
		"title": "2022夏季新款T恤+吊带连衣裙高级感气质惊艳印花大摆真丝背带裙",
		"desc_short": "",
		"price": 158,
		"total_price": "",
		"suggestive_price": "",
		"orginal_price": 899,
		"nick": "灰机刘",
		"num": 200,
		"detail_url": "https://item.taobao.com/item.htm?id=674926899801",
		"pic_url": "https://gw.alicdn.com/imgextra/O1CN01e8cGnI1s5WGmI7sJt_!!1782555715.jpg",
		"brand": "",
		"brandId": "",
		"rootCatId": "",
		"cid": 50010850,
		"desc": "
\n
\n \n \n \n \n \n \n \n \n \n \n \n
\n
", "item_imgs": [ { "url": "https://gw.alicdn.com/imgextra/O1CN01e8cGnI1s5WGmI7sJt_!!1782555715.jpg" }, { "url": "https://img.alicdn.com/imgextra/i2/1782555715/O1CN01rxa8b81s5WGqw0Zk8_!!1782555715.jpg" }, { "url": "https://img.alicdn.com/imgextra/i1/1782555715/O1CN01XjqXJh1s5WGqU8rnW_!!1782555715.jpg" }, { "url": "https://img.alicdn.com/imgextra/i1/1782555715/O1CN015TaCqy1s5WGmIWqej_!!1782555715.jpg" }, { "url": "https://img.alicdn.com/imgextra/i1/1782555715/O1CN01vERI5F1s5WGqU94Gc_!!1782555715.jpg" } ], "item_weight": "", "post_fee": 0, "freight": "", "express_fee": "", "ems_fee": "", "shipping_to": "", "video": [], "sample_id": "", "props_name": "20509:28316:尺码:L;20509:28317:尺码:XL;20509:28314:尺码:S;20509:28315:尺码:M;20509:6145171:尺码:2XL;1627207:130164:颜色分类:花色;1627207:130164:颜色分类:花色;1627207:130164:颜色分类:花色;1627207:130164:颜色分类:花色;1627207:130164:颜色分类:花色", "prop_imgs": { "prop_img": [ { "properties": "1627207:130164", "url": "//gd2.alicdn.com/imgextra/i4/1782555715/O1CN01e8cGnI1s5WGmI7sJt_!!1782555715.jpg" } ] }, "props_imgs": { "prop_img": [ { "properties": "1627207:130164", "url": "//gd2.alicdn.com/imgextra/i4/1782555715/O1CN01e8cGnI1s5WGmI7sJt_!!1782555715.jpg" } ] }, "property_alias": "", "props": [ { "name": "尺码", "value": "S,M,L,XL,2XL" }, { "name": "面料", "value": "其他" }, { "name": "图案", "value": "花色" }, { "name": "风格", "value": "通勤" }, { "name": "领型", "value": "圆领" }, { "name": "腰型", "value": "宽松腰" }, { "name": "衣门襟", "value": "套头" }, { "name": "颜色分类", "value": "花色" }, { "name": "袖型", "value": "常规" }, { "name": "组合形式", "value": "两件套" }, { "name": "裙型", "value": "A字裙" }, { "name": "适用季节", "value": "夏季" }, { "name": "年份季节", "value": "2022年夏季" }, { "name": "袖长", "value": "短袖" }, { "name": "裙长", "value": "长裙" }, { "name": "流行元素/工艺", "value": "印花" }, { "name": "廓形", "value": "A型" }, { "name": "材质成分", "value": "其他材质100%" } ], "total_sold": "443", "skus": { "sku": [ { "price": 158, "total_price": 0, "orginal_price": 899, "properties": "20509:28316;1627207:130164", "properties_name": "20509:28316:尺码:L;1627207:130164:颜色分类:花色", "quantity": 200, "sku_id": "4854282897878" }, { "price": 158, "total_price": 0, "orginal_price": 899, "properties": "20509:28317;1627207:130164", "properties_name": "20509:28317:尺码:XL;1627207:130164:颜色分类:花色", "quantity": 200, "sku_id": "4854282897879" }, { "price": 158, "total_price": 0, "orginal_price": 899, "properties": "20509:28314;1627207:130164", "properties_name": "20509:28314:尺码:S;1627207:130164:颜色分类:花色", "quantity": 200, "sku_id": "4854282897876" }, { "price": 158, "total_price": 0, "orginal_price": 899, "properties": "20509:28315;1627207:130164", "properties_name": "20509:28315:尺码:M;1627207:130164:颜色分类:花色", "quantity": 200, "sku_id": "4854282897877" }, { "price": 158, "total_price": 0, "orginal_price": 899, "properties": "20509:6145171;1627207:130164", "properties_name": "20509:6145171:尺码:2XL;1627207:130164:颜色分类:花色", "quantity": 200, "sku_id": "4854282897880" } ] }, "seller_id": "1782555715", "sales": 443, "shop_id": "108760563", "props_list": { "20509:28314": "尺码:S", "20509:28315": "尺码:M", "20509:28316": "尺码:L", "20509:28317": "尺码:XL", "20509:6145171": "尺码:2XL", "1627207:130164": "颜色分类:花色" }, "seller_info": { "nick": "灰机刘", "item_score": 4.79583, "score_p": 4.8645, "delivery_score": 4.90438, "shop_type": "", "user_num_id": "1782555715", "sid": "108760563", "title": "", "zhuy": "https://shop108760563.taobao.com", "cert": null, "open_time": "8年老店", "credit_score": "tb-rank-cap:2", "shop_name": "柠檬绿真丝直销店" }, "tmall": false, "error": "", "location": "广东佛山", "data_from": "Ha", "has_discount": "true", "is_promotion": "true", "promo_type": null, "props_img": { "1627207:130164": "//gd2.alicdn.com/imgextra/i4/1782555715/O1CN01e8cGnI1s5WGmI7sJt_!!1782555715.jpg" }, "format_check": "ok", "desc_img": [ "http://img.alicdn.com/imgextra/i2/1782555715/O1CN01SO4uG51s5WGoQip9j_!!1782555715.jpg", "http://img.alicdn.com/imgextra/i1/1782555715/O1CN01Yo5LBO1s5WGdArROA_!!1782555715.jpg", "http://img.alicdn.com/imgextra/i3/1782555715/O1CN01WJKLPc1s5WGjiW7uX_!!1782555715.jpg", "http://img.alicdn.com/imgextra/i4/1782555715/O1CN01XFyXIy1s5WGk1g05k_!!1782555715.jpg", "http://img.alicdn.com/imgextra/i4/1782555715/O1CN01J9iq4T1s5WGxzQPDz_!!1782555715.jpg", "http://img.alicdn.com/imgextra/i1/1782555715/O1CN01jj6YVz1s5WGodbuxO_!!1782555715.jpg", "http://img.alicdn.com/imgextra/i2/1782555715/O1CN01Gz9A8y1s5WGvyQP9M_!!1782555715.jpg", "http://img.alicdn.com/imgextra/i3/1782555715/O1CN01etoIkp1s5WGlbZ1HY_!!1782555715.jpg", "http://img.alicdn.com/imgextra/i3/1782555715/O1CN01Xn8v9O1s5WGvDKWYk_!!1782555715.jpg", "http://img.alicdn.com/imgextra/i2/1782555715/O1CN01oPuruk1s5WGlbad48_!!1782555715.jpg", "http://img.alicdn.com/imgextra/i1/1782555715/O1CN010lYDbW1s5WGx9uDPb_!!1782555715.jpg" ], "shop_item": [], "relate_items": [] }, "error": "", "secache": "d2b1a0c87322d7d5140f29b38240b21b", "secache_time": 1662688031, "secache_date": "2022-09-09 09:47:11", "translate_status": "", "translate_time": 0, "language": { "default_lang": "cn", "current_lang": "cn" }, "reason": "", "error_code": "0000", "cache": 0, "api_info": "today:173 max:10100 all[291=173+79+39];expires:2030-12-31", "execution_time": "2.146", "server_time": "Beijing/2022-09-09 09:47:11", "client_ip": "106.6.38.201", "call_args": { "num_iid": "674926899801", "is_promotion": "1" }, "api_type": "taobao", "translate_language": "zh-CN", "translate_engine": "baidu_api", "server_memory": "5.91MB", "request_id": "gw-3.631a9b1d6fd4c", "last_id": "1204982178" }

你可能感兴趣的:(API,电商API,网络爬虫,json,前端,java,python,网络爬虫)