淘宝/天猫、拼多多电商平台API接口测试流程

172 阅读5分钟

测试地址:console.open.onebound.cn/console/?i=…

image.png

Key

创建应用时,TOP颁发的唯一标识,TOP通过App Key来鉴别应用的身份,调用API(接口)时必须传入的参数。在开发者中心申请成为开发者后并创建应用即可获取(除应用列表可查看外,邮箱以及淘宝站内信也可查看)

Secret

TOP给应用分配的密钥,开发者需要妥善保存这个密钥,这个密钥用来保证应用来源的可靠性,防止被伪造。应用创建时即可获取,同AppKey。

获取Key和secret

一、API开发流程

  1. 注册账号

  2. 申请Key和secret

3.利用API程序开发

4.测试

二、示例

item_get-获得1688商品详情

请求参数:num_iid=610947572360

参数说明:num_iid:1688商品ID sales_data:&sales_data=1 获取近30天成交数据 agent:&agent=1 获取1688分销代发价格数据

得出数据:

https://api-gw.onebound.cn/pinduoduo/item_search/?key=&
&q=女装&start_price=0&end_price=0&page=1&cat=0&discount_only=&sort=&page_size=&&lang=zh-CN&secret=
---------------------------------------
Result Object:
---------------------------------------
{
	"items": {
		"keyword": "女装",
		"page": "1",
		"real_total_results": 825,
		"total_results": 825,
		"list_count": 20,
		"item": [
			{
				"title": "冰丝高腰阔腿裤女春夏小个子垂感直筒裤女韩版宽松显高休闲拖地裤",
				"pic_url": "https://img.pddpic.com/gaudit-image/2022-05-26/e8743e0d2cc3f247d66c36053c739185.jpeg",
				"price": 9.4,
				"promotion_price": 9.4,
				"sales": 100000,
				"num_iid": 106126652542,
				"sample_id": "",
				"seller_nick": "云米露女装旗舰店",
				"post_fee": "",
				"area": "",
				"detail_url": "http://yangkeduo.com/goods.html?goods_id=106126652542"
			},
			{
				"title": "2022新款夏季黑色阔腿裤女网红裤显瘦高腰垂感小个子垂感冰丝裤子",
				"pic_url": "https://img.pddpic.com/gaudit-image/2022-05-09/4b27deec18fb60ca669195db8cc6e83b.jpeg",
				"price": 14.35,
				"promotion_price": 14.35,
				"sales": 100000,
				"num_iid": 335337103674,
				"sample_id": "",
				"seller_nick": "百大针织服饰店",
				"post_fee": "",
				"area": "",
				"detail_url": "http://yangkeduo.com/goods.html?goods_id=335337103674"
			},
			{
				"title": "李宁短袖T恤女 纯棉大logo运动短袖女装上衣 圆领套头衫女AHSS482",
				"pic_url": "https://t00img.yangkeduo.com/goods/images/2020-08-31/2c323c5b289ed85915493aaeab05fb29.jpeg",
				"price": 35.8,
				"promotion_price": 35.8,
				"sales": 100000,
				"num_iid": 94000916880,
				"sample_id": "",
				"seller_nick": "李宁尊享专卖店",
				"post_fee": "",
				"area": "",
				"detail_url": "http://yangkeduo.com/goods.html?goods_id=94000916880"
			},
			{
				"title": "杏色V领甜辣妹短袖T恤女2022夏季韩版小众设计感别致短款polo小衫",
				"pic_url": "https://img.pddpic.com/gaudit-image/2022-07-03/2f902ee2084962047915c573647facac.jpeg",
				"price": 16.9,
				"promotion_price": 16.9,
				"sales": 8328,
				"num_iid": 384549698617,
				"sample_id": "",
				"seller_nick": "妖妖时尚服饰",
				"post_fee": "",
				"area": "",
				"detail_url": "http://yangkeduo.com/goods.html?goods_id=384549698617"
			},
			{
				"title": "冰丝阔腿裤女夏季薄款高腰垂感宽松直筒裤2022款小个子休闲拖地裤",
				"pic_url": "https://img.pddpic.com/gaudit-image/2022-03-24/c86ef96c4d38e0d4d01d413bbfb97dd7.jpeg",
				"price": 29.8,
				"promotion_price": 29.8,
				"sales": 37000,
				"num_iid": 340046779346,
				"sample_id": "",
				"seller_nick": "菡儿服装官方旗舰店",
				"post_fee": "",
				"area": "",
				"detail_url": "http://yangkeduo.com/goods.html?goods_id=340046779346"
			},
			{
				"title": "套装女2022夏季美式甜辣印花粉色短袖T恤高腰显瘦阔腿工装长裤潮",
				"pic_url": "https://img.pddpic.com/gaudit-image/2022-06-28/ecd6fb17d9cc5a2bff5d06ff54afa733.jpeg",
				"price": 17.9,
				"promotion_price": 17.9,
				"sales": 24000,
				"num_iid": 381721406892,
				"sample_id": "",
				"seller_nick": "御怡服装官方旗舰店",
				"post_fee": "",
				"area": "",
				"detail_url": "http://yangkeduo.com/goods.html?goods_id=381721406892"
			},
			{
				"title": "破洞牛仔裤女夏季新款高街复古宽松显瘦高腰直筒阔腿长裤子ins潮",
				"pic_url": "https://img.pddpic.com/gaudit-image/2022-03-09/80cf20e839882b6e6ff8884be824a12a.jpeg",
				"price": 17.11,
				"promotion_price": 17.11,
				"sales": 7784,
				"num_iid": 334848587628,
				"sample_id": "",
				"seller_nick": "可可家时尚女装店",
				"post_fee": "",
				"area": "",
				"detail_url": "http://yangkeduo.com/goods.html?goods_id=334848587628"
			},
			{
				"title": "夏季新款2022小碎花网纱洋气中长款大码宽松显瘦短袖妈妈装连衣裙",
				"pic_url": "https://img.pddpic.com/gaudit-image/2022-04-21/799def0ffa6b359475639261a210b1a9.jpeg",
				"price": 29.89,
				"promotion_price": 29.89,
				"sales": 3625,
				"num_iid": 349886001114,
				"sample_id": "",
				"seller_nick": "简妮薇服饰配件旗舰店",
				"post_fee": "",
				"area": "",
				"detail_url": "http://yangkeduo.com/goods.html?goods_id=349886001114"
			},
			{
				"title": "夏季中老年人短袖棉绸睡衣套装加大码女士人造棉妈妈装绵绸家居服",
				"pic_url": "https://t00img.yangkeduo.com/goods/images/2021-03-11/4157acbe479b7c9928c28cdb6f30a5ed.jpeg",
				"price": 17.9,
				"promotion_price": 17.9,
				"sales": 100000,
				"num_iid": 18283474,
				"sample_id": "",
				"seller_nick": "梦尚美生活馆",
				"post_fee": "",
				"area": "",
				"detail_url": "http://yangkeduo.com/goods.html?goods_id=18283474"
			},
			{
				"title": "冰丝短裤女夏季薄款2022年新款宽松高腰直筒休闲阔腿运动五分裤子",
				"pic_url": "https://img.pddpic.com/gaudit-image/2022-05-09/9baa287d65bb8893052e34f4580eec50.jpeg",
				"price": 18.8,
				"promotion_price": 18.8,
				"sales": 57000,
				"num_iid": 355943495625,
				"sample_id": "",
				"seller_nick": "藿藿不熬夜",
				"post_fee": "",
				"area": "",
				"detail_url": "http://yangkeduo.com/goods.html?goods_id=355943495625"
			},
			{
				"title": "垂坠感高腰春夏季西裤休闲拖地西装裤女2022新款宽松直筒阔腿裤子",
				"pic_url": "https://t00img.yangkeduo.com/goods/images/2021-04-23/98e7651f586f2fddb5507fcb846e1baa.jpeg",
				"price": 22.49,
				"promotion_price": 22.49,
				"sales": 100000,
				"num_iid": 238039572411,
				"sample_id": "",
				"seller_nick": "三冬四夏女装",
				"post_fee": "",
				"area": "",
				"detail_url": "http://yangkeduo.com/goods.html?goods_id=238039572411"
			},
			{
				"title": "【1/2件】夏季瑜伽服短袖单上衣女速干跑步运动健身服套装初学者",
				"pic_url": "https://img.pddpic.com/gaudit-image/2022-02-10/6aed61482d19c760615f943750d95c21.jpeg",
				"price": 11.8,
				"promotion_price": 11.8,
				"sales": 100000,
				"num_iid": 2607027820,
				"sample_id": "",
				"seller_nick": "湘茗运动旗舰店",
				"post_fee": "",
				"area": "",
				"detail_url": "http://yangkeduo.com/goods.html?goods_id=2607027820"
			},
			{
				"title": "运动套装女春夏款瑜伽服2022新款瑜伽套装女晨跑运动装跑步套装女",
				"pic_url": "https://t00img.yangkeduo.com/goods/images/2020-10-05/0d5b1fcb5b0b7cfa4108fa9cbeeea783.jpeg",
				"price": 39,
				"promotion_price": 39,
				"sales": 100000,
				"num_iid": 80892451341,
				"sample_id": "",
				"seller_nick": "咖束旗舰店",
				"post_fee": "",
				"area": "",
				"detail_url": "http://yangkeduo.com/goods.html?goods_id=80892451341"
			},
			{
				"title": "RAMPAGE 阔腿裤女夏季薄款条纹垂感拖地显瘦直筒裤宽松休闲运动裤",
				"pic_url": "https://img.pddpic.com/gaudit-image/2022-06-07/f8479dbb4b401e40f813f2d69ee680b3.jpeg",
				"price": 29.8,
				"promotion_price": 29.8,
				"sales": 100000,
				"num_iid": 372014405726,
				"sample_id": "",
				"seller_nick": "RAMPAGE男女装官方旗舰店",
				"post_fee": "",
				"area": "",
				"detail_url": "http://yangkeduo.com/goods.html?goods_id=372014405726"
			},
			{
				"title": "遮肉冰丝裤子女夏季薄款宽松直筒黑色大码仙仙休闲高腰垂感阔腿裤",
				"pic_url": "https://img.pddpic.com/gaudit-image/2022-03-06/117b4fe09d025e90822e60839edbe423.jpeg",
				"price": 9.99,
				"promotion_price": 9.99,
				"sales": 100000,
				"num_iid": 333167009037,
				"sample_id": "",
				"seller_nick": "南极人圣钊专卖店",
				"post_fee": "",
				"area": "",
				"detail_url": "http://yangkeduo.com/goods.html?goods_id=333167009037"
			},
			{
				"title": "潮流高腰百褶冰丝阔腿裤夏季薄款垂感防晒防蚊雪纺宽松显瘦拖地裤",
				"pic_url": "https://img.pddpic.com/gaudit-image/2022-02-24/d0f10b70279a355bff4a73f30e76b50d.jpeg",
				"price": 15.8,
				"promotion_price": 15.8,
				"sales": 20000,
				"num_iid": 330349636182,
				"sample_id": "",
				"seller_nick": "语萱女装",
				"post_fee": "",
				"area": "",
				"detail_url": "http://yangkeduo.com/goods.html?goods_id=330349636182"
			},
			{
				"title": "瑜伽服运动套装女夏天跑步薄款健身房网红专业时尚高端速干衣夏季",
				"pic_url": "https://t00img.yangkeduo.com/goods/images/2020-08-13/4a79a72e3fa573a4029c735ffe5b52ff.jpeg",
				"price": 19.8,
				"promotion_price": 19.8,
				"sales": 46000,
				"num_iid": 165186113708,
				"sample_id": "",
				"seller_nick": "小丫儿女装店",
				"post_fee": "",
				"area": "",
				"detail_url": "http://yangkeduo.com/goods.html?goods_id=165186113708"
			},
			{
				"title": "RAMPAGE 冰丝阔腿裤女夏季薄款高腰垂感显瘦直筒裤宽松休闲西装裤",
				"pic_url": "https://img.pddpic.com/gaudit-image/2022-06-16/4c3cf8d428daa1433000fa9fb4696834.jpeg",
				"price": 31.8,
				"promotion_price": 31.8,
				"sales": 100000,
				"num_iid": 376148286062,
				"sample_id": "",
				"seller_nick": "RAMPAGE时尚女装官方旗舰店",
				"post_fee": "",
				"area": "",
				"detail_url": "http://yangkeduo.com/goods.html?goods_id=376148286062"
			},
			{
				"title": "冰丝睡衣女夏季薄款短袖V领2021韩版甜美仿真丝夏天两件套家居服",
				"pic_url": "https://t00img.yangkeduo.com/goods/images/2021-06-02/b00f06a315f3a954b6755ceab683ecaa.jpeg",
				"price": 11.5,
				"promotion_price": 11.5,
				"sales": 100000,
				"num_iid": 249460655241,
				"sample_id": "",
				"seller_nick": "可虹儿",
				"post_fee": "",
				"area": "",
				"detail_url": "http://yangkeduo.com/goods.html?goods_id=249460655241"
			},
			{
				"title": "夏季套装女复古chic短款针织短袖上衣女坠感西裤学院风穿搭两件套",
				"pic_url": "https://img.pddpic.com/gaudit-image/2022-06-23/fdba95631672b9c24fb2117e6adf91f2.jpeg",
				"price": 24.9,
				"promotion_price": 24.9,
				"sales": 2817,
				"num_iid": 379503706946,
				"sample_id": "",
				"seller_nick": "沫风婉官方旗舰店",
				"post_fee": "",
				"area": "",
				"detail_url": "http://yangkeduo.com/goods.html?goods_id=379503706946"
			}
		]
	},
	"error_code": "0000",
	"reason": "ok",
	"secache": "a8881ed5637e3c7e84f03acdc86be64f",
	"secache_time": 1658474381,
	"secache_date": "2022-07-22 15:19:41",
	"translate_status": "",
	"translate_time": 0,
	"language": {
		"default_lang": "cn",
		"current_lang": "cn"
	},
	"error": "",
	"cache": 0,
	"api_info": "today:56 max:10100 all[127=56+23+48];expires:2030-12-31",
	"execution_time": "1.149",
	"server_time": "Beijing/2022-07-22 15:19:41",
	"client_ip": "106.6.35.38",
	"call_args": {
		"q": "女装",
		"start_price": "0",
		"end_price": "0",
		"page": "1",
		"cat": "0"
	},
	"api_type": "pinduoduo",
	"translate_language": "zh-CN",
	"translate_engine": "baidu",
	"server_memory": "3.2MB",
	"request_id": "gw-3.62da4f8cd345c",
	"last_id": "1094085039"
}