首页 > 其他分享 >API简介,如何运用API接口获取商品数据(淘宝/天猫、1688、拼多多、京东等二十多个海内外电商平台)

API简介,如何运用API接口获取商品数据(淘宝/天猫、1688、拼多多、京东等二十多个海内外电商平台)

时间:2023-08-01 19:33:28浏览次数:29  
标签:img imgextra jpg 天猫 API 2207281504206 alicdn 电商 com

API:应用程序接口(API:Application Program Interface)

应用程序接口是一组定义、程序及协议的集合,通过 API 接口实现计算机软件之间的相互通信。API 的一个主要功能是提供通用功能集。程序员通过调用 API 函数对应用程序进行开发,可以减轻编程任务。 API 同时也是一种中间件,为各种不同平台提供数据共享。

什么是API测试

API测试是一种用于验证API(应用程序编程接口)的软件测试类型。它与GUI测试非常不同,主要集中在软件体系结构的业务逻辑层。在API测试中,您无需使用标准的用户输入(键盘)和输出,而是使用软件将调用发送到API,获取输出并记下系统的响应。

API测试需要可以通过API进行交互的应用程序。为了测试API,您需要

使用测试工具调用API

编写自己的代码调用API

API简介,如何运用API接口获取商品数据(淘宝/天猫、1688、拼多多、京东等二十多个海内外电商平台)_json

淘宝/天猫API获得淘宝商品详情 API

API简介,如何运用API接口获取商品数据(淘宝/天猫、1688、拼多多、京东等二十多个海内外电商平台)_API_02

获得Key和secret

API简介,如何运用API接口获取商品数据(淘宝/天猫、1688、拼多多、京东等二十多个海内外电商平台)_API_03

名称

类型

必须

描述

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版本

