京东商品分类API接口-(cat_get-获得jd商品分类API接口),京东分类API接口

一、京东商品分类API接口-(cat_get-获得jd商品分类API接口),京东分类API接口代码如下:

1.公共参数:

名称类型必须描述
keyString调用key(必须以GET方式拼接在URL中)
secretString调用密钥 ( 点击获取测试key和secret
api_nameStringAPI接口名称(包括在请求地址中)[item_search,item_get,item_search_shop等]
cacheString[yes,no]默认yes,将调用缓存的数据,速度比较快
result_typeString[json,jsonu,xml,serialize,var_export]返回数据格式,默认为json,jsonu输出的内容中文可以直接阅读
langString[cn,en,ru]翻译语言,默认cn简体中文
versionStringAPI版本

2.请求参数

请求参数:cid=0

参数说明:cid:商品分类ID,可以用cid=0来获得所有一级类目

3.响应参数

名称类型是否隐私示例值描述
idInt54商品分类ID
nameString服饰配件、饰品分类名
pidString0父分类ID
root_idString0根分类ID
itemMix{"id": 127464010,"name": "帽子/头巾","pid": "54","root_id": 0,sub[]}子分类id:子分类名称

 4.请求示例(CURL、PHP 、PHPsdk 、Java 、C# 、Python…)

# coding:utf-8
"""
Compatible for python2.x and python3.x
requirement: pip install requests
"""
from __future__ import print_function
import requests
# 请求示例 url 默认请求参数已经做URL编码
url = "https://wx19970108018/jd/cat_get/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&cid=0"
headers = {
    "Accept-Encoding": "gzip",
    "Connection": "close"
}
if __name__ == "__main__":
    r = requests.get(url, headers=headers)
    json_obj = r.json()
    print(json_obj)

 5.响应示例:

{
	"items": {
		"item": [
			{
				"id": "16",
				"name": "女装/女士精品",
				"pid": "2",
				"root_id": "2",
				"sub": [
					{
						"id": "1622",
						"pid": "16",
						"root_id": "16",
						"name": "裤子",
						"note": ""
					},
					{
						"id": "1623",
						"pid": "16",
						"root_id": "16",
						"name": "半身裙",
						"note": ""
					},
					{
						"id": "1624",
						"pid": "16",
						"root_id": "16",
						"name": "套装/学生校服/工作制服",
						"note": ""
					},
					{
						"id": "1629",
						"pid": "16",
						"root_id": "16",
						"name": "大码女装",
						"note": ""
					},
					{
						"id": "162103",
						"pid": "16",
						"root_id": "16",
						"name": "毛衣",
						"note": ""
					},
					{
						"id": "162104",
						"pid": "16",
						"root_id": "16",
						"name": "衬衫",
						"note": ""
					},
					{
						"id": "162116",
						"pid": "16",
						"root_id": "16",
						"name": "蕾丝衫/雪纺衫",
						"note": ""
					},
					{
						"id": "162205",
						"pid": "16",
						"root_id": "16",
						"name": "牛仔裤",
						"note": ""
					},
					{
						"id": "50000671",
						"pid": "16",
						"root_id": "16",
						"name": "T恤",
						"note": ""
					},
					{
						"id": "50000697",
						"pid": "16",
						"root_id": "16",
						"name": "毛针织衫",
						"note": ""
					},
					{
						"id": "50000852",
						"pid": "16",
						"root_id": "16",
						"name": "中老年女装",
						"note": ""
					},
					{
						"id": "50008897",
						"pid": "16",
						"root_id": "16",
						"name": "西装",
						"note": ""
					},
					{
						"id": "50008898",
						"pid": "16",
						"root_id": "16",
						"name": "卫衣/绒衫",
						"note": ""
					},
					{
						"id": "50008899",
						"pid": "16",
						"root_id": "16",
						"name": "羽绒服",
						"note": ""
					},
					{
						"id": "50008900",
						"pid": "16",
						"root_id": "16",
						"name": "棉衣/棉服",
						"note": ""
					},
					{
						"id": "50008901",
						"pid": "16",
						"root_id": "16",
						"name": "风衣",
						"note": ""
					},
					{
						"id": "50008904",
						"pid": "16",
						"root_id": "16",
						"name": "皮衣",
						"note": ""
					},
					{
						"id": "50008905",
						"pid": "16",
						"root_id": "16",
						"name": "皮草",
						"note": ""
					},
					{
						"id": "50008906",
						"pid": "16",
						"root_id": "16",
						"name": "唐装/民族服装/舞台服装",
						"note": ""
					},
					{
						"id": "50010850",
						"pid": "16",
						"root_id": "16",
						"name": "连衣裙",
						"note": ""
					},
					{
						"id": "50011277",
						"pid": "16",
						"root_id": "16",
						"name": "短外套",
						"note": ""
					},
					{
						"id": "50011404",
						"pid": "16",
						"root_id": "16",
						"name": "婚纱/旗袍/礼服",
						"note": ""
					},
					{
						"id": "50013194",
						"pid": "16",
						"root_id": "16",
						"name": "毛呢外套",
						"note": ""
					},
					{
						"id": "50013196",
						"pid": "16",
						"root_id": "16",
						"name": "马夹",
						"note": ""
					},
					{
						"id": "121412004",
						"pid": "16",
						"root_id": "16",
						"name": "背心吊带",
						"note": ""
					},
					{
						"id": "121434004",
						"pid": "16",
						"root_id": "16",
						"name": "抹胸",
						"note": ""
					},
					{
						"id": "201241307",
						"pid": "16",
						"root_id": "16",
						"name": "POLO衫",
						"note": ""
					},
					{
						"id": "201247207",
						"pid": "16",
						"root_id": "16",
						"name": "连体衣/裤",
						"note": ""
					}
				]
			}
		]
	},
	"translate_status": "",
	"translate_time": 0,
	"language": {
		"default_lang": "cn",
		"current_lang": "cn"
	},
	"error": "",
	"reason": "",
	"error_code": "0000",
	"cache": 0,
	"api_info": "today:76 max:10100 all[128=76+17+35];expires:2030-12-31",
	"execution_time": "0.065",
	"server_time": "Beijing/2022-06-23 18:34:49",
	"client_ip": "106.6.36.208",
	"call_args": [],
	"api_type": "taobao",
	"translate_language": "zh-CN",
	"translate_engine": "google_new",
	"server_memory": "0.84MB",
	"request_id": "gw-4.62b441c99f34d",
	"last_id": "1036315464"
}

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
1000Base-X是一种用于以太网的标准接口,支持传输速率为1 Gbps。它使用光纤作为传输介质,可以通过单模光纤(SMF)或多模光纤(MMF)进行数据传输。 SGMII是SerDes based代表识别符(serial 为串行,generous为慷慨的意思)。这是一种适用于以太网的接口定义,用于连接MAC层和PHY层设备。它通过4对差分信号进行传输,支持千兆速率的数据通信。 GMII(Gigabit Media Independent Interface)是一种标准接口,用于在MAC层和PHY层之间传输数据。它支持传输速率为1 Gbps,使用4对差分信号进行通信。 RGMII(Reduced Gigabit Media Independent Interface)是一种适用于以太网的接口定义,用于连接MAC层和PHY层设备。它使用2对差分信号进行数据传输,支持传输速率为1 Gbps。RGMII可以有效地减少所需的引脚数量,从而节省芯片空间。 MII(Media Independent Interface)是一种用于以太网的标准接口。它是一个物理层和介质访问控制层之间的接口,用于传输数据。MII支持传输速率为10 Mbps。 1000Base-T是一种以太网标准接口,支持传输速率为1 Gbps。它使用四对CAT5或CAT6双绞线作为传输介质,适用于距离较短的局域网连接。 总结:1000Base-X、SGMII、GMII、RGMII、MII和1000Base-T都是用于以太网的接口定义,支持1 Gbps的传输速率。它们使用不同的传输介质和通信方式,适用于不同的网络和应用场景。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值