首页 > 其他分享 >该怎么用接口来获得淘宝,天猫,京东,拼多多店铺的所有商品详情

该怎么用接口来获得淘宝,天猫,京东,拼多多店铺的所有商品详情

时间:2023-08-01 10:36:56浏览次数:50  
标签:shop url price 接口 seller item 天猫 京东 id


item_search_shop-获得店铺的所有商品  前往注册开通测试

onebound.taobao.item_search_shop

公共参数

名称

类型

必须

描述

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

请求参数

请求参数:shop_id=36558682&page=1&sort=

参数说明: shop_id:shop_id page:页码
sort:排序[new,bid,sale]
(new 新品,bid:价格,sale:销量,bid加_前缀为从大到小排序)\

响应参数

Version: Date:

名称

类型

必须

示例值

描述

num_iid

Bigint

0

商品ID

pic_url

String

0

图片地址

title

String

0

店铺标题

orginal_price

String

0

优惠价

price

Float

0

价格

sales

Int

0

销量

detail_url

String

0

宝贝链接

请求示例

-- 请求示例 url 默认请求参数已经URL编码处理
curl -i "https://api-gw.onebound.cn/taobao/item_search_shop/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&shop_id=36558682&page=1&sort="

响应示例

"items": {
		"shop_id": "36558682",
		"page": "1",
		"has_next_page": "true",
		"real_total_results": "3041",
		"total_results": "3041",
		"page_size": 18,
		"page_count": 153,
		"_ddf": "ti",
		"item": [
			{
				"num_iid": "2075091110",
				"pic_url": "https://img.alicdn.com/imgextra/i1/141195164/TB1C7CwxiMnBKNjSZFoXXbOSFXa_!!0-item_pic.jpg",
				"title": "魔方 适用于 HP 惠普 6515B 6515S 6510B 笔记本键盘 全新英文",
				"promotion_price": "28.00",
				"price": "28.00",
				"sales": 1726,
				"quantity": "925",
				"seller_nick": "魔方键盘",
				"seller_id": "141195164",
				"shop_id": "36558682",
				"shop_title": "魔方键盘 笔记本配件商城",
				"is_tmall": "false",
				"detail_url": "https://item.taobao.com/item.htm?id=2075091110"
			},
			{
				"num_iid": "2075103394",
				"pic_url": "//img.alicdn.com/imgextra/i2/0/TB1rGZRLXXXXXbvXVXXXXXXXXXX_!!0-item_pic.jpg",
				"title": "魔方 英文 HP 惠普 NC4400 NC4200 TC4200 TC4210 TC4400 键盘",
				"promotion_price": "14.00",
				"price": "14.00",
				"sales": 0,
				"quantity": "9857",
				"seller_nick": null,
				"seller_id": "141195164",
				"shop_id": "36558682",
				"shop_title": null,
				"is_tmall": null,
				"detail_url": "https://item.taobao.com/item.htm?id=2075103394"
			},
			{
				"num_iid": "2311503990",
				"pic_url": "//img.alicdn.com/imgextra/i1/T1THioXlR4XXcTmX.._111221.jpg",
				"title": "新到 14寸/16:10=14.4寸 电脑防辐射屏幕贴膜 屏贴 屏膜 贴膜",
				"promotion_price": "5.00",
				"price": "5.00",
				"sales": 0,
				"quantity": "609",
				"seller_nick": null,
				"seller_id": "141195164",
				"shop_id": "36558682",
				"shop_title": null,
				"is_tmall": null,
				"detail_url": "https://item.taobao.com/item.htm?id=2311503990"
			},
			{
				"num_iid": "2311505030",
				"pic_url": "https://img.alicdn.com/imgextra/i1/T1LdmoXmXBXXbFRp7._111216.jpg",
				"title": "15寸/16:10=15.4寸 贴膜 笔记本屏幕保护膜 屏贴 屏膜 液晶保护膜",
				"promotion_price": "5.00",
				"price": "5.00",
				"sales": 361,
				"quantity": "67",
				"seller_nick": "魔方键盘",
				"seller_id": "141195164",
				"shop_id": "36558682",
				"shop_title": "魔方键盘 笔记本配件商城",
				"is_tmall": "false",
				"detail_url": "https://item.taobao.com/item.htm?id=2311505030"
			},
			{
				"num_iid": "2354995320",
				"pic_url": "https://img.alicdn.com/imgextra/i3/141195164/O1CN015le1QR1o1A1t4QUzg_!!141195164.jpg",
				"title": "US/RU HP 惠普 COMPAQ DV6000 DV6400 DV6500 V6010 DV6700 键盘",
				"promotion_price": "20.00",
				"price": "20.00",
				"sales": 2808,
				"quantity": "13690",
				"seller_nick": "魔方键盘",
				"seller_id": "141195164",
				"shop_id": "36558682",
				"shop_title": "魔方键盘 笔记本配件商城",
				"is_tmall": "false",
				"detail_url": "https://item.taobao.com/item.htm?id=2354995320"
			},
			{
				"num_iid": "2354995710",
				"pic_url": "//img.alicdn.com/imgextra/i4/0/TB1K9Z1RXXXXXcPaXXXXXXXXXXX_!!0-item_pic.jpg",
				"title": "适用于 HP 惠普 NX6320 NC6320 NX6325 NX6335 笔记本键盘",
				"promotion_price": "19.00",
				"price": "19.00",
				"sales": 0,
				"quantity": "9843",
				"seller_nick": null,
				"seller_id": "141195164",
				"shop_id": "36558682",
				"shop_title": null,
				"is_tmall": null,
				"detail_url": "https://item.taobao.com/item.htm?id=2354995710"
			},
			{
				"num_iid": "2355000706",
				"pic_url": "//img.alicdn.com/imgextra/i4/0/TB1K9Z1RXXXXXcPaXXXXXXXXXXX_!!0-item_pic.jpg",
				"title": "适用 HP 惠普 NX6120 NC6210 NX6110 键盘 NC6110 NC6120 NX6115",
				"promotion_price": "19.00",
				"price": "19.00",
				"sales": 0,
				"quantity": "9869",
				"seller_nick": null,
				"seller_id": "141195164",
				"shop_id": "36558682",
				"shop_title": null,
				"is_tmall": null,
				"detail_url": "https://item.taobao.com/item.htm?id=2355000706"
			},
			{
				"num_iid": "2426829354",
				"pic_url": "//img.alicdn.com/imgextra/i1/T1DK0gXkHL2tJF3bgZ_031419.jpg",
				"title": "五冠信誉 低价甩 5米跳线/5M跳线/双绞线/5M网线 超值特价3元",
				"promotion_price": "3.00",
				"price": "3.00",
				"sales": 0,
				"quantity": "307",
				"seller_nick": null,
				"seller_id": "141195164",
				"shop_id": "36558682",
				"shop_title": null,
				"is_tmall": null,
				"detail_url": "https://item.taobao.com/item.htm?id=2426829354"
			},
			{
				"num_iid": "2452257986",
				"pic_url": "https://img.alicdn.com/imgextra/i2/141195164/O1CN01PTgvQ21o1A1Q5JPO1_!!141195164.jpg",
				"title": "L ASUS华硕A8F A8M A8H A8Z A8 A8J A8T A8sr W3A键盘Z99Ja Z99Jm",
				"promotion_price": "14.00",
				"price": "14.00",
				"sales": 6131,
				"quantity": "1459",
				"seller_nick": "魔方键盘",
				"seller_id": "141195164",
				"shop_id": "36558682",
				"shop_title": "魔方键盘 笔记本配件商城",
				"is_tmall": "false",
				"detail_url": "https://item.taobao.com/item.htm?id=2452257986"
			},
			{
				"num_iid": "2476477564",
				"pic_url": "https://img.alicdn.com/imgextra/i2/141195164/O1CN01lVVXsW1o19sqA7sAa_!!0-item_pic.jpg",
				"title": "DELL戴尔M1330 1520 1525 1410 1318 1545键盘MK750 PP25L 22 29",
				"promotion_price": "15.00",
				"price": "15.00",
				"sales": 11342,
				"quantity": "19260",
				"seller_nick": "魔方键盘",
				"seller_id": "141195164",
				"shop_id": "36558682",
				"shop_title": "魔方键盘 笔记本配件商城",
				"is_tmall": "false",
				"detail_url": "https://item.taobao.com/item.htm?id=2476477564"
			},
			{
				"num_iid": "2624326056",
				"pic_url": "https://img.alicdn.com/imgextra/i1/141195164/O1CN01pHhJK01o1A1Wf8nAP_!!141195164.jpg",
				"title": "HP惠普 DV2000 V3000 DV3000 DV2500键盘V3500 V3700 DV2700 2300",
				"promotion_price": "21.00",
				"price": "21.00",
				"sales": 22321,
				"quantity": "8203",
				"seller_nick": "魔方键盘",
				"seller_id": "141195164",
				"shop_id": "36558682",
				"shop_title": "魔方键盘 笔记本配件商城",
				"is_tmall": "false",
				"detail_url": "https://item.taobao.com/item.htm?id=2624326056"
			},
			{
				"num_iid": "2709906126",
				"pic_url": "//img.alicdn.com/imgextra/i1/T1KpWLXjpmXXbBvMo0_035309.jpg",
				"title": "USB灯 3灯 迷你笔记本台灯 LED键盘灯 金属身任意扭 无需电池",
				"promotion_price": "5.80",
				"price": "5.80",
				"sales": 0,
				"quantity": "274",
				"seller_nick": null,
				"seller_id": "141195164",
				"shop_id": "36558682",
				"shop_title": null,
				"is_tmall": null,
				"detail_url": "https://item.taobao.com/item.htm?id=2709906126"
			},
			{
				"num_iid": "3762566738",
				"pic_url": "//img.alicdn.com/imgextra/i1/0/TB1JW6BKXXXXXc1XVXXXXXXXXXX_!!0-item_pic.jpg",
				"title": "L适用于ASUS 华硕 F3E F3F F3H F3Ja F3U F3T F2 Z53 Z52 X52键盘",
				"promotion_price": "21.00",
				"price": "21.00",
				"sales": 0,
				"quantity": "1284",
				"seller_nick": null,
				"seller_id": "141195164",
				"shop_id": "36558682",
				"shop_title": null,
				"is_tmall": null,
				"detail_url": "https://item.taobao.com/item.htm?id=3762566738"
			},
			{
				"num_iid": "3987331218",
				"pic_url": "https://img.alicdn.com/imgextra/i1/141195164/O1CN014sjfPp1o19ssVlWwx_!!0-item_pic.jpg",
				"title": "适用DELL戴尔Vostro 1400 PP22L 1318 1545 PP29L 1520笔记本键盘",
				"promotion_price": "15.00",
				"price": "15.00",
				"sales": 6637,
				"quantity": "10444",
				"seller_nick": "魔方键盘",
				"seller_id": "141195164",
				"shop_id": "36558682",
				"shop_title": "魔方键盘 笔记本配件商城",
				"is_tmall": "false",
				"detail_url": "https://item.taobao.com/item.htm?id=3987331218"
			},
			{
				"num_iid": "4204293742",
				"pic_url": "https://img.alicdn.com/imgextra/i4/141195164/O1CN013HCMeW1o1A1bdtVE6_!!141195164.jpg",
				"title": "DELL戴尔1425 1427 FT02 1428键盘R610N方正R610 R610N A605 A611",
				"promotion_price": "15.00",
				"price": "15.00",
				"sales": 5233,
				"quantity": "665",
				"seller_nick": "魔方键盘",
				"seller_id": "141195164",
				"shop_id": "36558682",
				"shop_title": "魔方键盘 笔记本配件商城",
				"is_tmall": "false",
				"detail_url": "https://item.taobao.com/item.htm?id=4204293742"
			},
			{
				"num_iid": "4246009698",
				"pic_url": "https://img.alicdn.com/imgextra/i2/TB1yh7AHXXXXXc8XFXXXXXXXXXX_!!0-item_pic.jpg",
				"title": "★拍下就送,不拍不送★带磁性十字梅花小螺丝刀拆键盘风扇笔记本",
				"promotion_price": "1.00",
				"price": "1.00",
				"sales": 5211,
				"quantity": "5994",
				"seller_nick": "魔方键盘",
				"seller_id": "141195164",
				"shop_id": "36558682",
				"shop_title": "魔方键盘 笔记本配件商城",
				"is_tmall": "false",
				"detail_url": "https://item.taobao.com/item.htm?id=4246009698"
			},
			{
				"num_iid": "4342034336",
				"pic_url": "https://img.alicdn.com/imgextra/i3/141195164/O1CN01JZ4BAs1o19sR016Jg_!!0-item_pic.jpg",
				"title": "ASUS 华硕F81E F81S F81SE F83V F83T F83CR F83E F83SE 键盘 F82",
				"promotion_price": "22.00",
				"price": "22.00",
				"sales": 14001,
				"quantity": "10610",
				"seller_nick": "魔方键盘",
				"seller_id": "141195164",
				"shop_id": "36558682",
				"shop_title": "魔方键盘 笔记本配件商城",
				"is_tmall": "false",
				"detail_url": "https://item.taobao.com/item.htm?id=4342034336"
			},
			{
				"num_iid": "4512081450",
				"pic_url": "//img.alicdn.com/imgextra/i1/0/TB1ve78LXXXXXXkXVXXXXXXXXXX_!!0-item_pic.jpg",
				"title": "Y200联想F30A F30L F30M键盘F40A F40L F40M F40G F50T F50A D500",
				"promotion_price": "13.00",
				"price": "13.00",
				"sales": 0,
				"quantity": "29590",
				"seller_nick": null,
				"seller_id": "141195164",
				"shop_id": "36558682",
				"shop_title": null,
				"is_tmall": null,
				"detail_url": "https://item.taobao.com/item.htm?id=4512081450"
			}
		]
	},
	"error_code": "0000",
	"reason": "ok",
	"secache": "4d4970386419683be7c63feb702e29ef",
	"secache_time": 1664245367,
	"secache_date": "2022-09-27 10:22:47",
	"translate_status": "",
	"translate_time": 0,
	"language": {
		"default_lang": "cn",
		"current_lang": "cn"
	},
	"error": "",
	"cache": 0,
	"api_info": "today:28 max:10000 all[52=28+2+22];expires:2030-12-31",
	"execution_time": "1.447",
	"server_time": "Beijing/2022-09-27 10:22:47",
	"client_ip": "106.6.34.243",
	"call_args": {
		"seller_nick": "36558682",
		"start_price": "1"
	},
	"api_type": "taobao",
	"translate_language": "zh-CN",
	"translate_engine": "google_new",
	"server_memory": "6MB",
	"request_id": "gw-1.63325e762ebda",
	"last_id": "1246303157"
}

