概述
应用编程接口(API)是一组用于构建和集成应用软件的定义和协议。点击获取测试 key 和 secret
API 的工作原理是什么?
通过 API,您无需了解实施原理,也能将您的产品或服务与其他的互通。这样可以简化应用的开发,节省时间和成本。在您开发新的工具和产品,或管理现有工具和产品时,强大灵活的 API 可以帮助您简化设计、管理和使用,并带来更多创新机遇。
API 有时被视为合同,而合同文本则代表了各方之间的协议:如果一方以特定方式发送远程请求,该协议规定了另一方的软件将如何做出响应。
由于 API 简化了开发人员将新应用组件集成到现有基础架构中的方式,继而也对业务和 IT 团队之间的协作提供了帮助。随着数字市场日新月异,业务需求通常也会出现迅速变化,新的竞争对手利用新的应用即可改变整个行业。为了保持竞争力,支持快速开发和部署创新服务尤为重要。云原生应用开发是提高开发速度的一个明确办法,依赖于通过 API 连接 微服务应用架构。
API 是通过云原生应用开发来连接您自己的基础架构的一个简化方式,此外还支持您向客户和其他外部用户分享您的数据。公共 API 有着独特的商业价值,因其可以简化和扩展您与合作伙伴的联系方式,并有望支持您从数据中实现盈利(Google Maps API 便是其中一个广为人知的案例)。
测试示例:
Request address:
https://api-gw.onebound.cn/taobao/item_get/?key=test_api_key&
&num_iid=679219702490&is_promotion=1&&lang=zh-CN&secret=ob20220808
---------------------------------------
Result Object:
---------------------------------------
{
"item": {
"num_iid": "679219702490",
"title": "【88会员日】人头马VSOP200ml优质香槟区干邑白兰地",
"desc_short": "",
"price": "119",
"total_price": 0,
"suggestive_price": 0,
"orginal_price": "799.00",
"nick": "人头马官方旗舰店",
"num": "200",
"min_num": 0,
"detail_url": "https://item.taobao.com/item.htm?id=679219702490",
"pic_url": "//img.alicdn.com/imgextra/i3/1751752896/O1CN015m4E8u1XGPm716hXf_!!0-item_pic.jpg",
"brand": "Remy Martin/人头马",
"brandId": "3564346",
"rootCatId": "50008141",
"cid": "50510004",
"crumbs": [],
"created_time": "",
"modified_time": "",
"delist_time": "",
"desc": "<img class=\"desc_anchor\" id=\"desc-module-1\" src=\"http://assets.alicdn.com/kissy/1.0.0/build/imglazyload/spaceball.gif\" />\n <p><img src=\"http://img.alicdn.com/imgextra/i1/1751752896/O1CN01sER3ON1XGPmEe8Nyk_!!1751752896.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i1/1751752896/O1CN01krNFnN1XGPm7mcIM3_!!1751752896.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i2/1751752896/O1CN01BGWXBS1XGPmCRizOH_!!1751752896.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i4/1751752896/O1CN01nLXQdT1XGPmEdeqP8_!!1751752896.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i2/1751752896/O1CN01OOtbTQ1XGPm7mdZPe_!!1751752896.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i4/1751752896/O1CN01NGlAMR1XGPmFVtH5K_!!1751752896.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i4/1751752896/O1CN01NJ1bll1XGPmIhXadw_!!1751752896.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i1/1751752896/O1CN01sikNw21XGPmDk9wCt_!!1751752896.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i4/1751752896/O1CN01Z0IgBu1XGPmHQfaXV_!!1751752896.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i3/1751752896/O1CN01DmoJBd1XGPmBwkKzV_!!1751752896.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i3/1751752896/O1CN01K3uYd71XGPm7mddYN_!!1751752896.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i2/1751752896/O1CN01JBTvoD1XGPmA4JhiX_!!1751752896.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i4/1751752896/O1CN01HHL2X91XGPmGfRibO_!!1751752896.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i1/1751752896/O1CN01zbhLK81XGPmHQfvKM_!!1751752896.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i3/1751752896/O1CN01UNOzbY1XGPmCRhiOh_!!1751752896.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i4/1751752896/O1CN01JUwoQg1XGPmDkB95o_!!1751752896.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i3/1751752896/O1CN01adYaX01XGPm5W7SzQ_!!1751752896.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i3/1751752896/O1CN01j93JTq1XGPmGfReS4_!!1751752896.jpg\" align=\"absmiddle\" /></p><img src=\"https://www.o0b.cn/i.php?t.png&rid=gw-4.630aca85ba50b&p=1778788205&k=i_key&t=1661651591\" style=\"display:none\" />",
"desc_img": [
"http://assets.alicdn.com/kissy/1.0.0/build/imglazyload/spaceball.gif",
"http://img.alicdn.com/imgextra/i1/1751752896/O1CN01sER3ON1XGPmEe8Nyk_!!1751752896.jpg",
"http://img.alicdn.com/imgextra/i1/1751752896/O1CN01krNFnN1XGPm7mcIM3_!!1751752896.jpg",
"http://img.alicdn.com/imgextra/i2/1751752896/O1CN01BGWXBS1XGPmCRizOH_!!1751752896.jpg",
"http://img.alicdn.com/imgextra/i4/1751752896/O1CN01nLXQdT1XGPmEdeqP8_!!1751752896.jpg",
"http://img.alicdn.com/imgextra/i2/1751752896/O1CN01OOtbTQ1XGPm7mdZPe_!!1751752896.jpg",
"http://img.alicdn.com/imgextra/i4/1751752896/O1CN01NGlAMR1XGPmFVtH5K_!!1751752896.jpg",
"http://img.alicdn.com/imgextra/i4/1751752896/O1CN01NJ1bll1XGPmIhXadw_!!1751752896.jpg",
"http://img.alicdn.com/imgextra/i1/1751752896/O1CN01sikNw21XGPmDk9wCt_!!1751752896.jpg",
"http://img.alicdn.com/imgextra/i4/1751752896/O1CN01Z0IgBu1XGPmHQfaXV_!!1751752896.jpg",
"http://img.alicdn.com/imgextra/i3/1751752896/O1CN01DmoJBd1XGPmBwkKzV_!!1751752896.jpg",
"http://img.alicdn.com/imgextra/i3/1751752896/O1CN01K3uYd71XGPm7mddYN_!!1751752896.jpg",
"http://img.alicdn.com/imgextra/i2/1751752896/O1CN01JBTvoD1XGPmA4JhiX_!!1751752896.jpg",
"http://img.alicdn.com/imgextra/i4/1751752896/O1CN01HHL2X91XGPmGfRibO_!!1751752896.jpg",
"http://img.alicdn.com/imgextra/i1/1751752896/O1CN01zbhLK81XGPmHQfvKM_!!1751752896.jpg",
"http://img.alicdn.com/imgextra/i3/1751752896/O1CN01UNOzbY1XGPmCRhiOh_!!1751752896.jpg",
"http://img.alicdn.com/imgextra/i4/1751752896/O1CN01JUwoQg1XGPmDkB95o_!!1751752896.jpg",
"http://img.alicdn.com/imgextra/i3/1751752896/O1CN01adYaX01XGPm5W7SzQ_!!1751752896.jpg",
"http://img.alicdn.com/imgextra/i3/1751752896/O1CN01j93JTq1XGPmGfReS4_!!1751752896.jpg"
],
"item_imgs": [
{
"url": "//img.alicdn.com/imgextra/i3/1751752896/O1CN015m4E8u1XGPm716hXf_!!0-item_pic.jpg"
},
{
"url": "//img.alicdn.com/imgextra/i1/1751752896/O1CN01Y3oZVb1XGPmGelYmg_!!1751752896.jpg"
},
{
"url": "//img.alicdn.com/imgextra/i2/1751752896/O1CN01CEUE9y1XGPmDjYCn6_!!1751752896.jpg"
},
{
"url": "//img.alicdn.com/imgextra/i1/1751752896/O1CN01PBJPfC1XGPm70jCeF_!!1751752896.jpg"
},
{
"url": "//img.alicdn.com/imgextra/i2/1751752896/O1CN01Z36WAV1XGPm9toX17_!!0-item_pic.jpg"
}
],
"item_weight": "",
"item_size": "",
"location": "天津",
"post_fee": " 免运费",
"express_fee": null,
"ems_fee": "",
"shipping_to": "",
"has_discount": "true",
"video": [],
"is_virtual": "",
"sample_id": "",
"is_promotion": "true",
"props_name": "",
"prop_imgs": {
"prop_img": []
},
"property_alias": "",
"props": [
{
"name": "品牌",
"value": "Remy Martin/人头马"
},
{
"name": "品名",
"value": "人头马VSOP200ml 套装 1"
},
{
"name": "产地",
"value": "法国"
},
{
"name": "净含量",
"value": "200"
},
{
"name": "包装种类",
"value": "瓶装"
},
{
"name": "包装方式",
"value": "包装"
},
{
"name": "度数",
"value": "40"
},
{
"name": "厂名",
"value": "E. REMY MARTIN & Co"
},
{
"name": "厂址",
"value": "法国"
},
{
"name": "厂家联系方式",
"value": "021-64486111"
},
{
"name": "保质期",
"value": "9999"
}
],
"total_sold": "582",
"skus": {
"sku": []
},
"seller_id": "1751752896",
"sales": 3000,
"shop_id": "105719803",
"props_list": [],
"seller_info": {
"nick": "人头马官方旗舰店",
"item_score": "4.9 ",
"score_p": "4.9 ",
"delivery_score": "4.9 ",
"shop_type": "B",
"user_num_id": "1751752896",
"sid": "105719803",
"title": "人头马官方旗舰店",
"zhuy": "https://shop105719803.taobao.com/",
"shop_name": "人头马官方旗舰店"
},
"tmall": true,
"error": "",
"warning": "",
"url_log": [],
"fav_count": "130",
"fans_count": "36.9万",
"freight": "快递: 免运费",
"props_imgs": {
"prop_img": []
},
"_ddf": "xdl",
"promo_type": null,
"props_img": [],
"format_check": "ok",
"shop_item": [],
"relate_items": []
},
"error": "",
"secache": "b16e4a05dc2f5fe5d5857f3fe7c1b564",
"secache_time": 1661651591,
"secache_date": "2022-08-28 09:53:11",
"translate_status": "",
"translate_time": 0,
"language": {
"default_lang": "cn",
"current_lang": "cn"
},
"reason": "",
"error_code": "0000",
"cache": 0,
"api_info": "today:39 max:10100 all[119=39+48+32];expires:2030-12-31",
"execution_time": "1.795",
"server_time": "Beijing/2022-08-28 09:53:11",
"client_ip": "106.6.39.109",
"call_args": {
"num_iid": "679219702490",
"is_promotion": "1"
},
"api_type": "taobao",
"translate_language": "zh-CN",
"translate_engine": "google_new",
"server_memory": "0.92MB",
"request_id": "gw-4.630aca85ba50b",
"last_id": "1179929743"
}