差在哪
这个平台上还有 1 个接口卖的数据和它差不多。目录里写的差别:
| 接口 | 每条 | 每页最低 | 每页条数 | 能用 cursor 翻页 | 参数 | 字段数 |
|---|---|---|---|---|---|---|
| /v1/jd-search/search | $0.0046 | $0.026787 | 30 | 是 | keywords | 19 |
| /v1/jd/search | $0.0046 | $0.027319 | 10 | 是 | keywords | 19 |
怎么发
用 POST 带 JSON 请求体,或者用 GET 把同样的参数放进查询串。key 放在 Authorization 头里。
curl -X POST "https://api.silklinedata.com/v1/jd-search/search" \
-H "Authorization: Bearer $SILKLINE_KEY" \
-H "Content-Type: application/json" \
-d '{"limit":5,"keywords":["手机"]}'import os, requests
response = requests.post(
"https://api.silklinedata.com/v1/jd-search/search",
headers={"Authorization": "Bearer " + os.environ["SILKLINE_KEY"]},
json={
"limit": 5,
"keywords": ["手机"],
},
)
answer = response.json()
print(answer["data"], answer["meta"]["charged_usd"])const response = await fetch("https://api.silklinedata.com/v1/jd-search/search", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.SILKLINE_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"limit": 5,
"keywords": [
"手机"
]
}),
});
const { data, cursor, meta } = await response.json();
console.log(data, meta.charged_usd);返回什么
这是 2026-11-03 一次真实请求返回的记录。普通用户的名字、头像和主页链接显示为 <masked>;长文字只在这里截短,接口里是完整的。
200 OK · 取数日期 2026-11-03
{
"data": [
{
"type": "product",
"itemId": "100426315672",
"url": "https://item.jd.com/100426315672.html",
"title": "一加Ace 7 12GB+256GB 流光白 双路风冷…",
"price": 4399,
"imageUrl": "https://img10.360buyimg.com/n1/jfs/t1…",
"shopId": "1000001947",
"shopName": "一加手机京东自营旗舰店",
"categoryIds": [
"9987",
"653",
"655"
],
"vendorId": "1000001947",
"isSelfOperated": true,
"isLowestPrice": true,
"reviewCountText": "2000+",
"installmentText": "12期免息",
"promoTag": "赠品",
"listedAt": "2026-10-23T02:17:23Z",
"searchKeyword": "手机",
"position": 1,
"searchTotal": 7672
},
{
"type": "product",
"itemId": "100256502833",
"url": "https://item.jd.com/100256502833.html",
"title": "vivo Y600Pro 8GB+128GB 浮光金 10200mA…",
"price": 1998,
"imageUrl": "https://img10.360buyimg.com/n1/jfs/t1…",
"shopId": "1000085868",
"shopName": "vivo京东自营旗舰店",
"categoryIds": [
"9987",
"653",
"655"
],
"vendorId": "1000085868",
"isSelfOperated": true,
"isLowestPrice": false,
"reviewCountText": "5万+",
"installmentText": "3期免息",
"promoTag": null,
"listedAt": "2026-06-04T01:23:24Z",
"searchKeyword": "手机",
"position": 2,
"searchTotal": 7672
}
],
"cursor": "c1.Hq8vR2mTn5wK.yJ0dXA…",
"meta": {
"request_id": "req_01JD8Q…",
"charged_usd": "0.026787",
"balance_usd": "9.875000",
"items": 2
}
}字段 19
| 字段 | 类型 | 示例值 |
|---|---|---|
| type | string | product |
| itemId | string | 100426315672 |
| url | string | https://item.jd.com/100426315672.html |
| title | string | 一加Ace 7 12GB+256GB 流光白 双路风冷系统 185Hz东方屏 2亿像素旗舰主摄 学生oppo游戏手机 国… |
| price | number | 4399 |
| imageUrl | string | https://img10.360buyimg.com/n1/jfs/t1/558039/26/2055/93961/6… |
| shopId | string | 1000001947 |
| shopName | string | 一加手机京东自营旗舰店 |
| categoryIds | array | ["9987","653","655"] |
| vendorId | string | 1000001947 |
| isSelfOperated | boolean | true |
| isLowestPrice | boolean | true |
| reviewCountText | string | 2000+ |
| installmentText | string | 12期免息 |
| promoTag | string | 赠品 |
| listedAt | string | 2026-10-23T02:17:23Z |
| searchKeyword | string | 手机 |
| position | number | 1 |
| searchTotal | number | 7672 |
参数 2
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| limit | integer | 否 | 返回的记录条数,1 到 100。单次请求返回的条数不会超过这个数。 | 5 |
| keywords | array | 是 | 按京东搜索框的写法输入搜索词,例如 手机 或 连衣裙。每个关键词按京东自己的顺序返回商品,每页 48 个;只要后续页还有足够多的新商品就会继续翻页。留空时使用 手机。 | ["手机"] |
翻页
把上一次返回的 cursor 连同同样的参数传回来,拿下一页。每一页是一次独立的请求,单独计费;最后一页的 cursor 是 null。
JavaScript
const params = {"keywords":["手机"]};
const records = [];
let cursor = null;
do {
const response = await fetch("https://api.silklinedata.com/v1/jd-search/search", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.SILKLINE_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ ...params, limit: 100, ...(cursor ? { cursor } : {}) }),
});
const answer = await response.json();
records.push(...answer.data);
cursor = answer.cursor;
} while (cursor);
console.log(records.length);一次请求花多少
按条计费;一次请求条数少或没有结果时,每取一页收费不超过这个接口每页的最低收费,可能更低;我们这边出错或超时不收费。
这个接口一页最多 30 条,每页最低收费 $0.026787;要 100 条的请求会取 4 页。
- 1 条:最多 $0.026787
- 20 条:最多 $0.092
- 100 条:最多 $0.46
返回的 meta 里写着这次扣了多少(charged_usd)和还剩多少(balance_usd)。我们这边出错不收费。
常见问题
「搜索商品」要传哪些参数?
必填:keywords。另外都可以传 limit(1 到 100)。
一次请求最多返回多少条?
每次请求最多 100 条(limit 1 到 100)。每页最多 30 条,要 100 条时一次请求取 4 页。
能接着往后取吗?
能。回答里有 cursor 时,带上同样的参数和这个 cursor 再请求一次,就从上次停下的地方接着取。
怎么收费?
每条 记录 $0.0046。每页最低收费 $0.026787:条数少或没有结果时,每取一页最多收这么多,可能更低。取 100 条最多 $0.46。
请求失败或者没有结果时怎么收费?
按条计费;一次请求条数少或没有结果时,每取一页收费不超过这个接口每页的最低收费,可能更低;我们这边出错或超时不收费。回答里的 meta 写着这次收了多少、余额还剩多少。