ITPub博客

首页 > 数据库 > 国内数据库 > api应该怎么用?(简单方便的API接口方法)

api应该怎么用?(简单方便的API接口方法)

原创 国内数据库 作者:Noah_WB 时间:2023-03-09 13:53:05 0 删除 编辑

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博客 ” ,链接:https://blog.itpub.net/70026910/viewspace-2938835/ ,如需转载,请注明出处,否则将追究法律责任。

    下一篇: api接口详解大全
    请登录后发表评论 登录
    全部评论
    专注各大电商平台API接口,代购系统工程开发维护,对接ChatGPT和智能AI,+v18870292986

    注册时间:2023-02-20

    • 博文量
      535
    • 访问量
      406351