京东商品详情 API 完整解析 + 标准 JSON 返回示例
# 本文以京东联盟开放接口 **jd.union.open.goods.detail.query** 为例,完整说明接口结构、字段含义、业务用途,并提供可直接用于开发调试的标准 JSON 返回示例。 --- ## 一、接口基本信息 - 接口名称:`jd.union.open.goods.detail.query` - 请求方式:POST - 数据格式:JSON - 身份校验:`appKey + appSecret` 签名 - 必传参数:`skuId`(京东商品 ID) - 适用场景:商品采集、铺货搬家、价格监控、导购分销、ERP 同步、选品分析 --- ## 二、标准 JSON 成功返回示例(完整版) ``` { "jd_union_open_goods_detail_query_response": { "code": "0", "msg": "success", "requestId": "req_2026071600123456", "result": { "goodsInfo": { "skuId": "100012345678", "title": "2026新款夏季纯棉短袖T恤宽松百搭男女同款上衣", "brandName": "XX品牌", "categoryName": "服饰内衣 > 男装 > T恤", "shopName": "XX官方旗舰店", "shopType": "third", "isJdSelf": false, "itemUrl": "https://item.jd.com/100012345678.html", "priceInfo": { "originalPrice": "99.00", "discountPrice": "59.00" }, "couponInfo": { "hasCoupon": true, "couponDiscount": "10.00", "finalPrice": "49.00", "couponDesc": "满59减10元" }, "commissionInfo": { "commissionRate": "10.00", "commissionMoney": "4.90" }, "salesInfo": { "totalSales": 12580, "monthSales": 3210 }, "stockInfo": { "totalStock": 950, "isSale": true }, "imageInfo": { "mainImg": "https://img10.360buyimg.com/xxx/main.jpg", "detailImgList": [ "https://img10.360buyimg.com/xxx/d1.jpg", "https://img10.360buyimg.com/xxx/d2.jpg" ] }, "skuList": [ { "skuId": "10001234567801", "specText": "白色 M", "skuPrice": "59.00", "skuStock": 320 }, { "skuId": "10001234567802", "specText": "黑色 XL", "skuPrice": "59.00", "skuStock": 285 } ], "productParams": [ { "name": "面料", "value": "100%棉" }, { "name": "版型", "value": "宽松型" }, { "name": "适用季节", "value": "夏季" } ], "commentSummary": { "goodRateShow": "97.2", "commentCount": 1860, "goodCount": 1780, "generalCount": 50, "poorCount": 30 } } } } } ``` --- ## 三、顶层结构解析 - `code`:返回状态码,`0` 表示成功 - `msg`:返回信息说明 - `requestId`:请求唯一标识,用于排查问题 - `result.goodsInfo`:商品详情核心数据体 --- ## 四、核心业务字段详解 ### 1. 商品基础信息 - `skuId`:商品唯一 ID - `title`:商品标题 - `brandName`:品牌名称 - `categoryName`:类目名称 - `shopName`:店铺名称 - `isJdSelf`:是否京东自营 - `itemUrl`:商品详情页链接 ### 2. 价格体系(比价 / 导购核心) - `originalPrice`:原价 - `discountPrice`:京东当前售价 - `couponInfo.hasCoupon`:是否有券 - `couponDiscount`:优惠金额 - `finalPrice`:券后到手价 ### 3. 佣金信息(CPS 分销核心) - `commissionRate`:佣金比例 - `commissionMoney`:预估佣金 ### 4. 销量与库存(铺货 / ERP 核心) - `totalSales`:总销量 - `monthSales`:近 30 天销量 - `totalStock`:总库存 - `isSale`:是否可售 ### 5. 图片素材(商品搬家 / 建站必备) - `mainImg`:商品主图 - `detailImgList`:详情图列表 ### 6. SKU 规格(多规格商品必解析) - `skuId`:子规格 ID - `specText`:规格名称(颜色 + 尺码) - `skuPrice`:规格单价 - `skuStock`:规格库存 ### 7. 商品参数(详情展示 / 参数对比) - `name`:参数名称 - `value`:参数值 ### 8. 评价概况(选品 / 口碑分析) - `goodRateShow`:好评率 - `commentCount`:总评论数 - `goodCount` / `generalCount` / `poorCount`:好评 / 中评 / 差评数量 --- ## 五、常见异常 JSON 示例 ### 1. skuId 不存在或商品已下架 ``` { "jd_union_open_goods_detail_query_response": { "code": "400", "msg": "skuId不存在或商品已下架", "requestId": "req_2026071600112233" } } ``` ### 2. 签名错误 ``` { "jd_union_open_goods_detail_query_response": { "code": "15", "msg": "签名校验失败", "requestId": "req_2026071600114455" } } ``` ### 3. 请求频率超限(限流) ``` { "jd_union_open_goods_detail_query_response": { "code": "429", "msg": "请求过于频繁,请稍后重试", "requestId": "req_2026071600116677" } } ``` --- ## 六、开发注意要点 1. 价格字段均为字符串,计算时需转为数字类型 1. `skuList`、`detailImgList`、`productParams` 可能为空数组,必须做判空处理 1. 库存存在延迟,高并发下单建议在下单前再次实时校验 1. 批量采集建议使用分级轮询,避免触发限流 1. 商品图片为京东 CDN 地址,可直接展示使用