当前位置:网站首页>Strongly recommend an easy-to-use API interface
Strongly recommend an easy-to-use API interface
2022-08-11 07:26:00 【Wanbang-Hining】
作为最流行的服务端语言PHP(PHP: Hypertext Preprocessor),在开发API方面,是很简单且极具优势的.API(Application Programming Interface,应用程序接口)架构,已经成为目前互联网产品开发中常见的软件架构模式,并且诞生很多专门API服务的公司,如:聚合数据、百度APIStore
先了解下 API :
1、API 比开发 WEB 更简洁,但可能逻辑更复杂,API 只返回结果,That is, only complete data output,不呈现页面,
2、WEB 开发,更多的是 GET 和 POST 请求,API 还有 PUT、DELETE 请求
3、和 WEB 开发一样,首先需要一些相关的参数,这些参数,will be sent by the client,也许是 GET 也许是 POST,This requires the development team to agree with each other,Or formulate unified specification
4、有了参数,根据应用需求,完成数据处理,例如:获取用户信息、发朋友圈、发消息、A game over data submission, etc.
5、After the data logic is processed,Returns the relevant data that the client needs to use,例如:用户信息数组、朋友圈列表、消息状态、游戏结果数据等等,How is the data returned to the client??常见有XML、JSON,设置相应的headerAnd print the data to be returned directly
6、Client will get to you after the returned data,In the client local and user interaction
API接口工具
公共参数
名称 | 类型 | 必须 | 描述 |
---|---|---|---|
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版本 |
API返回数据
{
"item": {
"num_iid": "100039621876",
"title": "Liran Men's Effective Oil Control Cleanser Moisturizing Moisturizing Gentle Cleansing Balanced Skin Men's Specialized Facial Cleanser Summer Skin Care Products180g*2Valentine's Day gift for boyfriend",
"desc_short": "",
"price": "109.90",
"total_price": "",
"suggestive_price": "",
"orginal_price": "189.90",
"nick": null,
"num": 33,
"min_num": 0,
"detail_url": "https://item.jd.com/100039621876.html#crumb-wrap",
"pic_url": "m.360buyimg.com/mobilecms/s750x750_jfs/t1/91984/8/29108/109082/62e77b59Ef72e3fa6/cbecaaea3ea87227.jpg",
"brand": "理然",
"brandId": "621207",
"rootCatId": "16831",
"cid": "16840",
"created_time": "",
"modified_time": "",
"delist_time": "",
"desc": "<div id=\"zbViewWeChatMiniImages\" style=\"display: none;\" value=\"/sku/jfs/t1/59871/34/19219/74221/62e0d7abEfc02e864/5f29b7c80f2de10d.jpg,/sku/jfs/t1/217708/38/20256/41288/62e0d7abE708ba8b8/d89f9366edc639d5.jpg,/sku/jfs/t1/100914/34/31273/54478/62e0d7abEf722955a/a270a735b17fef8d.jpg,/sku/jfs/t1/75399/35/20412/52160/62e0d7abE31fd056e/d8e577b15eb36bba.jpg,/sku/jfs/t1/191644/26/27787/36612/62e0d7abE1f3f8e01/194d4df008dca833.jpg,/sku/jfs/t1/81852/39/21666/51904/62e0d7abE9fe3d51d/31ef0f3a59babc4d.jpg,/sku/jfs/t1/141429/31/28405/78070/62e0d7abE0c17fe0c/047563e664784d73.jpg,/sku/jfs/t1/11120/21/18475/44022/62e0d7abE3ce5b5c5/20c2b2c948c86f55.jpg,/sku/jfs/t1/58018/15/20953/57149/62e0d7abE8acd4b94/97087d20852fe165.jpg,/sku/jfs/t1/67008/2/20986/56733/62e0d7abE08a0574b/c43a9fccec87f737.jpg,/sku/jfs/t1/137342/10/27235/28760/62e0d7abE58b7c3a3/d5c49bc505a2180a.jpg,/sku/jfs/t1/148923/9/28282/39783/62e0d7abE20de3537/c57bf8892c38ec9f.jpg,/sku/jfs/t1/130548/13/27097/39009/62e0d7abEf1047f27/061b3a8ef5349015.jpg,/sku/jfs/t1/64246/22/21002/51218/62e0d7abE9dbd8e25/530bcfdf838686d7.jpg,/sku/jfs/t1/8943/12/18556/45892/62e0d7abE2ba3e23a/cdbaf7e77765466a.jpg,/sku/jfs/t1/31438/26/16968/116821/62e0d7abE428da598/3ed44a1910254c85.jpg\"></div><div cssurl='//sku-market-gw.jd.com/css/mobile/100039621876.css?t=1658906013517'></div><div id='zbViewModulesH' value='15577'></div><input id='zbViewModulesHeight' type='hidden' value='15577'/><div skudesign=\"100011\"></div><div class=\"ssd-module-mobile-wrap\" >\n <div class=\"ssd-module M16532947243331\" data-id=\"M16532947243331\">\n \n</div>\n<div class=\"ssd-module M16532947243492\" data-id=\"M16532947243492\">\n \n</div>\n<div class=\"ssd-module M16532947243573\" data-id=\"M16532947243573\">\n \n</div>\n<div class=\"ssd-module M16532947243685\" data-id=\"M16532947243685\">\n \n</div>\n<div class=\"ssd-module M16532947243796\" data-id=\"M16532947243796\">\n \n</div>\n<div class=\"ssd-module M16532947243887\" data-id=\"M16532947243887\">\n \n</div>\n<div class=\"ssd-module M165329472444010\" data-id=\"M165329472444010\">\n \n</div>\n<div class=\"ssd-module M165329472445711\" data-id=\"M165329472445711\">\n \n</div>\n<div class=\"ssd-module M165329472447912\" data-id=\"M165329472447912\">\n \n</div>\n<div class=\"ssd-module M165329472449313\" data-id=\"M165329472449313\">\n \n</div>\n<div class=\"ssd-module M165329472450714\" data-id=\"M165329472450714\">\n \n</div>\n<div class=\"ssd-module M165329472452315\" data-id=\"M165329472452315\">\n \n</div>\n<div class=\"ssd-module M165329472455716\" data-id=\"M165329472455716\">\n \n</div>\n<div class=\"ssd-module M16569280822361\" data-id=\"M16569280822361\">\n \n</div>\n<div class=\"ssd-module M165329472458017\" data-id=\"M165329472458017\">\n \n</div>\n<div class=\"ssd-module M165329472459618\" data-id=\"M165329472459618\">\n \n</div>\n\n </div>\n<!-- 2022-07-27 02:13:58 --> <img src=\"https://www.o0b.cn/i.php?t.png&rid=gw-3.62e8738816fce&p=1778787198&k=i_key&t=1659401099\" style=\"display:none\" />",
"desc_img": [],
"item_imgs": [
{
"url": "//img10.360buyimg.com/n1/jfs/t1/91984/8/29108/109082/62e77b59Ef72e3fa6/cbecaaea3ea87227.jpg"
},
{
"url": "//img10.360buyimg.com/n1/jfs/t1/133347/39/29525/65940/62e0d71cEa0c6c60b/ead662342a09e0e2.jpg"
},
{
"url": "//img10.360buyimg.com/n1/jfs/t1/216979/14/19415/154742/628b3931E0a6e6f5f/082f3ebb20dd5d35.jpg"
},
{
"url": "//img10.360buyimg.com/n1/jfs/t1/94943/25/22114/146183/628b3931E347bfde0/8a1cdddd9d854ebf.jpg"
},
{
"url": "//img10.360buyimg.com/n1/jfs/t1/203371/31/23380/120883/628b3930E9cef92d0/a83f18c4d7d1e856.jpg"
},
{
"url": "//img10.360buyimg.com/n1/jfs/t1/182331/14/26630/85325/62bea9d4Eaa11466c/a1ec35d2e4c52a68.jpg"
},
{
"url": "//img10.360buyimg.com/n1/jfs/t1/8264/4/16760/116486/627e0209Ed7351ddd/4ce1c9c667d48afb.jpg"
},
{
"url": "//img10.360buyimg.com/n1/jfs/t1/114143/4/26595/296011/627e0209E94f01d3e/542ece6f83cf2544.jpg"
},
{
"url": "//img10.360buyimg.com/n1/jfs/t1/95313/33/24597/510457/62b04f85Eadd50461/bd6251d883870b4d.jpg"
}
],
"item_weight": "0.36kg",
"item_volume": "",
"item_size": "",
"location": null,
"post_fee": "",
"express_fee": "",
"ems_fee": "",
"shipping_to": "",
"has_discount": "",
"video": null,
"is_virtual": "",
"sample_id": "",
"is_promotion": "",
"props_name": "1:0:产品:【第2瓶0元】New product upgrade oil control facial cleanser;1:1:产品:【7day to improve acne】New Anti-Acne Cleanser;1:2:产品:【第2瓶0元】Amino Acid Oil Control Cleanser;1:3:产品:【Oily skin conditioning】Oil control and anti-acneCP;1:4:产品:【控油洁面CP】6小时控油;1:5:产品:【控油2件套】洁面+Any condensation water;1:6:产品:【进阶3件套】洁面+Any condensation water+精华;1:7:产品:【Conditioning oily skin】控油祛痘2件套;1:8:产品:【oily acne skin set】acne solution;1:9:产品:【经典套装】Gentle Skin Care Cleanser3件套;",
"prop_imgs": {
"prop_img": [
{
"properties": "1:0",
"url": "//img10.360buyimg.com/n1/jfs/t1/91984/8/29108/109082/62e77b59Ef72e3fa6/cbecaaea3ea87227.jpg"
},
{
"properties": "1:1",
"url": "//img10.360buyimg.com/n1/jfs/t1/141174/23/28234/480799/62e77b7aE5dae7166/52a026921594078f.jpg"
},
{
"properties": "1:2",
"url": "//img10.360buyimg.com/n1/jfs/t1/197692/34/25869/526278/62e77c01E816cf918/f92194c065e184d0.jpg"
},
{
"properties": "1:3",
"url": "//img10.360buyimg.com/n1/jfs/t1/56226/7/19193/423083/62e77c3cE62da3537/7dd2684ae281ab4e.jpg"
},
{
"properties": "1:4",
"url": "//img10.360buyimg.com/n1/jfs/t1/115189/34/27528/480994/62e77ba2E4212c39a/8db20da566b25eea.jpg"
},
{
"properties": "1:5",
"url": "//img10.360buyimg.com/n1/jfs/t1/10197/15/18617/323677/62d90f69E9ee969bf/f47bb9026aee405a.jpg"
},
{
"properties": "1:6",
"url": "//img10.360buyimg.com/n1/jfs/t1/222903/19/17897/127397/62d94fafEe469ead3/d796cfa15950c250.jpg"
},
{
"properties": "1:7",
"url": "//img10.360buyimg.com/n1/jfs/t1/188467/21/26658/374588/62d93383E4430deb6/57cd3ab682c18859.jpg"
},
{
"properties": "1:8",
"url": "//img10.360buyimg.com/n1/jfs/t1/106533/18/31517/96431/62d90d91E8e2a215d/134471a15b64acf3.jpg"
},
{
"properties": "1:9",
"url": "//img10.360buyimg.com/n1/jfs/t1/167689/31/25429/424204/62d90ceaEd66fe49e/98dcb93c2fde4f0a.jpg"
}
]
},
"property_alias": "1:0:产品:【第2瓶0元】New product upgrade oil control facial cleanser;1:1:产品:【7day to improve acne】New Anti-Acne Cleanser;1:2:产品:【第2瓶0元】Amino Acid Oil Control Cleanser;1:3:产品:【Oily skin conditioning】Oil control and anti-acneCP;1:4:产品:【控油洁面CP】6小时控油;1:5:产品:【控油2件套】洁面+Any condensation water;1:6:产品:【进阶3件套】洁面+Any condensation water+精华;1:7:产品:【Conditioning oily skin】控油祛痘2件套;1:8:产品:【oily acne skin set】acne solution;1:9:产品:【经典套装】Gentle Skin Care Cleanser3件套;1:9:【经典套装】Gentle Skin Care Cleanser3件套;",
"props": [
{
"name": "功效",
"value": "深层清洁"
},
{
"name": "形态",
"value": "乳状"
},
{
"name": "类别",
"value": "洁面乳"
},
{
"name": "适合肤质",
"value": "任何肤质"
}
],
"total_sold": "",
"skus": {
"sku": [
{
"price": "109.90",
"orginal_price": "189.90",
"properties": "1:0",
"properties_name": "1:0:产品:【第2瓶0元】New product upgrade oil control facial cleanser",
"quantity": "99",
"sku_id": 100039621876,
"sku_url": "http://item.jd.com/100039621876.html"
},
{
"price": "119.90",
"orginal_price": "199.90",
"properties": "1:1",
"properties_name": "1:1:产品:【7day to improve acne】New Anti-Acne Cleanser",
"quantity": "99",
"sku_id": 100027378909,
"sku_url": "http://item.jd.com/100027378909.html"
},
{
"price": "99.90",
"orginal_price": "299.00",
"properties": "1:2",
"properties_name": "1:2:产品:【第2瓶0元】Amino Acid Oil Control Cleanser",
"quantity": "99",
"sku_id": 100017929389,
"sku_url": "http://item.jd.com/100017929389.html"
},
{
"price": "119.90",
"orginal_price": "209.90",
"properties": "1:3",
"properties_name": "1:3:产品:【Oily skin conditioning】Oil control and anti-acneCP",
"quantity": "99",
"sku_id": 100029147447,
"sku_url": "http://item.jd.com/100029147447.html"
},
{
"price": "109.90",
"orginal_price": "209.90",
"properties": "1:4",
"properties_name": "1:4:产品:【控油洁面CP】6小时控油",
"quantity": "99",
"sku_id": 100026999345,
"sku_url": "http://item.jd.com/100026999345.html"
},
{
"price": "169.90",
"orginal_price": "264.90",
"properties": "1:5",
"properties_name": "1:5:产品:【控油2件套】洁面+Any condensation water",
"quantity": "99",
"sku_id": 100039496908,
"sku_url": "http://item.jd.com/100039496908.html"
},
{
"price": "229.90",
"orginal_price": "399.90",
"properties": "1:6",
"properties_name": "1:6:产品:【进阶3件套】洁面+Any condensation water+精华",
"quantity": "99",
"sku_id": 100022908235,
"sku_url": "http://item.jd.com/100022908235.html"
},
{
"price": "169.90",
"orginal_price": "249.90",
"properties": "1:7",
"properties_name": "1:7:产品:【Conditioning oily skin】控油祛痘2件套",
"quantity": "99",
"sku_id": 100026999289,
"sku_url": "http://item.jd.com/100026999289.html"
},
{
"price": "259.90",
"orginal_price": "439.90",
"properties": "1:8",
"properties_name": "1:8:产品:【oily acne skin set】acne solution",
"quantity": "99",
"sku_id": 100026999293,
"sku_url": "http://item.jd.com/100026999293.html"
},
{
"price": "179.90",
"orginal_price": "399.00",
"properties": "1:9",
"properties_name": "1:9:产品:【经典套装】Gentle Skin Care Cleanser3件套",
"quantity": "99",
"sku_id": 100016265823,
"sku_url": "http://item.jd.com/100016265823.html"
}
]
},
"seller_id": "",
"sales": "",
"shop_id": null,
"props_list": {
"1:0": "产品:【第2瓶0元】New product upgrade oil control facial cleanser",
"1:1": "产品:【7day to improve acne】New Anti-Acne Cleanser",
"1:2": "产品:【第2瓶0元】Amino Acid Oil Control Cleanser",
"1:3": "产品:【Oily skin conditioning】Oil control and anti-acneCP",
"1:4": "产品:【控油洁面CP】6小时控油",
"1:5": "产品:【控油2件套】洁面+Any condensation water",
"1:6": "产品:【进阶3件套】洁面+Any condensation water+精华",
"1:7": "产品:【Conditioning oily skin】控油祛痘2件套",
"1:8": "产品:【oily acne skin set】acne solution",
"1:9": "产品:【经典套装】Gentle Skin Care Cleanser3件套"
},
"seller_info": {
"level": "",
"shop_type": "",
"user_num_id": null,
"cid": "",
"delivery_score": "",
"item_score": "",
"score_p": "",
"zhuy": null,
"search_id": "",
"nick": null,
"shop_name": null,
"title": null
},
"tmall": false,
"error": "",
"warning": "",
"url_log": [],
"coupon_activity": "",
"stuff_status": "",
"shopinfo": [],
"shopid": null,
"method": "",
"promo_type": "",
"props_img": {
"1:0": "//img10.360buyimg.com/n1/jfs/t1/91984/8/29108/109082/62e77b59Ef72e3fa6/cbecaaea3ea87227.jpg",
"1:1": "//img10.360buyimg.com/n1/jfs/t1/141174/23/28234/480799/62e77b7aE5dae7166/52a026921594078f.jpg",
"1:2": "//img10.360buyimg.com/n1/jfs/t1/197692/34/25869/526278/62e77c01E816cf918/f92194c065e184d0.jpg",
"1:3": "//img10.360buyimg.com/n1/jfs/t1/56226/7/19193/423083/62e77c3cE62da3537/7dd2684ae281ab4e.jpg",
"1:4": "//img10.360buyimg.com/n1/jfs/t1/115189/34/27528/480994/62e77ba2E4212c39a/8db20da566b25eea.jpg",
"1:5": "//img10.360buyimg.com/n1/jfs/t1/10197/15/18617/323677/62d90f69E9ee969bf/f47bb9026aee405a.jpg",
"1:6": "//img10.360buyimg.com/n1/jfs/t1/222903/19/17897/127397/62d94fafEe469ead3/d796cfa15950c250.jpg",
"1:7": "//img10.360buyimg.com/n1/jfs/t1/188467/21/26658/374588/62d93383E4430deb6/57cd3ab682c18859.jpg",
"1:8": "//img10.360buyimg.com/n1/jfs/t1/106533/18/31517/96431/62d90d91E8e2a215d/134471a15b64acf3.jpg",
"1:9": "//img10.360buyimg.com/n1/jfs/t1/167689/31/25429/424204/62d90ceaEd66fe49e/98dcb93c2fde4f0a.jpg"
},
"data_from": "jdapp",
"shop_item": [],
"relate_items": []
},
"secache": "04ac545ec239ae092920fd8c4142e76b",
"secache_time": 1659401099,
"secache_date": "2022-08-02 08:44:59",
"translate_status": "",
"translate_time": 0,
"language": {
"default_lang": "cn",
"current_lang": "cn"
},
"error": "",
"reason": "",
"error_code": "0000",
"cache": 0,
"api_info": "today:99 max:10100 all[165=99+42+24];expires:2030-12-31",
"execution_time": "3.787",
"server_time": "Beijing/2022-08-02 08:44:59",
"client_ip": "106.6.35.126",
"call_args": [
"100039621876"
],
"api_type": "jd",
"translate_language": "zh-CN",
"translate_engine": "baidu_api",
"server_memory": "3.52MB",
"request_id": "gw-3.62e8738816fce",
"last_id": "1122143077"
}
边栏推荐
- Multiscale communication in cortical-cortical networks
- Get Pinduoduo product information operation details
- 图文带你理解什么是Few-shot Learning
- 技术分享 | 实战演练接口自动化如何处理 Form 请求?
- Coordinate system in navigation and positioning
- 拼多多API接口(附上我的可用API)
- Amazon Get AMAZON Product Details API Return Value Description
- 《猪猪1984》NFT 作品集将上线 The Sandbox 市场平台
- 每日sql-找到每个学校gpa最低的同学(开窗)
- 皮质-皮质网络的多尺度交流
猜你喜欢
每日sql:求好友申请通过率
【预约观看】Ambire 智能钱包 AMA 活动第四期即将举行
MySQL01
抖音API接口
第一个C函数:如何实现板级初始化?
Pinduoduo API interface (attach my available API)
Douyin API interface
已解决EROR 1064 (42000): You have an error in. your SOL syntax. check the manual that corresponds to yo
Amazon API interface Daquan
HCIP BGP neighbor building, federation, and aggregation experiments
随机推荐
亚马逊API接口大全
MySQL 版本升级心得
什么是Inductive learning和Transductive learning
daily sql - user retention rate for two days
Taobao sku API interface (PHP example)
Unity游戏排行榜的制作与优化
已解决EROR 1064 (42000): You have an error in. your SOL syntax. check the manual that corresponds to yo
Douyin API interface
My approval of OA project (inquiry & meeting signature)
抖音关键词搜索商品-API工具
HCIP OSPF/MGRE Comprehensive Experiment
HCIP MGRE\OSPF Comprehensive Experiment
Redis测试
PIXHAWK飞控使用RTK
实现通用的、高性能排序和快排优化
Redis + lua implements distributed interface current limiting implementation scheme
Pinduoduo api interface application example
Daily sql-statistics of the number of professionals (including the number of professionals is 0)
每日sql -用户两天留存率
【深度学习】什么是互信息最大化?