怎么发
用 POST 带 JSON 请求体,或者用 GET 把同样的参数放进查询串。key 放在 Authorization 头里。
curl -X POST "https://api.silklinedata.com/v1/taobao/product" \
-H "Authorization: Bearer $SILKLINE_KEY" \
-H "Content-Type: application/json" \
-d '{"limit":5,"items":["1001195587140"]}'import os, requests
response = requests.post(
"https://api.silklinedata.com/v1/taobao/product",
headers={"Authorization": "Bearer " + os.environ["SILKLINE_KEY"]},
json={
"limit": 5,
"items": ["1001195587140"],
},
)
answer = response.json()
print(answer["data"], answer["meta"]["charged_usd"])const response = await fetch("https://api.silklinedata.com/v1/taobao/product", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.SILKLINE_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"limit": 5,
"items": [
"1001195587140"
]
}),
});
const { data, cursor, meta } = await response.json();
console.log(data, meta.charged_usd);返回什么
这是 2026-11-28 一次真实请求返回的记录。普通用户的名字、头像和主页链接显示为 <masked>;长文字只在这里截短,接口里是完整的。
{
"data": [
{
"type": "productDetail",
"itemId": "1001195587140",
"url": "https://item.taobao.com/item.htm?id=1…",
"title": "会员精选 有点淘气 x Pingu正版IP授权竖…",
"priceText": "89.90",
"price": 89.9,
"originalPrice": null,
"salesText": null,
"videoUrl": null,
"options": [
{
"name": "颜色分类",
"values": [
{
"name": "蓝条纹360ml",
"imageUrl": "https://img.alicdn.com/imgextra/i3/22…"
},
{
"name": "黄条纹360ml",
"imageUrl": "https://img.alicdn.com/imgextra/i1/22…"
},
{
"name": "粉条纹360ml",
"imageUrl": "https://img.alicdn.com/imgextra/i4/22…"
}
]
}
],
"itemLocation": "江苏省盐城市",
"postage": null,
"categoryId": "50006889",
"attributes": {
"品牌": "有点淘气",
"型号": "2025121202",
"杯子种类": "保温杯",
"杯盖材质": "PP材质",
"功能": "保冷 便携 保温",
"产地": "中国大陆",
"材质": "304不锈钢+201不锈钢",
"是否显示温度": "不支持温度显示",
"图案款式": "条纹",
"商品名称": "竖条纹直饮随身保温杯",
"包装种类": "礼盒装",
"是否带茶隔": "不带茶隔",
"杯盖类型": "PP/聚丙烯",
"颜色分类": "蓝条纹360ml 黄条纹360ml 粉条纹360ml"
},
"shopId": "503709453",
"sellerId": "2215824413675",
"shopName": "腔调会员精选旗舰店",
"shopUrl": "https://shop503709453.taobao.com",
"imageUrl": "https://img.alicdn.com/imgextra/i4/22…",
"imageUrls": [
"https://img.alicdn.com/imgextra/i4/22…",
"https://img.alicdn.com/imgextra/i4/22…",
"https://img.alicdn.com/imgextra/i3/22…"
],
"imageCount": 5,
"skuCount": 3,
"skus": [
{
"skuId": "5991051996238",
"name": "颜色分类:蓝条纹360ml",
"price": 89.9,
"stock": 200
},
{
"skuId": "5991051996239",
"name": "颜色分类:黄条纹360ml",
"price": 89.9,
"stock": 200
},
{
"skuId": "5991051996240",
"name": "颜色分类:粉条纹360ml",
"price": 89.9,
"stock": 200
}
],
"currency": "CNY"
}
],
"cursor": null,
"meta": {
"request_id": "req_01JD8Q…",
"charged_usd": "0.030000",
"balance_usd": "9.875000",
"items": 1
}
}字段 24
| 字段 | 类型 | 示例值 |
|---|---|---|
| type | string | productDetail |
| itemId | string | 1001195587140 |
| url | string | https://item.taobao.com/item.htm?id=1001195587140 |
| title | string | 会员精选 有点淘气 x Pingu正版IP授权竖条纹直饮随身保温杯 |
| priceText | string | 89.90 |
| price | number | 89.9 |
| originalPrice | null | null |
| salesText | null | null |
| videoUrl | null | null |
| options | array | [{"name":"颜色分类","values":[{"name":"蓝条纹360ml","imageUrl":"htt… |
| itemLocation | string | 江苏省盐城市 |
| postage | null | null |
| categoryId | string | 50006889 |
| attributes | object | {"品牌":"有点淘气","型号":"2025121202","杯子种类":"保温杯","杯盖材质":"PP材质","功… |
| shopId | string | 503709453 |
| sellerId | string | 2215824413675 |
| shopName | string | 腔调会员精选旗舰店 |
| shopUrl | string | https://shop503709453.taobao.com |
| imageUrl | string | https://img.alicdn.com/imgextra/i4/2215824413675/O1CN01ryNXs… |
| imageUrls | array | ["https://img.alicdn.com/imgextra/i4/2215824413675/O1CN01ryN… |
| imageCount | number | 5 |
| skuCount | number | 3 |
| skus | array | [{"skuId":"5991051996238","name":"颜色分类:蓝条纹360ml","price":89.… |
| currency | string | CNY |
平常取这份数据的渠道不可用时,请求会改走另一条渠道照样答,不直接失败。那样取回的记录带 partialFields: true,其中这些字段可能为空:title、imageUrl、imageUrls、videoUrl、categoryId、attributes、shopId、sellerId、shopName、shopUrl。
参数 2
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| limit | integer | 否 | 返回的记录条数,1 到 100。单次请求返回的条数不会超过这个数。 | 5 |
| items | array | 是 | 商品 ID(搜索结果里的 itemId 字段)或含 id=<数字> 的商品链接。不支持短链(e.tb.cn)。每个商品返回一条完整记录。 | ["1001195587140"] |
一次请求花多少
按交付的条数计费,或按你查的每个对象(一个关键词、一个用户、一个链接)每一页一个最低收费,两者取多的;查了没查到的对象也算一页;只有超时和出错(我们这边或平台那边)不收费。
这个接口每条单独取,每取一条的最低收费是 $0.03。
- 1 条:最多 $0.03
- 20 条:最多 $0.60
- 100 条:最多 $3.00
返回的 meta 里写着这次扣了多少(charged_usd)和还剩多少(balance_usd)。我们这边出错不收费。
常见问题
「淘宝商品详情」要传哪些参数?
必填:items。另外都可以传 limit(1 到 100)。
一次请求最多返回多少条?
每次请求最多 100 条(limit 1 到 100)。每页最多 1 条,要 100 条时一次请求取 100 页。
能接着往后取吗?
不能。这个接口一次请求就把结果全部返回,回答里的 cursor 是 null。
怎么收费?
每条 product-detail $0.03。每个对象每页最低收费 $0.03:按条算的总数比各页最低收费加起来少时,按各页最低收费的总和收。一个对象取 100 条最多 $3.00。
请求失败或者没有结果时怎么收费?
按交付的条数计费,或按你查的每个对象(一个关键词、一个用户、一个链接)每一页一个最低收费,两者取多的;查了没查到的对象也算一页;只有超时和出错(我们这边或平台那边)不收费。回答里的 meta 写着这次收了多少、余额还剩多少。