差在哪
这个平台上还有 1 个接口卖的数据和它差不多。目录里写的差别:
| 接口 | 每条 | 每页最低 | 每页条数 | 能用 cursor 翻页 | 参数 | 字段数 |
|---|---|---|---|---|---|---|
| /v1/jd/search | $0.0046 | $0.027319 | 10 | 是 | keywords | 19 |
| /v1/jd-search/search | $0.0046 | $0.026787 | 30 | 是 | keywords | 19 |
怎么发
用 POST 带 JSON 请求体,或者用 GET 把同样的参数放进查询串。key 放在 Authorization 头里。
curl -X POST "https://api.silklinedata.com/v1/jd/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",
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", {
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-09 一次真实请求返回的记录。普通用户的名字、头像和主页链接显示为 <masked>;长文字只在这里截短,接口里是完整的。
200 OK · 取数日期 2026-11-09
{
"data": [
{
"type": "product",
"itemId": "10228393796702",
"url": "https://item.jd.com/10228393796702.ht…",
"title": "荣上荣耀系列手机P80Pro5G 旗舰天玑9500…",
"price": 1599,
"imageUrl": "https://img10.360buyimg.com/n1/jfs/t1…",
"shopId": "248362284",
"shopName": "H智选手机店",
"categoryIds": [
"9987",
"653",
"655"
],
"vendorId": "248362284",
"isSelfOperated": false,
"isLowestPrice": false,
"reviewCountText": null,
"installmentText": null,
"promoTag": null,
"listedAt": "2026-11-04T08:05:35Z",
"searchKeyword": "手机",
"position": 1,
"searchTotal": 7684
},
{
"type": "product",
"itemId": "100309589315",
"url": "https://item.jd.com/100309589315.html",
"title": "HUAWEI Pura X View 12GB+512GB 亚麻灰…",
"price": 6999,
"imageUrl": "https://img10.360buyimg.com/n1/jfs/t1…",
"shopId": "1000004259",
"shopName": "华为京东自营旗舰店",
"categoryIds": [
"9987",
"653",
"655"
],
"vendorId": "1000004259",
"isSelfOperated": true,
"isLowestPrice": false,
"reviewCountText": null,
"installmentText": "12期免息",
"promoTag": null,
"listedAt": "2026-08-20T08:58:19Z",
"searchKeyword": "手机",
"position": 2,
"searchTotal": 7684
}
],
"cursor": "c1.Hq8vR2mTn5wK.yJ0dXA…",
"meta": {
"request_id": "req_01JD8Q…",
"charged_usd": "0.027319",
"balance_usd": "9.875000",
"items": 2
}
}字段 19
| 字段 | 类型 | 示例值 |
|---|---|---|
| type | string | product |
| itemId | string | 10228393796702 |
| url | string | https://item.jd.com/10228393796702.html |
| title | string | 荣上荣耀系列手机P80Pro5G 旗舰天玑9500芯 超薄大屏6.99英寸144Hz高刷畅玩游戏1TB超大内存高清一亿像… |
| price | number | 1599 |
| imageUrl | string | https://img10.360buyimg.com/n1/jfs/t1/562365/23/8108/39838/6… |
| shopId | string | 248362284 |
| shopName | string | H智选手机店 |
| categoryIds | array | ["9987","653","655"] |
| vendorId | string | 248362284 |
| isSelfOperated | boolean | false |
| isLowestPrice | boolean | false |
| reviewCountText | null | null |
| installmentText | null | null |
| promoTag | null | null |
| listedAt | string | 2026-11-04T08:05:35Z |
| searchKeyword | string | 手机 |
| position | number | 1 |
| searchTotal | number | 7684 |
参数 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", {
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);一次请求花多少
按条计费;一次请求条数少或没有结果时,每取一页收费不超过这个接口每页的最低收费,可能更低;我们这边出错或超时不收费。
这个接口一页最多 10 条,每页最低收费 $0.027319;要 100 条的请求会取 10 页。
- 1 条:最多 $0.027319
- 20 条:最多 $0.092
- 100 条:最多 $0.46
返回的 meta 里写着这次扣了多少(charged_usd)和还剩多少(balance_usd)。我们这边出错不收费。
常见问题
「搜索商品」要传哪些参数?
必填:keywords。另外都可以传 limit(1 到 100)。
一次请求最多返回多少条?
每次请求最多 100 条(limit 1 到 100)。每页最多 10 条,要 100 条时一次请求取 10 页。
能接着往后取吗?
能。回答里有 cursor 时,带上同样的参数和这个 cursor 再请求一次,就从上次停下的地方接着取。
怎么收费?
每条 记录 $0.0046。每页最低收费 $0.027319:条数少或没有结果时,每取一页最多收这么多,可能更低。取 100 条最多 $0.46。
请求失败或者没有结果时怎么收费?
按条计费;一次请求条数少或没有结果时,每取一页收费不超过这个接口每页的最低收费,可能更低;我们这边出错或超时不收费。回答里的 meta 写着这次收了多少、余额还剩多少。