# 京东 JD.com 商品详情 API (jd.product_detail)

- Canonical page: [https://everyinfra.com/jd-api/product_detail](https://everyinfra.com/jd-api/product_detail?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "jd", "action": "product_detail", "params": {...}}
- Price: $0.002444 per call ($2.44 per 1,000 requests); failed calls and empty results are not charged
- Returns: single object
- Mode: sync; add "mode": "async" for slow tasks

京东商品详情按 `item_id` 读取一件京东商品：标题、品牌与型号、价格与原价、可售状态、库存状态、全部商品图、规格变体、条码、产地、保修说明，以及店铺、是否自营、是否京东物流配送。它回答「这件商品现在卖多少、能不能买、由谁发货」，适合价格监测、竞品参数整理和商品库补全。

`item_id` 填商品数字 ID，或不带参数的 item.jd.com 数字商品页链接，新式的不透明商品链接不接受。读价格前先看 `price_masked`：京东会因登录或会员条件遮罩价格，为真时 `price_display` 不能当精确成交价。`available` 和 `unavailable_reason` 说明当前是否可售。

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=jd&action=product_detail

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| item_id | not declared | yes | not declared | 京东商品数字 ID，或不带 query/fragment 的 https://item.jd.com/<数字>.html；不接受 /product/<opaque>.html 等新式不透明链接。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| item_id | 京东商品数字 ID；search 可把它直接交给详情、评价或价格能力。 |
| url | 该记录在原平台上的可访问链接。 |
| title | 标题。平台无标题概念时（如纯文本帖）为 null。 |
| price | 价格数值，不含货币符号；币种见 currency。 |
| price_display | 京东页面显示的价格原文；可能因登录或会员条件被遮罩。 |
| price_masked | 详情页价格是否被京东遮罩；为 true 时不要把 price_display 当精确成交价。 |
| currency | 价格币种代码（如 CNY、USD）。price 存在但 currency 为 null 时不要假定币种。 |
| available | 采集时是否可售（product_detail、product_price、shop 的商品行）；缺货时为 false，null 表示页面没给。 |
| unavailable_reason | 不可售时京东页面给出的公开原因。 |
| shop_id | 京东店铺数字 ID。 |
| shop_name | 公开店铺名称。 |
| shop_url | 京东店铺公开页面。 |
| category_id | 商品所在的京东末级类目 ID（product_detail）。 |
| category | 分类名称，取值为原平台的分类体系，未做跨平台归一。 |
| stock | 京东页面公开的库存数量；null 表示页面没给，不是 0。 |
| stock_state | 京东公开的库存状态码。 |
| color | 京东页面上这个 SKU 的颜色（或外观）属性值。 |
| size | 京东页面上这个 SKU 的尺码、容量或规格属性值。 |
| weight | 京东页面上的商品重量原文（product_detail）；null 表示页面没写。 |
| image_url | 图片链接：search、product_detail、shop、skus 里是商品主图（封面）；description_images 里是这一行的那张详情图（京东图床的 https 原图）。 |
| image_urls | 商品图集链接列表（含主图，按京东页面上的顺序）；单数 image_url 是其中第一张。京东「商品介绍」区的详情长图不在这里，用 description_images 另取。 |
| is_jd_self | 是否为京东自营商品。 |
| brand | 商品品牌。 |
| model | 商品型号。 |
| original_price | 京东展示的原价；null 表示页面未提供，可能与促销后的 price 不同。 |
| upc | 商品条码（UPC/EAN）；null 表示页面未提供。 |
| warranty | 保修说明原文。 |
| product_area | 产地。 |
| is_jd_express | 是否由京东物流配送。 |
| variant_count | 变体（SKU）数量；null 表示无变体或未提供。skus 的每一行都带同一个值：它大于本次返回的行数时，说明被 limit 截断或有 SKU 这次没取到。 |
| variants | 变体列表，每项含名称、SKU、价格、库存状态等；null 表示无变体或未提供。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "jd",
  "action": "product_detail",
  "params": {
    "item_id": "https://item.jd.com/100012043978.html"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "jd",
        "action": "product_detail",
        "params": {
            "item_id": "https://item.jd.com/100012043978.html",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-10-24T18:28:34Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "jd",
  "action": "product_detail",
  "results": {
    "item_id": "100012043978",
    "url": "https://item.jd.com/100012043978.html",
    "title": "茅台飞天 53%vol 500ml 贵州茅台酒（带杯）【需预约购买】",
    "price": 1041,
    "price_display": "1??9",
    "currency": "CNY",
    "available": false,
    "shop_id": "1000475228",
    "shop_name": "贵州茅台",
    "shop_url": "https://mall.jd.com/index-1000475228.html",
    "category_id": "9435",
    "stock": 156,
    "stock_state": "out_of_stock",
    "color": "1759(需预约)",
    "size": "单瓶装",
    "weight": "1.1kg",
    "image_url": "https://img14.360buyimg.com/n1/jfs/t1/498128/6/14354/78100/6a8678aeFd76e6a0c/008332032059c4fa.jpg",
    "image_urls": [
      "https://img14.360buyimg.com/n1/jfs/t1/498128/6/14354/78100/6a8678aeFd76e6a0c/008332032059c4fa.jpg",
      "https://img14.360buyimg.com/n1/jfs/t1/442358/22/5618/62044/6a17b873F63dd4c14/00833203206f6884.jpg",
      "https://img14.360buyimg.com/n1/jfs/t1/538344/32/1045/88182/6aba0a86F8862dac1/00833203209ef461.jpg"
    ],
    "brand": "茅台",
    "model": "白酒",
    "original_price": 1041,
    "upc": "•••;•••",
    "warranty": "无质保",
    "product_area": "贵州仁怀",
    "is_jd_express": false,
    "variant_count": 9,
    "variants": [
      {
        "sku_id": "100278756721",
        "image_url": "https://img14.360buyimg.com/n1/jfs/t1/442358/22/5618/62044/6a17b873F63dd4c14/00833203206f6884.jpg"
      },
      {
        "sku_id": "100153291833",
        "image_url": "https://img14.360buyimg.com/n1/jfs/t1/538344/32/1045/88182/6aba0a86F8862dac1/00833203209ef461.jpg"
      },
      {
        "sku_id": "100371797016",
        "image_url": "https://img14.360buyimg.com/n1/jfs/t1/545564/17/1981/187886/6accddbdFb7d949e4/0083320320d24f2b.png"
      }
    ],
    "platform": "jd"
  },
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### `item_id` 能填哪些格式？

填京东商品数字 ID，或不带查询参数和锚点的 https://item.jd.com/<数字>.html。/product/ 开头的新式不透明链接不接受；京东搜索结果里的 `item_id` 可以直接用。

### 为什么有的价格显示不出来？

京东会因登录或会员条件遮罩详情页价格。`price_masked` 为真时，`price_display` 是页面显示的原文，不要当成精确成交价；监测价格时把这类记录单独标出来。

### 商品下架或缺货怎么判断？

看 `available`，它是当前的可售状态，不可售时 `unavailable_reason` 给出京东页面上的原因；`stock_state` 是京东公开的库存状态码，可以一起存下来看变化。

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=jd
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
