京东提供了获取JD商品详情原数据的API接口,具体如下:
公共参数
请求地址:前往测试
公共参数
名称 | 类型 | 必须 | 描述 |
---|---|---|---|
key | String | 是 | 调用key(必须以GET方式拼接在URL中) |
secret | String | 是 | 调用密钥 |
api_name | String | 是 | API接口名称(包括在请求地址中)[item_search,item_get,item_search_shop等] |
cache | String | 否 | [yes,no]默认yes,将调用缓存的数据,速度比较快 |
result_type | String | 否 | [json,jsonu,xml,serialize,var_export]返回数据格式,默认为json,jsonu输出的内容中文可以直接阅读 |
lang | String | 否 | [cn,en,ru]翻译语言,默认cn简体中文 |
version | String | 否 | API版本 |
请求参数
请求参数:num_iid=10335871600
参数说明:item_id:商品ID
响应参数
Version: Date:
名称 | 类型 | 必须 | 示例值 | 描述 |
---|---|---|---|---|
items | item[] | 0 | 获得京东app商品详情原数据 |
响应示例
{ "item": { "CommentsCount": [ { "AfterCount": 0, "AfterCountStr": "80+", "AverageScore": 5, "CommentCount": 0, "CommentCountStr": "2万+", "DefaultGoodCount": 0, "DefaultGoodCountStr": "2万+", "GeneralCount": 0, "GeneralCountStr": "60+", "GeneralRate": 0.021, "GeneralRateShow": 2, "GeneralRateStyle": 4, "GoodCount": 0, "GoodCountStr": "4800+", "GoodRate": 0.97, "GoodRateShow": 97, "GoodRateStyle": 145, "OneYear": 0, "PoorCount": 0, "PoorCountStr": "50+", "PoorRate": 0.009, "PoorRateShow": 1, "PoorRateStyle": 1, "ProductId": 100057758922, "SensitiveBook": 0, "ShowCount": 0, "ShowCountStr": "1200+", "SkuId": 100057758922, "VideoCount": 0, "VideoCountStr": "100+" } ], "addComments": true, "askDoctorUrl": "//pc.healthjd.com/?returnIframeUrl=https%3A%2F%2Fm.healthjd.com%2Fs%2FpreInquiryNew%3FdrugskuId%3D100057758922%26hy_entry%3DPCSXY_wenyisheng%26pageFrom%3DPCSkuDetailAskDoc", "brand": 413457, "cat": [ 9987, 653, 655 ], "catName": [ "手机通讯", "手机", "手机" ], "colorAPISwitch": true, "colorSize": [ { "image": "//img14.360buyimg.com/n9/s40x40_jfs/t1/92739/30/41715/75181/64b91d69Fe365f20e/c60bb0e93f6036fc.jpg", "skuId": 100056552738, "版本": "8GB+128GB", "颜色": "典雅黑" }, { "image": "//img14.360buyimg.com/n9/s40x40_jfs/t1/92739/30/41715/75181/64b91d69Fe365f20e/c60bb0e93f6036fc.jpg", "skuId": 100057758924, "版本": "8GB+256GB", "颜色": "典雅黑" }, { "image": "//img14.360buyimg.com/n9/s40x40_jfs/t1/92739/30/41715/75181/64b91d69Fe365f20e/c60bb0e93f6036fc.jpg", "skuId": 100057758908, "版本": "12GB+256GB", "颜色": "典雅黑" }, { "image": "//img14.360buyimg.com/n9/s40x40_jfs/t1/92739/30/41715/75181/64b91d69Fe365f20e/c60bb0e93f6036fc.jpg", "skuId": 100062298461, "版本": "16GB+512GB", "颜色": "典雅黑" }, { "image": "//img13.360buyimg.com/n9/s40x40_jfs/t1/109935/19/43575/72066/64b91d69F1666905a/f7eddc6110885fbb.jpg", "skuId": 100057334060, "版本": "8GB+128GB", "颜色": "雨后初晴" }, { "image": "//img13.360buyimg.com/n9/s40x40_jfs/t1/109935/19/43575/72066/64b91d69F1666905a/f7eddc6110885fbb.jpg", "skuId": 100062298483, "版本": "8GB+256GB", "颜色": "雨后初晴" }, { "image": "//img13.360buyimg.com/n9/s40x40_jfs/t1/109935/19/43575/72066/64b91d69F1666905a/f7eddc6110885fbb.jpg", "skuId": 100062298459, "版本": "12GB+256GB", "颜色": "雨后初晴" }, { "image": "//img13.360buyimg.com/n9/s40x40_jfs/t1/109935/19/43575/72066/64b91d69F1666905a/f7eddc6110885fbb.jpg", "skuId": 100057758888, "版本": "16GB+512GB", "颜色": "雨后初晴" }, { "image": "//img12.360buyimg.com/n9/s40x40_jfs/t1/214423/36/29896/82873/64b91d69F66988021/e3ca056dfcfb93a0.jpg", "skuId": 100062014247, "版本": "8GB+128GB", "颜色": "勃朗蓝" }, { "image": "//img12.360buyimg.com/n9/s40x40_jfs/t1/214423/36/29896/82873/64b91d69F66988021/e3ca056dfcfb93a0.jpg", "skuId": 100057758922, "版本": "8GB+256GB", "颜色": "勃朗蓝" }, { "image": "//img12.360buyimg.com/n9/s40x40_jfs/t1/214423/36/29896/82873/64b91d69F66988021/e3ca056dfcfb93a0.jpg", "skuId": 100057758904, "版本": "12GB+256GB", "颜色": "勃朗蓝" }, { "image": "//img12.360buyimg.com/n9/s40x40_jfs/t1/214423/36/29896/82873/64b91d69F66988021/e3ca056dfcfb93a0.jpg", "skuId": 100057758902, "版本": "16GB+512GB", "颜色": "勃朗蓝" }, { "image": "//img10.360buyimg.com/n9/s40x40_jfs/t1/165871/26/38073/92191/64b91d6bF06bdf771/ffeff8829b20759b.jpg", "skuId": 100057334122, "版本": "8GB+128GB", "颜色": "燃橙色" }, { "image": "//img10.360buyimg.com/n9/s40x40_jfs/t1/165871/26/38073/92191/64b91d6bF06bdf771/ffeff8829b20759b.jpg", "skuId": 100057758880, "版本": "8GB+256GB", "颜色": "燃橙色" }, { "image": "//img10.360buyimg.com/n9/s40x40_jfs/t1/165871/26/38073/92191/64b91d6bF06bdf771/ffeff8829b20759b.jpg", "skuId": 100057758906, "版本": "12GB+256GB", "颜色": "燃橙色" }, { "image": "//img10.360buyimg.com/n9/s40x40_jfs/t1/165871/26/38073/92191/64b91d6bF06bdf771/ffeff8829b20759b.jpg", "skuId": 100062298475, "版本": "16GB+512GB", "颜色": "燃橙色" } ], "desc": "//cd.jd.com/description/channel?skuId=100057758922&mainSkuId=100057758922&charset=utf-8&cdn=2<img src=\"https://www.o0b.cn/i.php?t.png&rid=3.64c0b8d772500&p=1939419520&k=i_key&t=1690351837\" style=\"display:none\" />", "easyBuyUrl": "//easybuy.jd.com/skuDetail/newSubmitEasybuyOrder.action", "expandAttrDesc": [ { "atts": [ { "attDictUrl": "", "attId": 14339, "attName": "CCC强制性认证", "attType": "0", "attVals": [ { "attValId": 67380, "attValName": "是", "attValueDefinition": "", "orderSort": 1 } ], "categoryGroupAttId": "217768", "inputType": 1, "sort": 6, "vals": [ "是" ] }, { "attDictUrl": "", "attId": 14340, "attName": "电信设备进网许可证", "attType": "0", "attVals": [ { "attValId": 67380, "attValName": "是", "attValueDefinition": "", "orderSort": 1 } ], "categoryGroupAttId": "217780", "inputType": 1, "sort": 7, "vals": [ "是" ] }, { "attDictUrl": "", "attId": 3055, "attName": "上市日期", "attType": "0", "attVals": [ { "attValName": "2023-07-05" } ],
异常示例
{ "error": "item-not-found", "reason": "item-not-found 接口文档:https://open.onebound.cn/help/api/jd.item_get_app.html", "error_code": "2000", "api_info": "today:1 max:11000", "execution_time": "0.898", "server_time": "Beijing/2022-04-10 09:14:13", "client_ip": "106.6.32.222", "api_type": "jd", "translate_language": "zh-CN", "translate_engine": "google_new", "server_memory": "3.36MB", "request_id": "gw-1.62522f64332a5"}
相关资料
错误码解释
状态代码(error_code) | 状态信息 | 详细描述 | 是否收费 |
---|---|---|---|
0000 | success | 接口调用成功并返回相关数据 | 是 |
2000 | Search success but no result | 接口访问成功,但是搜索没有结果 | 是 |
4000 | Server internal error | 服务器内部错误 | 否 |
4001 | Network error | 网络错误 | 否 |
4002 | Target server error | 目标服务器错误 | 否 |
4003 | Param error | 用户输入参数错误 | 忽略 |
4004 | Account not found | 用户帐号不存在 | 忽略 |
4005 | Invalid authentication credentials | 授权失败 | 忽略 |
4006 | API stopped | 您的当前API已停用 | 忽略 |
4007 | Account stopped | 您的账户已停用 | 忽略 |
4008 | API rate limit exceeded | 并发已达上限 | 忽略 |
4009 | API maintenance | API维护中 | 忽略 |
4010 | API not found with these values | API不存在 | 忽略 |
4012 | Please add api first | 请先添加api | 忽略 |
4013 | Number of calls exceeded | 调用次数超限 | 忽略 |
4014 | Missing url param | 参数缺失 | 忽略 |
4015 | Wrong pageToken | 参数pageToken有误 | 忽略 |
4016 | Insufficient balance | 余额不足 | 忽略 |
4017 | timeout error | 请求超时 | 否 |
5000 | unknown error | 未知错误 | 否 |