1000字范文,内容丰富有趣,学习的好帮手!
1000字范文 > 京东商品分类API接口-(cat_get-获得jd商品分类API接口) 京东分类API接口

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

时间:2019-05-17 05:19:04

相关推荐

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

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

1.公共参数:

2.请求参数

请求参数:cid=0

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

3.响应参数

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

# coding:utf-8"""Compatible for python2.x and python3.xrequirement: pip install requests"""from __future__ import print_functionimport 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": "12141","pid": "16","root_id": "16","name": "背心吊带","note": ""},{"id": "121434004","pid": "16","root_id": "16","name": "抹胸","note": ""},{"id": "41307","pid": "16","root_id": "16","name": "POLO衫","note": ""},{"id": "47207","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/-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"}

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。