api應該怎麼用?(簡單方便的API介面方法)

Noah_WB發表於2023-03-09

api應該怎麼用?

1.API簡單來說就是介面。windows API是windows作業系統開發的介面,用於控制系統中的各種應用程式。

2.在哪裡可以找到API?VB6.0自帶WindowsAPI的搜尋工具,可以根據搜尋到的介面自動生成宣告語句。在Windows開始選單欄找到api瀏覽器,開啟api瀏覽器——然後匯入win 32 API . txt——搜尋我們需要的API函式,使用私有模式,複製文字。

簡單方便的API介面方法

1、API呼叫的第一步:購買API介面

關於API的購買這裡就不過多陳述,網上一搜一大把

2、 (類似賬號密碼)

3.介面演示

公共引數

名稱

型別

必須

描述

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=1600748787020

引數說明:num_iid:商品ID

響應引數

Version: Date:

名稱

型別

必須

示例值

描述

num_iid

Bigint

0


商品ID

title

String

0


商品標題

desc_short

String

0


商品簡介

price

String

0


價格

nick

String

0


掌櫃暱稱

num

String

0



min_num

String

0



detail_url

String

0


商品連結

pic_url

String

0


商品圖片

desc

String

0



item_imgs

Mix

0


商品圖片列表

props_name

String

0


商品屬性名

prop_imgs

Mix

0


商品屬性圖片列表

props

Mix

0


屬性

skus

Mix

0


商品規格資訊列表

priceRange

Mix

0


價格區間

props_list

Mix

0


商品屬性列表

seller_info

Mix

0


賣家資訊

error

String

0


錯誤資訊

props_img

Mix

0



currency_code

String

0



language_code

String

0



property_alias

String

0


商品屬性別名

sales

String

0


銷量

desc_img

Mix

0


詳情圖片

shop_item

Mix

0



relate_items

Mix

0



