店铺商品列表
使用卖家或用户ID和店铺ID获取淘宝或天猫店铺的商品,支持基于页面的分页和可配置排序。用于浏览已知店铺目录。
参数
| 参数 | 必填 | 类型 | 说明 | 示例 | 可选值 |
|---|---|---|---|---|---|
user_id |
必填 | string | 店铺标识符。也称为卖家ID或用户ID(它们指向相同的值)。 | 579113673825 |
— |
shop_id |
必填 | string | 淘宝/天猫上的唯一店铺标识符(店铺ID)。 | 2204157154975 |
— |
sort |
可选 | string | 结果集的排序方式。 可用值: - `coefp`:综合排序 - `hotsell`:热销/销量 - `oldstarts`:新品/旧品 - `bid`:价格:从低到高 - `_bid`:价格:从高到低 | coefp |
coefphotselloldstartsbid_bid |
page |
可选 | integer | 用于分页的页码。 | 1 |
— |
代码示例
curl -G "https://api.mofa-ai.com/v1/taobao/get_shop_item_list_v2" \
-H "Authorization: Bearer $MOFA_API_KEY" \
--data-urlencode 'user_id=579113673825' \
--data-urlencode 'shop_id=2204157154975' \
--data-urlencode 'sort=coefp' \
--data-urlencode 'page=1'
import os
import requests
resp = requests.get(
"https://api.mofa-ai.com/v1/taobao/get_shop_item_list_v2",
headers={"Authorization": f"Bearer {os.environ['MOFA_API_KEY']}"},
params={
"user_id": "579113673825",
"shop_id": "2204157154975",
"sort": "coefp",
"page": "1",
},
timeout=60,
)
body = resp.json()
if body["success"]:
print(body["cost_usd"], body["data"])
else:
print(body["error"], body["message"])
const url = new URL("https://api.mofa-ai.com/v1/taobao/get_shop_item_list_v2");
url.search = new URLSearchParams({
user_id: "579113673825",
shop_id: "2204157154975",
sort: "coefp",
page: "1",
});
const resp = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.MOFA_API_KEY}` },
});
const body = await resp.json();
if (body.success) console.log(body.cost_usd, body.data);
else console.error(body.error, body.message);
在线试用
登录后可以在这里直接调用此接口,按价格从余额扣费,失败不收费。新账户赠送 $0.50 试用额度。
响应示例
采集于 2026-11-07,耗时 6210 ms · 请求参数 {"page": "1", "sort": "coefp", "shop_id": "2204157154975", "user_id": "579113673825"}
JSON
{
"success": true,
"code": 0,
"message": "success",
"request_id": "req_5f1c2a9be04d7c3a81f6e2d0",
"endpoint": "taobao.get_shop_item_list_v2",
"cost_usd": 0.03,
"data": {
"code": 0,
"data": "店铺不存在",
"message": null,
"requestId": "10250511dbc84e4b86e03ee5aa1da56d",
"recordTime": "2026-11-08T07:59:38.437960703",
"requestParams": {
"body": null,
"query": {
"page": "1",
"sort": "coefp",
"shopId": "2204157154975",
"userId": "579113673825"
}
}
}
}