• 分类接口,淘宝分类详情 API


    一、参数 注册获取专属于你的key和secret

    公共参数

    请求地址: https://api-gw.onebound.cn/taobao/cat_get

    注册获取专属于你的key和secret

    名称类型必须描述
    keyString调用key(必须以GET方式拼接在URL中)
    secretString调用密钥
    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版本

    请求参数

    请求参数:cid=16

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

    响应参数

    Version: Date:

    名称类型必须示例值描述

    info

    Mix0{"cid": 16, "parent_cid": 0, "name": "其他女装", "is_parent": "true", "status": "normal", "sort_order": "0"},分类信息

    item

    Mix0{"1624": "职业装/工作服/校服", "50000852": "中老年女装", "50008906": "唐装/民族/舞台服装", "50029581": "马夹", "50095935": "仿皮皮衣", "50099705": "大码女装", "50099718": "婚纱/礼服/旗袍"}子分类id:子分类名称


    二、示例

    请求示例

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

    响应示例

    1. {
    2. "items": {
    3. "item": [
    4. {
    5. "id": "16",
    6. "name": "女装/女士精品",
    7. "pid": "2",
    8. "root_id": "2",
    9. "sub": [
    10. {
    11. "id": "1622",
    12. "pid": "16",
    13. "root_id": "16",
    14. "name": "裤子",
    15. "note": ""
    16. },
    17. {
    18. "id": "1623",
    19. "pid": "16",
    20. "root_id": "16",
    21. "name": "半身裙",
    22. "note": ""
    23. },
    24. {
    25. "id": "1624",
    26. "pid": "16",
    27. "root_id": "16",
    28. "name": "套装/学生校服/工作制服",
    29. "note": ""
    30. },
    31. {
    32. "id": "1629",
    33. "pid": "16",
    34. "root_id": "16",
    35. "name": "大码女装",
    36. "note": ""
    37. },
    38. {
    39. "id": "162103",
    40. "pid": "16",
    41. "root_id": "16",
    42. "name": "毛衣",
    43. "note": ""
    44. },
    45. {
    46. "id": "162104",
    47. "pid": "16",
    48. "root_id": "16",
    49. "name": "衬衫",
    50. "note": ""
    51. },
    52. {
    53. "id": "162116",
    54. "pid": "16",
    55. "root_id": "16",
    56. "name": "蕾丝衫/雪纺衫",
    57. "note": ""
    58. },
    59. {
    60. "id": "162205",
    61. "pid": "16",
    62. "root_id": "16",
    63. "name": "牛仔裤",
    64. "note": ""
    65. },
    66. {
    67. "id": "50000671",
    68. "pid": "16",
    69. "root_id": "16",
    70. "name": "T恤",
    71. "note": ""
    72. },
    73. {
    74. "id": "50000697",
    75. "pid": "16",
    76. "root_id": "16",
    77. "name": "毛针织衫",
    78. "note": ""
    79. },
    80. {
    81. "id": "50000852",
    82. "pid": "16",
    83. "root_id": "16",
    84. "name": "中老年女装",
    85. "note": ""
    86. },
    87. {
    88. "id": "50008897",
    89. "pid": "16",
    90. "root_id": "16",
    91. "name": "西装",
    92. "note": ""
    93. },
    94. {
    95. "id": "50008898",
    96. "pid": "16",
    97. "root_id": "16",
    98. "name": "卫衣/绒衫",
    99. "note": ""
    100. },
    101. {
    102. "id": "50008899",
    103. "pid": "16",
    104. "root_id": "16",
    105. "name": "羽绒服",
    106. "note": ""
    107. },
    108. {
    109. "id": "50008900",
    110. "pid": "16",
    111. "root_id": "16",
    112. "name": "棉衣/棉服",
    113. "note": ""
    114. },
    115. {
    116. "id": "50008901",
    117. "pid": "16",
    118. "root_id": "16",
    119. "name": "风衣",
    120. "note": ""
    121. },
    122. {
    123. "id": "50008904",
    124. "pid": "16",
    125. "root_id": "16",
    126. "name": "皮衣",
    127. "note": ""
    128. },
    129. {
    130. "id": "50008905",
    131. "pid": "16",
    132. "root_id": "16",
    133. "name": "皮草",
    134. "note": ""
    135. },
    136. {
    137. "id": "50008906",
    138. "pid": "16",
    139. "root_id": "16",
    140. "name": "唐装/民族服装/舞台服装",
    141. "note": ""
    142. },
    143. {
    144. "id": "50010850",
    145. "pid": "16",
    146. "root_id": "16",
    147. "name": "连衣裙",
    148. "note": ""
    149. },
    150. {
    151. "id": "50011277",
    152. "pid": "16",
    153. "root_id": "16",
    154. "name": "短外套",
    155. "note": ""
    156. },
    157. {
    158. "id": "50011404",
    159. "pid": "16",
    160. "root_id": "16",
    161. "name": "婚纱/旗袍/礼服",
    162. "note": ""
    163. },
    164. {
    165. "id": "50013194",
    166. "pid": "16",
    167. "root_id": "16",
    168. "name": "毛呢外套",
    169. "note": ""
    170. },
    171. {
    172. "id": "50013196",
    173. "pid": "16",
    174. "root_id": "16",
    175. "name": "马夹",
    176. "note": ""
    177. },
    178. {
    179. "id": "121412004",
    180. "pid": "16",
    181. "root_id": "16",
    182. "name": "背心吊带",
    183. "note": ""
    184. },
    185. {
    186. "id": "121434004",
    187. "pid": "16",
    188. "root_id": "16",
    189. "name": "抹胸",
    190. "note": ""
    191. },
    192. {
    193. "id": "201241307",
    194. "pid": "16",
    195. "root_id": "16",
    196. "name": "POLO衫",
    197. "note": ""
    198. },
    199. {
    200. "id": "201247207",
    201. "pid": "16",
    202. "root_id": "16",
    203. "name": "连体衣/裤",
    204. "note": ""
    205. }
    206. ]
    207. }
    208. ]
    209. },
    210. "translate_status": "",
    211. "translate_time": 0,
    212. "language": {
    213. "default_lang": "cn",
    214. "current_lang": "cn"
    215. },
    216. "error": "",
    217. "reason": "",
    218. "error_code": "0000",
    219. "cache": 0,
    220. "api_info": "today:62 max:10100 all[94=62+10+22];expires:2030-12-31",
    221. "execution_time": "0.061",
    222. "server_time": "Beijing/2022-08-01 11:10:24",
    223. "client_ip": "106.6.35.126",
    224. "call_args": [],
    225. "api_type": "taobao",
    226. "translate_language": "zh-CN",
    227. "translate_engine": "google_new",
    228. "server_memory": "0.84MB",
    229. "request_id": "gw-4.62e74420cbe7d",
    230. "last_id": "1119753219"
    231. }

    异常示例

    三、错误码解释

    状态代码(error_code)状态信息详细描述是否收费
    0000success接口调用成功并返回相关数据
    2000Search success but no result接口访问成功,但是搜索没有结果
    4000Server internal error服务器内部错误
    4001Network error网络错误
    4002Target server error目标服务器错误
    4003Param error用户输入参数错误忽略
    4004Account not found用户帐号不存在忽略
    4005Invalid authentication credentials授权失败忽略
    4006API stopped您的当前API已停用忽略
    4007Account stopped您的账户已停用忽略
    4008API rate limit exceeded并发已达上限忽略
    4009API maintenanceAPI维护中忽略
    4010API not found with these valuesAPI不存在忽略
    4012Please add api first请先添加api忽略
    4013Number of calls exceeded调用次数超限忽略
    4014Missing url param参数缺失忽略
    4015Wrong pageToken参数pageToken有误忽略
    4016Insufficient balance余额不足忽略
    4017timeout error请求超时
    5000unknown error未知错误
  • 相关阅读:
    JS重启自动运行加载视频错误
    英语写作中“展示”、“表明”demonstrate、show、indicate、illustrate的用法
    音视频入门基础:H.264专题(5)——FFmpeg源码中 解析NALU Header的函数分析
    windows 电脑删除不了.TTF的文件
    es6语法import()的使用
    《卡拉马佐夫兄弟》人物表
    FFmpeg入门详解之55:把控FFmpeg骨架:“八大金刚”核心开发库
    【Python】《Python编程:从入门到实践 (第2版) 》笔记-汇总
    2024年阿里巴巴后端开发校招面试真题汇总及其讲解(一)
    [QML]事无巨细开始实践QML开发(一)什么是QML,为什么学习QML,先写一个简单的页面
  • 原文地址:https://blog.csdn.net/Noah_ZX/article/details/126097352