請求示例

    -- 請求示例 url 預設請求引數已經URL編碼處理
    curl -i "您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=60840463360"

    響應示例

    {
    	"item": {
    		"num_iid": "1600748787020",
    		"title": "High-grade Children&#39;s Shoes Women&#39;s Shoes Men&#39;s Shoes Metal Alloy Fashion Shoe Buckle Can Be Customized",
    		"desc_short": "",
    		"price": "$0.41",
    		"nick": "wzyizhi",
    		"num": 9999,
    		"min_num": 100,
    		"detail_url": "
    		"pic_url": "
    		"desc": "<DIV data-magic-global=\"%7B%22bizId%22%3A2214721511061%2C%22pageId%22%3A21200086691%2C%22siteId%22%3A10100746167%7D\" id=\"detail_decorate_root\"><STYLE>#detail_decorate_root .magic-0{width:750px}#detail_decorate_root .magic-1{overflow:hidden;width:750px;height:86px;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0}#detail_decorate_root .magic-2{margin-top:0;margin-left:0;width:750px;height:86px}#detail_decorate_root .magic-3{margin-bottom:10px;line-height:0}#detail_decorate_root .magic-4{width:750px;height:750px;overflow:hidden;margin-bottom:0}#detail_decorate_root .magic-5{position:relative;left:0;top:0;width:750px;height:750px}#detail_decorate_root .magic-6{overflow:hidden;width:750px;height:81px;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0}#detail_decorate_root .magic-7{margin-top:0;margin-left:0;width:750px;height:81px}#detail_decorate_root .magic-8{width:750px;border-collapse:collapse}#detail_decorate_root .magic-9{min-height:18px;padding:5px 10px;width:259px;min-height:18px;box-sizing:content-box}#detail_decorate_root .magic-10{min-height:18px;padding:5px 10px;width:442px;min-height:18px;box-sizing:content-box}#detail_decorate_root .magic-11{overflow:hidden;width:750px;height:1011px;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0}#detail_decorate_root .magic-12{margin-top:0;margin-left:0;width:750px;height:1011px}#detail_decorate_root .magic-13{overflow:hidden;width:750px;height:382px;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0}#detail_decorate_root .magic-14{margin-top:0;margin-left:0;width:750px;height:382px}#detail_decorate_root .magic-15{overflow:hidden;width:750px;height:699px;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0}#detail_decorate_root .magic-16{margin-top:0;margin-left:0;width:750px;height:699px}#detail_decorate_root .magic-17{border-bottom-style:solid;border-bottom-color:#53647a;font-family:Roboto;font-size:24px;color:#53647a;font-style:normal;border-bottom-width:2px;padding-top:8px;padding-bottom:4px}#detail_decorate_root .magic-18{vertical-align:top}#detail_decorate_root .magic-19{vertical-align:top;display:block;padding-right:4px;box-sizing:border-box;padding-left:4px}#detail_decorate_root .magic-20{vertical-align:top;padding-bottom:4px;box-sizing:border-box;padding-top:4px}#detail_decorate_root .magic-21{padding:0;margin:0;white-space:pre-wrap;font-size:14px}#detail_decorate_root .magic-22{overflow:hidden;width:750px;height:331px;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0}#detail_decorate_root .magic-23{margin-top:0;margin-left:0;width:750px;height:331px}#detail_decorate_root .magic-24{overflow:hidden;width:750px;height:162px;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0}#detail_decorate_root .magic-25{margin-top:0;margin-left:0;width:750px;height:162px}</STYLE>\r\n      <DIV module-id=\"32554383575\" module-title=\"detailSingleImage\" render=\"true\" class=\"J_module\"><DIV class=\"icbu-pc-images magic-0\"><DIV><DIV class=\"flex-layout-v\"><DIV class=\"flex-layout-h magic-0\"><DIV class=\"magic-1\"><IMG src=\"//u.alicdn.com/js/5v/esite/img/img-placeholder.png\" data-src=\"//sc04.alicdn.com/kf/H41b9a4e3e2884b5a88c6742ed365e0eaJ/267828546/H41b9a4e3e2884b5a88c6742ed365e0eaJ.jpg\" class=\"magic-2\"/><NOSCRIPT><IMG src=\"//sc04.alicdn.com/kf/H41b9a4e3e2884b5a88c6742ed365e0eaJ/267828546/H41b9a4e3e2884b5a88c6742ed365e0eaJ.jpg\" class=\"magic-2\"/></NOSCRIPT></DIV></DIV></DIV></DIV></DIV></DIV>\r\n      \r\n      <DIV module-id=\"32512965813\" module-title=\"detailManyImage\" render=\"true\" class=\"J_module\"><DIV class=\"icbu-pc-detailManyImage magic-3\"><DIV class=\"magic-4\"><IMG src=\"//u.alicdn.com/js/5v/esite/img/img-placeholder.png\" data-src=\"\" class=\"magic-5\"/><NOSCRIPT><IMG src=\"\" class=\"magic-5\"/></NOSCRIPT></DIV></DIV></DIV>\r\n      \r\n      <DIV module-id=\"32554383577\" module-title=\"detailSingleImage\" render=\"true\" class=\"J_module\"><DIV class=\"icbu-pc-images magic-0\"><DIV><DIV class=\"flex-layout-v\"><DIV class=\"flex-layout-h magic-0\"><DIV class=\"magic-6\"><IMG src=\"//u.alicdn.com/js/5v/esite/img/img-placeholder.png\" data-src=\"//sc04.alicdn.com/kf/H9f18ec74657d44dda267105a7af59fcej/267828546/H9f18ec74657d44dda267105a7af59fcej.jpg\" class=\"magic-7\"/><NOSCRIPT><IMG src=\"//sc04.alicdn.com/kf/H9f18ec74657d44dda267105a7af59fcej/267828546/H9f18ec74657d44dda267105a7af59fcej.jpg\" class=\"magic-7\"/></NOSCRIPT></DIV></DIV></DIV></DIV></DIV></DIV>\r\n      \r\n      <DIV module-id=\"32512965815\" module-title=\"detailTableHorizontal\" render=\"true\" class=\"J_module\"><DIV class=\"ife-detail-decorate-table\"><TABLE class=\"has-title all magic-8\"><TBODY><TR><TD colspan=\"1\" rowspan=\"1\"><DIV class=\"magic-9\">item</DIV></TD><TD colspan=\"1\" rowspan=\"1\"><DIV class=\"magic-10\">value</DIV></TD></TR><TR><TD colspan=\"1\" rowspan=\"1\"><DIV class=\"magic-9\">Place of Origin</DIV></TD><TD colspan=\"1\" rowspan=\"1\"><DIV class=\"magic-10\">China</DIV></TD></TR><TR><TD colspan=\"1\" rowspan=\"1\"><DIV class=\"magic-9\">Model Number</DIV></TD><TD colspan=\"1\" rowspan=\"1\"><DIV class=\"magic-10\">4002</DIV></TD></TR><TR><TD colspan=\"1\" rowspan=\"1\"><DIV class=\"magic-9\"></DIV></TD><TD colspan=\"1\" rowspan=\"1\"><DIV class=\"magic-10\"></DIV></TD></TR></TBODY></TABLE></DIV></DIV>\r\n      \r\n      <DIV module-id=\"32554383579\" module-title=\"detailSingleImage\" render=\"true\" class=\"J_module\"><DIV class=\"icbu-pc-images magic-0\"><DIV><DIV class=\"flex-layout-v\"><DIV class=\"flex-layout-h magic-0\"><DIV class=\"magic-11\"><IMG src=\"//u.alicdn.com/js/5v/esite/img/img-placeholder.png\" data-src=\"//sc04.alicdn.com/kf/H833ba995f3db4656bcaace80fcb04e208/267828546/H833ba995f3db4656bcaace80fcb04e208.jpg\" class=\"magic-12\"/><NOSCRIPT><IMG src=\"//sc04.alicdn.com/kf/H833ba995f3db4656bcaace80fcb04e208/267828546/H833ba995f3db4656bcaace80fcb04e208.jpg\" class=\"magic-12\"/></NOSCRIPT></DIV></DIV></DIV></DIV></DIV></DIV>\r\n      \r\n      <DIV module-id=\"32554383580\" module-title=\"detailSingleImage\" render=\"true\" class=\"J_module\"><DIV class=\"icbu-pc-images magic-0\"><DIV><DIV class=\"flex-layout-v\"><DIV class=\"flex-layout-h magic-0\"><DIV class=\"magic-13\"><IMG src=\"//u.alicdn.com/js/5v/esite/img/img-placeholder.png\" data-src=\"//sc04.alicdn.com/kf/Ha550422733504c8f85ab0ca2fb8385b9X/267828546/Ha550422733504c8f85ab0ca2fb8385b9X.jpg\" class=\"magic-14\"/><NOSCRIPT><IMG src=\"//sc04.alicdn.com/kf/Ha550422733504c8f85ab0ca2fb8385b9X/267828546/Ha550422733504c8f85ab0ca2fb8385b9X.jpg\" class=\"magic-14\"/></NOSCRIPT></DIV></DIV></DIV></DIV></DIV></DIV>\r\n      \r\n      <DIV module-id=\"32554383581\" module-title=\"detailSingleImage\" render=\"true\" class=\"J_module\"><DIV class=\"icbu-pc-images magic-0\"><DIV><DIV class=\"flex-layout-v\"><DIV class=\"flex-layout-h magic-0\"><DIV class=\"magic-15\"><IMG src=\"//u.alicdn.com/js/5v/esite/img/img-placeholder.png\" data-src=\"//sc04.alicdn.com/kf/Ha385ba7057034de4b2183b9152911750F/267828546/Ha385ba7057034de4b2183b9152911750F.jpg\" class=\"magic-16\"/><NOSCRIPT><IMG src=\"//sc04.alicdn.com/kf/Ha385ba7057034de4b2183b9152911750F/267828546/Ha385ba7057034de4b2183b9152911750F.jpg\" class=\"magic-16\"/></NOSCRIPT></DIV></DIV></DIV></DIV></DIV></DIV>\r\n      \r\n      <DIV module-id=\"32554383582\" module-title=\"detailProductNavigation\" render=\"true\" class=\"J_module\"><DIV id=\"ali-anchor-AliMagic-rcdofc\" data-section=\"AliMagic-rcdofc\" data-section-title=\"FAQ\" class=\"magic-17\">FAQ</DIV></DIV>\r\n      \r\n      <DIV module-id=\"32554383583\" module-title=\"detailTextContent\" render=\"true\" class=\"J_module\"><DIV class=\"detail-decorate-json-renderer-container\"><DIV class=\"magic-18\"><DIV class=\"magic-19\"><DIV class=\"magic-20\"><DIV class=\"magic-21\"><SPAN>1.Are you factory or trading company?<BR/><SPAN>We are specialized in manufacturing shoes, clothing, luggage accessories factory!</SPAN></SPAN><DIV><SPAN><BR/>2. Could you offer free sample?<BR/>Yes. We can supply your free sample and let you check the quality.<BR/><BR/>3.Do you accept small order?<BR/>Sure, you can buy any quantity from our stocks, even 1 piece order is also available.<BR/><BR/>4.Why your price on website not the same as real price?<BR/>The price on the website is only a rang cost for whole series. The real price is floating, so prices are subject to our final<BR/>confirmation.<BR/><BR/>5.May I have any discount?<BR/>Yes. We will give you good discount according to your order&#39;s quantity.<BR/><BR/>6.Can I have my own design?<BR/>Sure you can, our designer will according to your picture or ideas to draw/design picture. We will arrange production when you<BR/>confirm.</SPAN></DIV></DIV></DIV></DIV></DIV></DIV></DIV>\r\n      \r\n      <DIV module-id=\"32554383584\" module-title=\"detailSingleImage\" render=\"true\" class=\"J_module\"><DIV class=\"icbu-pc-images magic-0\"><DIV><DIV class=\"flex-layout-v\"><DIV class=\"flex-layout-h magic-0\"><DIV class=\"magic-22\"><IMG src=\"//u.alicdn.com/js/5v/esite/img/img-placeholder.png\" data-src=\"//sc04.alicdn.com/kf/H91c5dc0d78654730a8caf11e6ec5ec72S/267828546/H91c5dc0d78654730a8caf11e6ec5ec72S.jpg\" class=\"magic-23\"/><NOSCRIPT><IMG src=\"//sc04.alicdn.com/kf/H91c5dc0d78654730a8caf11e6ec5ec72S/267828546/H91c5dc0d78654730a8caf11e6ec5ec72S.jpg\" class=\"magic-23\"/></NOSCRIPT></DIV></DIV></DIV></DIV></DIV></DIV>\r\n      \r\n      <DIV module-id=\"32554383585\" module-title=\"detailSingleImage\" render=\"true\" class=\"J_module\"><DIV class=\"icbu-pc-images magic-0\"><DIV><DIV class=\"flex-layout-v\"><DIV class=\"flex-layout-h magic-0\"><DIV class=\"magic-24\"><IMG src=\"//u.alicdn.com/js/5v/esite/img/img-placeholder.png\" data-src=\"//sc04.alicdn.com/kf/Hc04b4b6388334b2a8c22ca80ce1f3bc4r/267828546/Hc04b4b6388334b2a8c22ca80ce1f3bc4r.jpg\" class=\"magic-25\"/><NOSCRIPT><IMG src=\"//sc04.alicdn.com/kf/Hc04b4b6388334b2a8c22ca80ce1f3bc4r/267828546/Hc04b4b6388334b2a8c22ca80ce1f3bc4r.jpg\" class=\"magic-25\"/></NOSCRIPT></DIV></DIV></DIV></DIV></DIV></DIV>\r\n      </DIV><img src=\"\" style=\"display:none\" />",
    		"item_imgs": [
    			{
    				"url": "
    			},
    			{
    				"url": "
    			},
    			{
    				"url": "
    			},
    			{
    				"url": "
    			},
    			{
    				"url": "
    			},
    			{
    				"url": "
    			}
    		],
    		"video_url": "",
    		"props_name": "210190015:3331116:Color:Gold;210190015:3354417:Color:Yellow;210190015:3331185:Color:White",
    		"prop_imgs": {
    			"prop_img": []
    		},
    		"props": [
    			{
    				"name": "Place of Origin",
    				"value": "China"
    			},
    			{
    				"name": "Model Number",
    				"value": "4002"
    			}
    		],
    		"skus": {
    			"sku": [
    				{
    					"price": 0.41,
    					"properties": "210190015:3331116",
    					"properties_name": "210190015:3331116:Color:Gold",
    					"quantity": "999",
    					"sku_id": 103909075423
    				},
    				{
    					"price": 0.41,
    					"properties": "210190015:3354417",
    					"properties_name": "210190015:3354417:Color:Yellow",
    					"quantity": "999",
    					"sku_id": 103909075425
    				},
    				{
    					"price": 0.41,
    					"properties": "210190015:3331185",
    					"properties_name": "210190015:3331185:Color:White",
    					"quantity": "999",
    					"sku_id": 103909075424
    				}
    			]
    		},
    		"priceRange": [
    			[
    				100,
    				0.41
    			],
    			[
    				500,
    				0.35
    			],
    			[
    				5000,
    				0.27
    			]
    		],
    		"props_list": {
    			"210190015:3331116": "Color:Gold",
    			"210190015:3354417": "Color:Yellow",
    			"210190015:3331185": "Color:White"
    		},
    		"seller_info": {
    			"zhuy": "",
    			"title": "",
    			"nick": "wzyizhi",
    			"shop_name": ""
    		},
    		"error": "",
    		"props_img": [],
    		"currency_code": "USD",
    		"language_code": "en",
    		"format_check": "ok",
    		"property_alias": "210190015:3331116:Gold;210190015:3354417:Yellow;210190015:3331185:White",
    		"sales": 0,
    		"desc_img": [
    			"//u.alicdn.com/js/5v/esite/img/img-placeholder.png",
    			"//sc04.alicdn.com/kf/H41b9a4e3e2884b5a88c6742ed365e0eaJ/267828546/H41b9a4e3e2884b5a88c6742ed365e0eaJ.jpg",
    			"//u.alicdn.com/js/5v/esite/img/img-placeholder.png",
    			"",
    			"//u.alicdn.com/js/5v/esite/img/img-placeholder.png",
    			"//sc04.alicdn.com/kf/H9f18ec74657d44dda267105a7af59fcej/267828546/H9f18ec74657d44dda267105a7af59fcej.jpg",
    			"//u.alicdn.com/js/5v/esite/img/img-placeholder.png",
    			"//sc04.alicdn.com/kf/H833ba995f3db4656bcaace80fcb04e208/267828546/H833ba995f3db4656bcaace80fcb04e208.jpg",
    			"//u.alicdn.com/js/5v/esite/img/img-placeholder.png",
    			"//sc04.alicdn.com/kf/Ha550422733504c8f85ab0ca2fb8385b9X/267828546/Ha550422733504c8f85ab0ca2fb8385b9X.jpg",
    			"//u.alicdn.com/js/5v/esite/img/img-placeholder.png",
    			"//sc04.alicdn.com/kf/Ha385ba7057034de4b2183b9152911750F/267828546/Ha385ba7057034de4b2183b9152911750F.jpg",
    			"//u.alicdn.com/js/5v/esite/img/img-placeholder.png",
    			"//sc04.alicdn.com/kf/H91c5dc0d78654730a8caf11e6ec5ec72S/267828546/H91c5dc0d78654730a8caf11e6ec5ec72S.jpg",
    			"//u.alicdn.com/js/5v/esite/img/img-placeholder.png",
    			"//sc04.alicdn.com/kf/Hc04b4b6388334b2a8c22ca80ce1f3bc4r/267828546/Hc04b4b6388334b2a8c22ca80ce1f3bc4r.jpg"
    		],
    		"shop_item": [],
    		"relate_items": []
    	},
    	"error": "",
    	"secache": "5dcb6cb550858e3aab22165b8efb6870",
    	"secache_time": 1678340972,
    	"secache_date": "2023-03-09 13:49:32",
    	"translate_status": "ok",
    	"translate_time": 3.026,
    	"language": {
    		"current_lang": "cn",
    		"source_lang": "en"
    	},


    來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/70026910/viewspace-2938835/,如需轉載,請註明出處,否則將追究法律責任。

    相關文章