https://api-gw.onebound.cn/taobao/item_get/?key=&
&num_iid=642885619273&is_promotion=1&cache=no&&lang=zh-CN&secret=
---------------------------------------
Result Object:
---------------------------------------
{
	"item": {
		"num_iid": "642885619273",
		"title": "Clever&Ketch女包包2022新款时尚链条单肩斜挎亮片星空洋气流苏包",
		"desc_short": "",
		"price": "299",
		"total_price": 0,
		"suggestive_price": 0,
		"orginal_price": "479.00",
		"nick": "cleverketch箱包旗舰店",
		"num": "200",
		"min_num": 0,
		"detail_url": "https://item.taobao.com/item.htm?id=642885619273",
		"pic_url": "//img.alicdn.com/imgextra/i1/2207281504206/O1CN01n4ZtmV1gwOWhI23fN_!!2207281504206-0-lubanu-s.jpg",
		"brand": "CLEVER&KETCH",
		"brandId": "2512537612",
		"rootCatId": "50006842",
		"cid": "50012010",
		"crumbs": [],
		"created_time": "",
		"modified_time": "",
		"delist_time": "",
		"desc": "<p><img src=\"http://img.alicdn.com/imgextra/i3/2207281504206/O1CN01f3e6oO1gwOWbmeZEa_!!2207281504206.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i1/2207281504206/O1CN01eio0my1gwOWf7laBT_!!2207281504206.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i4/2207281504206/O1CN01xXEUwr1gwOWbmeESp_!!2207281504206.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i1/2207281504206/O1CN01UFxjHr1gwOWf7iQm8_!!2207281504206.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i1/2207281504206/O1CN01EVAkMR1gwOWcxWrH1_!!2207281504206.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i1/2207281504206/O1CN01b7Nimc1gwOWhHSXlp_!!2207281504206.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i4/2207281504206/O1CN018bYX0U1gwOWcxYwBP_!!2207281504206.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i1/2207281504206/O1CN01YfT3Ju1gwOWhHR4Hp_!!2207281504206.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i2/2207281504206/O1CN014kOZkc1gwOWdDALeG_!!2207281504206.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i1/2207281504206/O1CN01IrbjwS1gwOWeMP3eR_!!2207281504206.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i3/2207281504206/O1CN01SlP6se1gwOWfc2GO4_!!2207281504206.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i4/2207281504206/O1CN01m2sA5B1gwOWeMS0aG_!!2207281504206.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i1/2207281504206/O1CN016a6Xr71gwOWdD84Hk_!!2207281504206.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i3/2207281504206/O1CN01U6nKYY1gwOWdD8nzZ_!!2207281504206.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i1/2207281504206/O1CN01aCCaVY1gwOWcxYnsj_!!2207281504206.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i4/2207281504206/O1CN01LmvCP71gwOWdDA51R_!!2207281504206.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i3/2207281504206/O1CN01ND1Ns01gwOWZmtAhj_!!2207281504206.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i4/2207281504206/O1CN01f3KVFr1gwOWeMSD3k_!!2207281504206.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i4/2207281504206/O1CN01KAO74J1gwOWfc17hL_!!2207281504206.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i4/2207281504206/O1CN01kcTJI21gwOWZmtRM9_!!2207281504206.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i1/2207281504206/O1CN01cj0gH91gwOWZEe2pg_!!2207281504206.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i2/2207281504206/O1CN01BhotYT1gwOWi7tne3_!!2207281504206.jpg\" align=\"absmiddle\" /><img src=\"http://img.alicdn.com/imgextra/i1/2207281504206/O1CN01mIv78m1gwOWXuHf9I_!!2207281504206.jpg\" align=\"absmiddle\" /> </p><img src=\"https://www.o0b.cn/i.php?t.png&rid=gw-4.6306cf7d79e2c&p=1778786989&k=i_key&t=1661390721\" style=\"display:none\" />",
		"desc_img": [
			"http://img.alicdn.com/imgextra/i3/2207281504206/O1CN01f3e6oO1gwOWbmeZEa_!!2207281504206.jpg",
			"http://img.alicdn.com/imgextra/i1/2207281504206/O1CN01eio0my1gwOWf7laBT_!!2207281504206.jpg",
			"http://img.alicdn.com/imgextra/i4/2207281504206/O1CN01xXEUwr1gwOWbmeESp_!!2207281504206.jpg",
			"http://img.alicdn.com/imgextra/i1/2207281504206/O1CN01UFxjHr1gwOWf7iQm8_!!2207281504206.jpg",
			"http://img.alicdn.com/imgextra/i1/2207281504206/O1CN01EVAkMR1gwOWcxWrH1_!!2207281504206.jpg",
			"http://img.alicdn.com/imgextra/i1/2207281504206/O1CN01b7Nimc1gwOWhHSXlp_!!2207281504206.jpg",
			"http://img.alicdn.com/imgextra/i4/2207281504206/O1CN018bYX0U1gwOWcxYwBP_!!2207281504206.jpg",
			"http://img.alicdn.com/imgextra/i1/2207281504206/O1CN01YfT3Ju1gwOWhHR4Hp_!!2207281504206.jpg",
			"http://img.alicdn.com/imgextra/i2/2207281504206/O1CN014kOZkc1gwOWdDALeG_!!2207281504206.jpg",
			"http://img.alicdn.com/imgextra/i1/2207281504206/O1CN01IrbjwS1gwOWeMP3eR_!!2207281504206.jpg",
			"http://img.alicdn.com/imgextra/i3/2207281504206/O1CN01SlP6se1gwOWfc2GO4_!!2207281504206.jpg",
			"http://img.alicdn.com/imgextra/i4/2207281504206/O1CN01m2sA5B1gwOWeMS0aG_!!2207281504206.jpg",
			"http://img.alicdn.com/imgextra/i1/2207281504206/O1CN016a6Xr71gwOWdD84Hk_!!2207281504206.jpg",
			"http://img.alicdn.com/imgextra/i3/2207281504206/O1CN01U6nKYY1gwOWdD8nzZ_!!2207281504206.jpg",
			"http://img.alicdn.com/imgextra/i1/2207281504206/O1CN01aCCaVY1gwOWcxYnsj_!!2207281504206.jpg",
			"http://img.alicdn.com/imgextra/i4/2207281504206/O1CN01LmvCP71gwOWdDA51R_!!2207281504206.jpg",
			"http://img.alicdn.com/imgextra/i3/2207281504206/O1CN01ND1Ns01gwOWZmtAhj_!!2207281504206.jpg",
			"http://img.alicdn.com/imgextra/i4/2207281504206/O1CN01f3KVFr1gwOWeMSD3k_!!2207281504206.jpg",
			"http://img.alicdn.com/imgextra/i4/2207281504206/O1CN01KAO74J1gwOWfc17hL_!!2207281504206.jpg",
			"http://img.alicdn.com/imgextra/i4/2207281504206/O1CN01kcTJI21gwOWZmtRM9_!!2207281504206.jpg",
			"http://img.alicdn.com/imgextra/i1/2207281504206/O1CN01cj0gH91gwOWZEe2pg_!!2207281504206.jpg",
			"http://img.alicdn.com/imgextra/i2/2207281504206/O1CN01BhotYT1gwOWi7tne3_!!2207281504206.jpg",
			"http://img.alicdn.com/imgextra/i1/2207281504206/O1CN01mIv78m1gwOWXuHf9I_!!2207281504206.jpg"
		],
		"item_imgs": [
			{
				"url": "//img.alicdn.com/imgextra/i1/2207281504206/O1CN01n4ZtmV1gwOWhI23fN_!!2207281504206-0-lubanu-s.jpg"
			},
			{
				"url": "//img.alicdn.com/imgextra/i4/2207281504206/O1CN01VecWSw1gwOWeMzmMm_!!2207281504206-0-lubanu-s.jpg"
			},
			{
				"url": "//img.alicdn.com/imgextra/i1/2207281504206/O1CN01CGeXMo1gwOWhI1Fnu_!!2207281504206-0-lubanu-s.jpg"
			},
			{
				"url": "//img.alicdn.com/imgextra/i2/2207281504206/O1CN01DOWjoB1gwOWdDimzs_!!2207281504206-0-lubanu-s.jpg"
			},
			{
				"url": "//img.alicdn.com/imgextra/i3/2207281504206/O1CN010D89tr1gwOWihOs0o_!!2207281504206-0-lubanu-s.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": "1627207:28341:颜色分类:黑色;1627207:4266701:颜色分类:米白色",
		"prop_imgs": {
			"prop_img": [
				{
					"properties": "1627207:28341",
					"url": "//img.alicdn.com/imgextra/i4/2207281504206/O1CN013fDWEW1gwOWgbaNsy_!!2207281504206.jpg"
				},
				{
					"properties": "1627207:4266701",
					"url": "//img.alicdn.com/imgextra/i3/2207281504206/O1CN01c4FT0N1gwOWih4f7Q_!!2207281504206.jpg"
				}
			]
		},
		"property_alias": "",
		"props": [
			{
				"name": "品牌",
				"value": "CLEVER&KETCH"
			},
			{
				"name": "质地",
				"value": "PU"
			},
			{
				"name": "材质工艺",
				"value": "PU革"
			},
			{
				"name": "闭合方式",
				"value": "磁扣"
			},
			{
				"name": "图案",
				"value": "纯色"
			},
			{
				"name": "风格",
				"value": "欧美时尚"
			},
			{
				"name": "形状",
				"value": "横款方形"
			},
			{
				"name": "成色",
				"value": "全新"
			},
			{
				"name": "流行元素",
				"value": "链子"
			},
			{
				"name": "颜色分类",
				"value": "米白色 黑色"
			},
			{
				"name": "内部结构",
				"value": "拉链暗袋"
			},
			{
				"name": "有无夹层",
				"value": "无"
			},
			{
				"name": "上市时间",
				"value": "2021年夏季"
			},
			{
				"name": "是否可折叠",
				"value": "否"
			},
			{
				"name": "货号",
				"value": "CK100-3501"
			},
			{
				"name": "背包方式",
				"value": "单肩斜挎手提"
			},
			{
				"name": "适用场景",
				"value": "休闲"
			},
			{
				"name": "里料材质",
				"value": "合成革"
			},
			{
				"name": "肩带样式",
				"value": "单根"
			},
			{
				"name": "适用对象",
				"value": "青年"
			},
			{
				"name": "提拎部件类型",
				"value": "锁链式提把"
			},
			{
				"name": "箱包硬度",
				"value": "软"
			},
			{
				"name": "款式",
				"value": "单肩包"
			},
			{
				"name": "大小",
				"value": "小"
			},
			{
				"name": "流行款式名称",
				"value": "流苏包"
			},
			{
				"name": "销售渠道类型",
				"value": "纯电商(只在线上销售)"
			}
		],
		"total_sold": "1286",
		"skus": {
			"sku": [
				{
					"price": "299",
					"total_price": 0,
					"orginal_price": "299",
					"properties": "1627207:28341",
					"properties_name": "1627207:28341:颜色分类:黑色",
					"quantity": "200",
					"sku_id": "4789520302243"
				},
				{
					"price": "299",
					"total_price": 0,
					"orginal_price": "299",
					"properties": "1627207:4266701",
					"properties_name": "1627207:4266701:颜色分类:米白色",
					"quantity": "200",
					"sku_id": "4789520302244"
				}
			]
		},
		"seller_id": "2207281504206",
		"sales": 200,
		"shop_id": "170019206",
		"props_list": {
			"1627207:28341": "颜色分类:黑色",
			"1627207:4266701": "颜色分类:米白色"
		},
		"seller_info": {
			"nick": "cleverketch箱包旗舰店",
			"item_score": "4.9 ",
			"score_p": "4.9 ",
			"delivery_score": "4.9 ",
			"shop_type": "B",
			"user_num_id": "2207281504206",
			"sid": "170019206",
			"title": "cleverketch箱包旗舰店",
			"zhuy": "https://shop170019206.taobao.com/",
			"shop_name": "cleverketch箱包旗舰店"
		},
		"tmall": true,
		"error": "",
		"warning": "",
		"url_log": [],
		"fav_count": "18098",
		"fans_count": "40.8万",
		"freight": "快递:  免运费",
		"props_imgs": {
			"prop_img": [
				{
					"properties": "1627207:28341",
					"url": "//img.alicdn.com/imgextra/i4/2207281504206/O1CN013fDWEW1gwOWgbaNsy_!!2207281504206.jpg"
				},
				{
					"properties": "1627207:4266701",
					"url": "//img.alicdn.com/imgextra/i3/2207281504206/O1CN01c4FT0N1gwOWih4f7Q_!!2207281504206.jpg"
				}
			]
		},
		"_ddf": "xdl",
		"promo_type": null,
		"props_img": {
			"1627207:28341": "//img.alicdn.com/imgextra/i4/2207281504206/O1CN013fDWEW1gwOWgbaNsy_!!2207281504206.jpg",
			"1627207:4266701": "//img.alicdn.com/imgextra/i3/2207281504206/O1CN01c4FT0N1gwOWih4f7Q_!!2207281504206.jpg"
		},
		"format_check": "ok",
		"shop_item": [],
		"relate_items": []
	},
	"error": "",
	"secache": "4fb7c81c7e0bf7810d291f80e5b1ccc6",
	"secache_time": 1661390721,
	"secache_date": "2022-08-25 09:25:21",
	"translate_status": "",
	"translate_time": 0,
	"language": {
		"default_lang": "cn",
		"current_lang": "cn"
	},
	"reason": "",
	"error_code": "0000",
	"cache": 0,
	"api_info": "today:1 max:10100 all[18=1+1+16];expires:2030-12-31",
	"execution_time": "4.042",
	"server_time": "Beijing/2022-08-25 09:25:21",
	"client_ip": "106.6.34.173",
	"call_args": {
		"num_iid": "642885619273",
		"is_promotion": "1"
	},
	"api_type": "taobao",
	"translate_language": "zh-CN",
	"translate_engine": "google_new",
	"server_memory": "0.95MB",
	"request_id": "gw-4.6306cf7d79e2c",
	"last_id": "1173917767"
}

标签:img,imgextra,jpg,天猫,API,2207281504206,alicdn,电商,com
From: https://blog.51cto.com/u_15973577/6926845

相关文章

  • 淘宝API开发系列,淘宝API商品详情的测试及使用
    为了进行淘宝的API开发,首先我们需要做下面几件事情。1)开发者注册一个账号,2)然后为每个淘宝应用注册一个应用程序键(AppKey)。3)下载淘宝API的SDK并掌握基本的API基础知识和调用,具体可以参考论坛的信息。4)利用SDK接口和对象,传入AppKey或者必要的时候获取并传入SessionKey来进行程序开......
  • 淘宝获取商品详情API接口
    item_get-获得淘宝商品详情请求参数请求参数:num_iid=520813250866&is_promotion=1参数说明:num_iid:淘宝商品IDis_promotion:是否获取取促销价接口测试名称类型必须描述keyString是调用key(必须以GET方式拼接在URL中)secretString是调用密钥api_nameString是API接口名称(包括在请求地......
  • 拼多多API接口
    拼多多根据ID取商品详情API返回值说明item_get-根据ID取商品详情公共参数名称类型必须描述keyString是调用key(必须以GET方式拼接在URL中)secretString是调用密钥api_nameString是API接口名称(包括在请求地址中)[item_search,item_get,item_search_shop等]cacheString否......
  • 最全淘宝API接口,爬虫数据
    淘宝API接口列表接口地址item_get获得淘宝商品详情item_get_app获得淘宝app商品详情原数据item_get_pro获得淘宝商品详情高级版item_review获得淘宝商品评论item_sku获取sku详细信息item_fee获得淘宝商品快递费用item_password获得淘口令真实urlcat_get获得淘宝分类详情item_cat_ge......
  • 万邦京东获得JD商品详情 API 返回值说明
    onebound.jd.item_get公共参数名称类型必须描述keyString是调用key(必须以GET方式拼接在URL中)secretString是调用密钥api_nameString是API接口名称(包括在请求地址中)[item_search,item_get,item_search_shop等]cacheString否[yes,no]默认yes,将调用缓存的数据,速度比较快result_typeStr......
  • 万邦阿里巴巴中国站获得1688商品详情 API 返回值说明
    onebound.1688.item_get公共参数名称类型必须描述keyString是调用key(必须以GET方式拼接在URL中)secretString是调用密钥api_nameString是API接口名称(包括在请求地址中)[item_search,item_get,item_search_shop等]cacheString否[yes,no]默认yes,将调用缓存的数据,速度比较快result_typeS......
  • API接口获得1688商品详情,关键词搜索
    onebound.1688.item_getAPI接口入口请求参数请求参数:num_iid=610947572360参数说明:num_iid:1688商品IDsales_data:&sales_data=1获取近30天成交数据agent:&agent=1获取1688分销代发价格数据响应参数Version:Date:名称类型必须示例值描述itemitem[]0宝贝详情数据num_iidString0......
  • 淘宝1688拼多多京东商品详情,JSON格式API数据
    API接口入口请求参数请求参数:num_iid=652874751412&is_promotion=1参数说明:num_iid:淘宝商品IDis_promotion:是否获取取促销价响应参数Version:Date:2022-04-04名称类型必须示例值描述itemitem[]1宝贝详情数据num_iidBigint1520813250866宝贝IDtitleString1三刃木折叠刀过安检创......
  • 教会你们淘宝/天猫,1688,拼多多抖音获得商品详情 API 返回值说明
    item_get-获得商品详情公共参数名称类型必须描述keyString是调用key(必须以GET方式拼接在URL中)注册Key和secret测试secretString是调用密钥api_nameString是API接口名称(包括在请求地址中)[item_search,item_get,item_search_shop等]cacheString否[yes,no]默认yes,将调用缓存的数据,速度......
  • 技术分享淘宝Tmall1688拼多多抖音等电商 API 获取商品详情返回值说明(可测试)
    item_get-取商品详情公共参数API工具名称类型必须描述keyString是调用key(必须以GET方式拼接在URL中)注册Key和secret测试secretString是调用密钥api_nameString是API接口名称(包括在请求地址中)[item_search,item_get,item_search_shop等]cacheString否[yes,no]默认yes,将调用缓存的数......