• 淘宝/天猫淘宝评论问答列表接口 API


    一、参数

    公共参数

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

    名称类型必须描述
    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版本

    请求参数

    请求参数:num_iid=632521829807&page=1

    参数说明:num_iid:商品ID
    page:页码

    响应参数

    Version: Date:

    名称类型必须示例值描述

    item

    item[]0淘宝评论问答列表接口

    num_iid

    Bigint0520813250866宝贝ID

    title

    String0三刃木折叠刀过安检创意迷你钥匙扣钥匙刀军刀随身多功能小刀包邮宝贝标题

    pic_url

    String0//gd2.alicdn.com/imgextra/i4/2596264565/TB2p30elFXXXXXQXpXXXXXXXXXX_!!2596264565.jpg宝贝图片

    total_question

    Int019问题数

    page_size

    Int05页码数

    item_question

    item_question[]0问答信息


    二、示例

    请求示例

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

      前往获取key和secret

    响应示例

    1. {
    2. "num_iid": "520813250866",
    3. "title": "三刃木折叠刀过安检创意迷你钥匙扣钥匙刀军刀随身多功能小刀包邮",
    4. "pic_url": "https://gw.alicdn.com/tfscom/tuitui/i4/2596264565/O1CN01mbmuAB1jaogMUWhv8_!!2596264565.jpg",
    5. "total_question": "19",
    6. "page_size": 5,
    7. "item_question": [
    8. {
    9. "id": "293305609635",
    10. "question_title": "坐飞机,高铁能过安检不",
    11. "detail_url": "https://market.m.taobao.com/app/mtb/questions-and-answers/pages/detail/index.html?from=answer&spm=a3134.14087530&id=293305609635",
    12. "total_answer": "2",
    13. "creat_time": "2020-12-31",
    14. "answer_info": {
    15. "id": "293007420174",
    16. "answer_title": "还没试过,不知道。",
    17. "answer_time": "2020-12-31",
    18. "nick": "听**雪",
    19. "user_logo": "https://wwc.alicdn.com/avatar/getAvatar.do?type=sns&width=64&height=64&userIdStr=M0xLPm84XFhhXHg4OFkSMmQYMCMIPCh-vkPhOH8SMFgT"
    20. }
    21. },
    22. {
    23. "id": "258412350572",
    24. "question_title": "小刀打开后有锁吗",
    25. "detail_url": "https://market.m.taobao.com/app/mtb/questions-and-answers/pages/detail/index.html?from=answer&spm=a3134.14087530&id=258412350572",
    26. "total_answer": "4",
    27. "creat_time": "2020-04-02",
    28. "answer_info": {
    29. "id": "258440602228",
    30. "answer_title": "没有锁,但质量不错。",
    31. "answer_time": "2020-04-03",
    32. "nick": "风**7",
    33. "user_logo": "https://wwc.alicdn.com/avatar/getAvatar.do?type=sns&width=64&height=64&userIdStr=M87-v07eM8lIvmRzO8*-vm*hv0kbPkl-MCxWMHkyPmIT"
    34. }
    35. },
    36. {
    37. "id": "90487630398",
    38. "question_title": "链子容易断吗?",
    39. "detail_url": "https://market.m.taobao.com/app/mtb/questions-and-answers/pages/detail/index.html?from=answer&spm=a3134.14087530&id=90487630398",
    40. "total_answer": "5",
    41. "creat_time": "2017-07-01",
    42. "answer_info": {
    43. "id": "90491346914",
    44. "answer_title": "可能会断,你可以换别的挂啊!",
    45. "answer_time": "2017-07-02",
    46. "nick": "s**堂",
    47. "user_logo": "https://wwc.alicdn.com/avatar/getAvatar.do?type=sns&width=64&height=64&userIdStr=X8ZIMH*zMkk4MFkWO8Z-PFvWM8xYvGI4vG8Gv0cLPmNT"
    48. }
    49. },
    50. {
    51. "id": "98809187447",
    52. "question_title": "能过航空安检吗",
    53. "detail_url": "https://market.m.taobao.com/app/mtb/questions-and-answers/pages/detail/index.html?from=answer&spm=a3134.14087530&id=98809187447",
    54. "total_answer": "5",
    55. "creat_time": "2018-04-17",
    56. "answer_info": {
    57. "id": "98818756863",
    58. "answer_title": "航空就免了,毕竟是把刀,G20峰会时候我大拇指那么短的刀刃连汽车站都过不去!",
    59. "answer_time": "2018-04-17",
    60. "nick": "幻***",
    61. "user_logo": "https://wwc.alicdn.com/avatar/getAvatar.do?type=sns&width=64&height=64&userIdStr=MmPeO8kLvm8YXm*zMm*eO8c0vFQbv0cSXF-IOmMzvGQT"
    62. }
    63. },
    64. {
    65. "id": "90566746631",
    66. "question_title": "请问这个刀片是可以一按就弹出来,还是要拔出来的丫",
    67. "detail_url": "https://market.m.taobao.com/app/mtb/questions-and-answers/pages/detail/index.html?from=answer&spm=a3134.14087530&id=90566746631",
    68. "total_answer": "4",
    69. "creat_time": "2017-07-13",
    70. "answer_info": {
    71. "id": "90567311785",
    72. "answer_title": "是拔出来的 不能弹出来",
    73. "answer_time": "2017-07-13",
    74. "nick": "成**宝",
    75. "user_logo": "https://wwc.alicdn.com/avatar/getAvatar.do?type=sns&width=64&height=64&userIdStr=P8cGvCIyMGIYO8QWP0kWvmcbMFxbvC*-Omk0X8xWvGkT"
    76. }
    77. }
    78. ],
    79. "data_from": "app",
    80. "error": "",
    81. "reason": "",
    82. "error_code": "0000",
    83. "cache": 0,
    84. "api_info": "today:34 max:10000",
    85. "execution_time": 0.598,
    86. "server_time": "Beijing/2021-04-22 15:57:27",
    87. "client_ip": "106.6.32.155",
    88. "call_args": [],
    89. "api_type": "taobao",
    90. "translate_language": "zh-CN",
    91. "translate_engine": "google_cn",
    92. "server_memory": "6.9MB",
    93. "request_id": "gw-2.60812c66f2f0c"
    94. }

    异常示例

    1. {
    2. "error": "item-not-found",
    3. "reason": "商品没找到",
    4. "error_code": "2000",
    5. "success": 0,
    6. "cache": 0,
    7. "api_info": "today:0 max:10000",
    8. "execution_time": 0.081,
    9. "server_time": "Beijing/2020-06-10 23:44:00",
    10. "call_args": [],
    11. "api_type": "taobao",
    12. "request_id": "15ee0ffc041242"}

    三、错误码解释

    状态代码(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未知错误
  • 相关阅读:
    【LaTex】 - 对齐符号&的用法,换行符\\的用法,Misplaced &错误怎么解决
    期末作业C#实现学生宿舍管理系统
    捕捉数组越界访问问题
    ucos II 操作系统
    【机器学习】机器学习重要分支——强化学习:从理论到实践
    Java实现byte数组与Hex互转
    【Network】网络基础@应用层 —— 协议 | http | https
    Java Day2(Java基础语法)
    让Python更优雅更易理解
    【算法设计与分析】— —基础概念题(one)可作为日常联系或期末复习
  • 原文地址:https://blog.csdn.net/Noah_ZX/article/details/126068004