• 京东获取商品历史价格信息 API


    一、参数

    公共参数

    请求地址: 

    https://api-gw.onebound.cn/jd/item_history_price

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

    参数说明:num_iid:商品id

    响应参数

    名称类型是否隐私示例值描述
    itemsitems[]获取商品历史价格信息
    num_iidBigint63153022346宝贝ID
    titleString安踏女鞋跑步鞋女2020冬季新品轻便跑鞋皮面防泼水运动鞋子休闲鞋官方旗舰网店女子运动鞋子 (革面)藕灰-2 6.5(女37.5)商品标题
    detail_urlStringhttps://item.jd.com/63153022346.html宝贝链接
    pic_urlString宝贝图片
    lower_priceFloat107.0最低价
    lower_dateString2020-12-22最低价日期
    current_priceFloat134.01当前价
    change_price_remarkString
    itemMix{"date": "2020-06-25", "price": "159", "discount": "",}价格信息


    二、示例

    请求示例

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

      前往获取key和secret

    响应示例

    1. {
    2. "items": {
    3. "num_iid": "63153022346",
    4. "title": "京东商城安踏女鞋跑步鞋女2020冬季新品轻便跑鞋皮面运动鞋子休闲鞋官方旗舰网店女子运动鞋子 (革面)藕灰-2 8.5(女40)",
    5. "detail_url": "https://item.jd.com/63153022346.html",
    6. "pic_url": "",
    7. "lower_price": "",
    8. "lower_date": "",
    9. "current_price": "",
    10. "change_price_remark": "",
    11. "item": [
    12. {
    13. "date": "2021-02-24",
    14. "price": "159.01",
    15. "discount": ""
    16. },
    17. {
    18. "date": "2021-02-25",
    19. "price": "159.01",
    20. "discount": ""
    21. },
    22. {
    23. "date": "2021-02-26",
    24. "price": "159.01",
    25. "discount": ""
    26. },
    27. {
    28. "date": "2021-02-27",
    29. "price": "159.01",
    30. "discount": ""
    31. },
    32. {
    33. "date": "2021-02-28",
    34. "price": "159.01",
    35. "discount": ""
    36. },
    37. {
    38. "date": "2021-03-01",
    39. "price": "159.01",
    40. "discount": ""
    41. },
    42. {
    43. "date": "2021-03-02",
    44. "price": "159.01",
    45. "discount": ""
    46. },
    47. {
    48. "date": "2021-03-03",
    49. "price": "159.01",
    50. "discount": ""
    51. }
    52. ],
    53. "data_from": "p_zwjhl"
    54. },
    55. "error": "",
    56. "reason": "",
    57. "error_code": "0000",
    58. "cache": 0,
    59. "api_info": "today:15 max:10000",
    60. "execution_time": 0.682,
    61. "server_time": "Beijing/2021-03-10 16:34:02",
    62. "client_ip": "106.6.35.144",
    63. "call_args": [],
    64. "api_type": "jd",
    65. "translate_language": "zh-CN",
    66. "translate_engine": "google_cn",
    67. "server_memory": "3.11MB",
    68. "request_id": "gw-1.6048847a39f60"
    69. }

    异常示例

    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未知错误
  • 相关阅读:
    Python算法例7 四数乘积
    Linux文件打包及压缩、解包及解压
    2023年第二届HiPChips解读
    4.MidBook项目经验之MonogoDB和easyExcel导入导出
    Eclipse ADT常用快捷键
    Worthington公司有关白蛋白,无核酸酶的分子特征
    旅游网页设计 web前端大作业 全球旅游私人订制 旅游公司网站模板(HTML+CSS+JavaScript)
    结合组件库实现table组件树状数据的增删改
    字符串思维题练习 DAY5(CF1137 B , CF 733D , CF 1360 F)
    nodejs 不支持 atob、btoa解决方案(Base64加解密、base64与uint8array转换)
  • 原文地址:https://blog.csdn.net/Noah_ZX/article/details/126081904