# 京东 JD.com 商品价格 API (jd.product_price)

- Canonical page: [https://everyinfra.com/jd-api/product_price](https://everyinfra.com/jd-api/product_price?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "jd", "action": "product_price", "params": {...}}
- Price: $0.005556 per call ($5.56 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` 读取一个京东商品当前的公开价格和可售状态，只返回一个对象：价格 `price`、币种 `currency`、是否可售 `available`，不可售时还有京东页面给出的原因 `unavailable_reason`。它回答「这个商品现在卖多少钱、能不能买」，适合价格监控，或者在整理选品名单时筛掉已经缺货的商品。

`price` 是不带货币符号的数值，币种看 `currency`；`price` 有值而 `currency` 为 null 时，不要假定币种。查到的是公开页面上的价格，不是某个买家的个人结算价。

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| item_id | not declared | yes | not declared | 京东商品数字 ID，或不带 query/fragment 的 https://item.jd.com/<数字>.html；只返回该商品的价格与可售状态。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| item_id | 京东商品数字 ID；search 可把它直接交给详情、评价或价格能力。 |
| url | 该记录在原平台上的可访问链接。 |
| price | 价格数值，不含货币符号；币种见 currency。 |
| currency | 价格币种代码（如 CNY、USD）。price 存在但 currency 为 null 时不要假定币种。 |
| available | 采集时是否可售（product_detail、product_price、shop 的商品行）；缺货时为 false，null 表示页面没给。 |
| unavailable_reason | 不可售时京东页面给出的公开原因。 |
| 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_price",
  "params": {
    "item_id": "100012043978"
  }
}'
```

```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_price",
        "params": {
            "item_id": "100012043978",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-11-07T14:47:42Z. `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_price",
  "results": {
    "item_id": "100012043978",
    "url": "https://item.jd.com/100012043978.html",
    "price": 1699,
    "currency": "CNY",
    "available": true,
    "platform": "jd"
  },
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### `item_id` 可以怎么填？

填京东商品的数字 ID，或者不带 query 和 fragment 的商品链接 https://item.jd.com/<数字>.html。链接后面带了问号参数或 # 片段时，先去掉再填。这一页只返回这个商品的价格与可售状态，不返回其他信息。

### `available` 的 false 和 null 有什么区别？

false 表示采集时不可售，缺货就属于这种情况；null 表示京东页面没有给出可售信息，不能把 null 当成缺货。商品不可售时，`unavailable_reason` 给出京东页面公开的原因；做补货提醒，只对 false 的商品跟踪它。

### 想一次看一家店里很多商品的价格怎么办？

用店铺资料那一页，传店铺 ID，一次最多 24 条，每行也带价格、币种和是否可售。这一页只查单个商品，但独有 `unavailable_reason`，店铺资料没有它。两页配合：先从店铺里挑出商品，再逐个用这一页查缺货原因。

## 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
