# 京东 JD.com 问题下的回答 API (jd.question_answers)

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

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| item_id | not declared | yes | not declared | 问题所在商品的京东数字 ID，或不带 query/fragment 的 https://item.jd.com/<数字>.html；和取问答时的 item_id 一样。 |
| question_id | not declared | yes | not declared | 问题编号，即 questions 返回行的 id（一串数字）。返回这个问题下京东给的全部商家回答，一次给全、不翻页；seller_answer_count 是 0 的问题返回空结果，不扣费。写法不对时返回 422，不扣费。 |
| limit | integer (1–) | no | not declared | 正整数（≥1），本次最多返回的条数：不传则返回本次取到的全部结果，传了只把结果截短到这个条数以内，不会多取，也不会变多。扣费不受 `limit` 影响。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| question_id | 问题编号（question_answers），和请求的 question_id 一致；即 questions 返回行的 id。 |
| item_id | 京东商品数字 ID；search 可把它直接交给详情、评价或价格能力。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| posted_date | 发布日期（questions、question_answers，YYYY-MM-DD）：京东只给到天，不给时分。 |
| author_name | 评价人昵称，按京东页面原样返回（京东可能已部分打码）；questions 里是提问人和回答人的昵称（京东打码后的原样），question_answers 里是京东给回答方的称呼，多是「供应商回答」。 |
| author_type | 回答方类型码（question_answers），京东给的数字；实测 5 是供应商（商家）。 |
| like_count | 点赞数（questions 的 answers、question_answers）。 |
| 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": "question_answers",
  "params": {
    "item_id": "100270865468",
    "question_id": "166721745"
  }
}'
```

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

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "jd",
  "action": "question_answers",
  "results": [
    {
      "id": …,
      "question_id": …,
      "item_id": …,
      "text": …,
      "posted_date": …,
      "author_name": …,
      "author_type": …,
      "like_count": …,
      "platform": …
    }
  ],
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

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