异常示例相关资料错误码解释

状态代码(error_code)

状态信息

详细描述

是否收费

0000

success

接口调用成功并返回相关数据


2000

Search success but no result

接口访问成功,但是搜索没有结果


4000

Server internal error

服务器内部错误


4001

Network error

网络错误


4002

Target server error

目标服务器错误


4003

Param error

用户输入参数错误

忽略

4004

Account not found

用户帐号不存在

忽略

4005

Invalid authentication credentials

授权失败

忽略

4006

API stopped

您的当前API已停用

忽略

4007

Account stopped

您的账户已停用

忽略

4008

API rate limit exceeded

并发已达上限

忽略

4009

API maintenance

API维护中

忽略

4010

API not found with these values

API不存在

忽略

4012

Please add api first

请先添加api

忽略

4013

Number of calls exceeded

调用次数超限

忽略

4014

Missing url param

参数缺失

忽略

4015

Wrong pageToken

参数pageToken有误

忽略

4016

Insufficient balance

余额不足

忽略

4017

timeout error

请求超时


5000

unknown error

未知错误


标签:shop,url,price,接口,seller,item,天猫,京东,id
From: https://blog.51cto.com/u_16182967/6918238

相关文章

  • API数据接口该怎么对接
    随着互联网和移动互联网的发展,API(ApplicationProgrammingInterface)接口的作用越来越重要。API接口将各种平台相互连接,使得不同系统的信息可以互相获取和使用,大大提高了系统的互操作性和开发效率。本文将介绍如何对接API数据接口,以及注意事项和技巧。获取API接口首先需要找到需要......
  • 关于API接口应用
    随着互联网技术的发展,API接口已成为众多应用程序开发中的必备工具,它不仅方便了开发者进行应用程序开发,也为应用程序提供了更多的功能和服务。本文将介绍API接口的概念和应用,以及API接口的优势和未来趋势。一、什么是API接口API是ApplicationProgrammingInterface,即应用程序接口。......
  • 你是一个资深API接口爬虫程序员,现在需要你介绍一下如何通过商品id来获取商品数据并读
    获取商品数据通常需要使用API接口,根据接口文档中的说明传递商品id参数,并使用相应的请求方式(通常为GET请求)向API服务器发送请求即可。以下是一个获取商品数据的示例请求:首先打开API接口文档,找到获取商品数据的API接口。例如:https://api.xxx.com/products/{product_id}API文档中会说......
  • java怎么写接口,java开发api接口教程
    在大家的工作中,经常写界面。而且,最常用的是http接口。但是,对于初学者Java工作人员来说,写http界面还很难。那么,用实例来说明吧。一、建设项目首先,生成SpringBoot项目。省略如何构建此处,并引入相关依赖关系:org.springframework.bootartifactIdspring-boot-starter/从属从属关系or......
  • 什么是API接口,具体是什么意思?
    说到API,往往是和SDK放在一起的。什么叫API,看一下餐厅里怎么点餐的就行了。到了饭店,喊一场服务员,点餐。服务员拿出来菜单给你看,你点什么,她在小本本上记什么。点好了之后,再把菜单送到后厨去。这里服务员就是提供服务的(不然也不叫服务员),提供什么服务呢?点餐服务。点餐服务需要什么呢?谈......
  • 为什么有公司规定所有接口都用Post?
    看到这个标题,你肯定觉得离谱。怎么会有公司规定所有接口都用Post,是架构菜还是开发菜。这可不是夸大其词,这样的公司不少。在特定的情况下,规定使用Post可以减少不少的麻烦,一起看看。Answerthequestion我们都知道,get请求一半用来获取服务器信息,post一般用来更新信息。get请求能做的,p......
  • 用大白话科普什么是「API接口」
    ......
  • 限制IP对接口的调用频率_基于Redis实现
    pom.xml引入依赖<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-redis</artifactId></dependency>逻辑代码 privatebooleanli......
  • 接口幂等性,qps,tps,并发量,pv,uv,脏读,不可重复读,幻读
    1脏读,不可重复读,幻读,mysql5.7以后默认隔离级别是什么?脏读:'当一个事务读取了另一个未提交事务的数据时,称为脏读。当事务A读取到事务B尚未提交的数据时,如果事务B回滚,那么事务A读取的数据就是无效的或者不一致的,导致脏读的结果是不可靠的。'不可重复读:'在同一个事务中,对于相同的......
  • 【go语言】3.1.2 接口的定义和实现
    在Go中,接口是一种抽象类型,用来描述其他类型应该有哪些方法。它定义了一组方法,但没有实现。这些方法由其他类型实现。接口的定义接口定义的格式如下:typeInterfaceNameinterface{Method1(param1type1,param2type2)returntype1Method2(param1type1,param2ty......