Shopee 类目畅销榜
Shopee 类目的畅销商品和类目汇总,每页 20 条;小类还可查过去某一周。
API 数据样例
直接查看该接口实际使用的请求体和完整响应结构。
{
"categoryId": "11001231",
"marketplace": "MY"
}{
"request_id": "55b8f28e-a9ac-5031-a874-49de84a9a760",
"data": {
"sub_category": true,
"products": [
{
"title": "Square Cake Board White Board Papan Kek White Cake Board Cake Board Square Papan Kek Murah Premium White Papan Kek Petak",
"photo": [
"https://down-my.img.susercontent.com/file/sg-11134201-22100-xt31pz36ymiv61_tn",
"https://down-my.img.susercontent.com/file/sg-11134201-22100-ylgufz36ymiv2f_tn",
"https://down-my.img.susercontent.com/file/a2d48d220969d5b53fafc48d151891b7_tn",
"https://down-my.img.susercontent.com/file/sg-11134201-22100-qbnu0z36ymiv20_tn"
],
"product_id": "21954254648",
"price": 0.71,
"list_price": 0,
"sales_count": 5574,
"sales_amount": 3957.54,
"his_sales_count": 100087,
"shop_id": "115086339",
"shop_name": "my baking place",
"shop_location": "",
"shop_loc_type": "local",
"shop_type": "regular",
"discount": 0,
"brand": "PETSOLA",
"brand_id": "1285522",
"ratings": 4.94,
"ratings_count": 1168,
"sale_time": "2022-10-13",
"coupon_str": "4% off",
"rating_detail": [
3,
3,
10,
24,
1128
],
"bsr_category": [
[
"Bakeware",
"11001231",
"1"
]
],
"sales_calc_time": "2026-11-24",
"sale_is_correction": "2026-11-17"
},
{
"title": "Birthday Cake Knife Pisa Kek 蛋糕切刀Disposable Plastic Knife",
"photo": [
"https://down-my.img.susercontent.com/file/f9a23b067863baf884f5c9449225f834_tn"
],
"product_id": "9655852698",
"price": 0.5,
"list_price": 0,
"sales_count": 2171,
"sales_amount": 1085.5,
"his_sales_count": 107778,
"shop_id": "265429894",
"shop_name": "Yenmyshop",
"shop_location": "",
"shop_loc_type": "local",
"shop_type": "regular",
"discount": 0,
"brand": "KZM",
"brand_id": "1285522",
"ratings": 4.95,
"ratings_count": 2291,
"sale_time": "2021-05-17",
"coupon_str": "10% off",
"rating_detail": [
6,
4,
12,
51,
2218
],
"bsr_category": [
[
"Bakeware",
"11001231",
"3"
]
],
"sales_calc_time": "2026-11-24",
"sale_is_correction": "2026-09-27"
},
{
"title": "《 𝗙𝗥𝗢𝗦𝗧 𝗙𝗟𝗢𝗪 》 100pcs Disposable Piping Bag Pastry Icing Bags Baking Supplies Beg Paip 一次性裱花袋 NWD",
"photo": [
"https://down-my.img.susercontent.com/file/sg-11134201-824hr-mes2i4d3s54zd3_tn",
"https://down-my.img.susercontent.com/file/sg-11134201-824h5-mes2i5wyskck43_tn",
"https://down-my.img.susercontent.com/file/sg-11134201-824je-mes2jeuvvvgneb_tn",
"https://down-my.img.susercontent.com/file/sg-11134201-824io-mes2j6hc91ja09_tn",
"https://down-my.img.susercontent.com/file/sg-11134201-824is-mes2j0f33wu865_tn",
"https://down-my.img.susercontent.com/file/sg-11134201-824hb-mes2j0st8j5z05_tn",
"https://down-my.img.susercontent.com/file/sg-11134201-824gu-mes2j03f198m86_tn",
"https://down-my.img.susercontent.com/file/sg-11134201-824ht-mes2j14wzv2c1f_tn"
],
"product_id": "43369594832",
"price": 2.57,
"list_price": 7.95,
"sales_count": 1262,
"sales_amount": 3243.34,
"his_sales_count": 4866,
"shop_id": "7727453",
"shop_name": "NWD - New World Depot",
"shop_location": "",
"shop_loc_type": "local",
"shop_type": "regular",
"discount": 0.68,
"brand": "N/A",
"brand_id": "",
"ratings": 4.94,
"ratings_count": 699,
"sale_time": "2025-09-18",
"coupon_str": "5% off",
"rating_detail": [
2,
0,
9,
14,
674
],
"bsr_category": [
[
"Bakeware",
"11001231",
"4"
]
],
"sales_calc_time": "2026-11-24",
"sale_is_correction": "2026-11-02"
}
]
}
}可用状态:已开放
该接口已进入 v1 网关、OpenAPI 和订阅权限目录,每次调用消耗 1 个计费单位,查不到数据(
RESULT_NOT_FOUND)也照常计费。
POST /v1/shopee/categories/top-products
下方请求和响应字段已与当前公开契约核对。
MCP 调用
| 项目 | 内容 |
|---|---|
| MCP Code | shopee_categories_top_products |
快速调用
先创建 API 密钥,再将密钥写入服务端环境变量:
export ECOMMERCE_DATA_API_KEY="your_api_key"curl --request POST \
--url https://ecommercedataapi.com/v1/shopee/categories/top-products \
--header "Content-Type: application/json" \
--header "X-API-Key: ${ECOMMERCE_DATA_API_KEY}" \
--data '{
"categoryId": "11001231",
"marketplace": "MY"
}'使用 AI CLI 接入
复制给 AI CLI
粘贴到 Codex、Claude Code、Gemini CLI 或其他编程智能体中直接完成接入。
请直接在当前代码库中接入 Ecommerce Data API 的「Shopee 类目畅销榜」接口,不要只给示例代码。
接口文档:https://ecommercedataapi.com/zh/docs/shopee/categories-top-products
请求接口:POST https://ecommercedataapi.com/v1/shopee/categories/top-products
API 密钥环境变量:ECOMMERCE_DATA_API_KEY
请求示例:
{
"categoryId": "11001231",
"marketplace": "MY"
}
请按以下要求执行:
1. 先阅读接口文档,并检查当前项目使用的语言、框架、HTTP 客户端、目录结构和环境变量约定。
2. 优先复用项目现有的 API 客户端和错误处理方式;如果没有,再创建最小可复用的 Ecommerce Data API 客户端与该接口调用封装。
3. 从服务端环境变量 ECOMMERCE_DATA_API_KEY 读取密钥,发送 Content-Type: application/json 和 X-API-Key 请求头。绝不能把真实密钥写入源码、前端代码、日志、测试快照或 Git。
4. 如果环境变量不存在,提示我自行设置 ECOMMERCE_DATA_API_KEY;不要索取、输出或猜测真实密钥,并继续完成不依赖真实请求的代码与测试。
5. 根据接口文档实现请求与响应类型,处理非 2xx 响应、request_id、error.code、error.message 和 429 限流。
6. 添加一个符合当前项目习惯的最小调用示例或测试。如果密钥已配置且当前环境允许外部请求,再执行一次最小真实调用;否则使用 mock 或静态验证。
7. 运行相关格式化、类型检查和测试,最后汇报修改文件、调用方法、验证结果以及仍需我配置的环境变量。还没有 API 密钥?创建 API 密钥
在 Postman 中打开当前请求
下载当前接口的预配置 Collection,再通过 Postman Import 导入。
导入后在 Collection Variables 中填写 apiKey。创建 API 密钥
Node.js 示例
const response = await fetch(
'https://ecommercedataapi.com/v1/shopee/categories/top-products',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': process.env.ECOMMERCE_DATA_API_KEY,
},
body: JSON.stringify({
categoryId: '11001231',
marketplace: 'MY',
}),
}
);
const result = await response.json();
if (!response.ok) {
throw new Error(`${result.error?.code}: ${result.error?.message}`);
}
console.log(result.data);Python 示例
import os
import requests
response = requests.post(
"https://ecommercedataapi.com/v1/shopee/categories/top-products",
headers={
"Content-Type": "application/json",
"X-API-Key": os.environ["ECOMMERCE_DATA_API_KEY"],
},
json={
"categoryId": "11001231",
"marketplace": "MY",
},
timeout=30,
)
response.raise_for_status()
print(response.json()["data"])请求参数
请求体直接发送下表字段,不要再包裹额外对象;未定义字段会被拒绝。
| 字段 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
categoryId | 字符串 | 是 | 类目 ID,取自同平台的类目搜索或类目树。 | 11001231 |
marketplace | 字符串 | 否 | 站点编码,可选值见枚举。 可用值(表 1.2):US、JP、UK、DE、FR、IT、ES、CA、IN、MX、BR、AU、AE | MY |
weekOf | 字符串 | 否 | 过去某一周内的任意日期,YYYY-MM-DD,只对小类有效;不传为本周。 | 2026-10-05 |
page | 整数 | 否 | 页码。 | 1 |
返回结构
| 字段 | 类型 | 说明 |
|---|---|---|
request_id | 字符串 | 本次请求的唯一标识。 |
data | 对象 | 接口业务数据。 |
下表字段位于 data 内。数组接口描述的是单个数组元素,分页接口描述的是 items[] 中的单条记录。
返回字段
| 字段 | 类型 | 说明 | 示例 |
|---|---|---|---|
sub_category | 布尔值 | 是否为子类目(true 为子类目,false 为非子类目) | True |
products | 数组 | 当前页的畅销商品数组 | - |
products.title | 字符串 | 商品标题 | Square Cake Board White Board Papan Kek White Cake Board Cake Board Square Papan Kek Murah Premium White Papan Kek Petak |
products.photo | 数组 | 商品图片 URL 数组,无公开图片时可能为 null | - |
products.product_id | 字符串 | Shopee 商品 ID | 21954254648 |
products.price | 数字 | 当前售价,当地货币(如马来站为 MYR) | 0.71 |
products.list_price | 整数 | 标价(原价),当地货币(如马来站为 MYR) | 0 |
products.sales_count | 整数 | 月销量(件),-1 表示无法计算 | 5574 |
products.sales_amount | 数字 | 月销售额,当地货币(如马来站为 MYR),-1 表示无法计算 | 3957.54 |
products.his_sales_count | 整数 | 累计销量(件) | 100087 |
products.shop_id | 字符串 | 店铺 ID(shopId) | 115086339 |
products.shop_name | 字符串 | 店铺名称 | my baking place |
products.shop_location | 字符串 | 店铺所在地(字符串,可能为空) | - |
products.shop_loc_type | 字符串 | 店铺所在地类型:local(本土店)、cross_border(跨境店)或 unknown | local |
products.shop_type | 字符串 | 店铺类型:regular(普通店)、preferred(优选店)或 flagship(旗舰店) | regular |
products.discount | 整数 | 折扣率(小数,如 0.13 即 13% 折扣) | 0 |
products.brand | 字符串 | 品牌名称(可能含泰语音译) | PETSOLA |
products.brand_id | 字符串 | 品牌 ID | 1285522 |
products.ratings | 数字 | 商品综合评分(满分 5) | 4.94 |
products.ratings_count | 整数 | 评分数量 | 1168 |
products.sale_time | 字符串 | 上架日期(yyyy-MM-dd) | 2022-10-13 |
products.coupon_str | 字符串 | 店铺优惠券说明文本 | 4% off |
products.rating_detail | 数组 | 各星级评分数量,格式 [1 星, 2 星, 3 星, 4 星, 5 星] | - |
products.bsr_category | 数组 | 畅销榜类目数组,格式 [category_name, category_id, rank] | - |
products.sales_calc_time | 字符串 | 销量计算时间 | 2026-11-24 |
products.sale_is_correction | 字符串 | 销量修正时间 | 2026-11-17 |
返回示例
{
"request_id": "55b8f28e-a9ac-5031-a874-49de84a9a760",
"data": {
"sub_category": true,
"products": [
{
"title": "Square Cake Board White Board Papan Kek White Cake Board Cake Board Square Papan Kek Murah Premium White Papan Kek Petak",
"photo": [
"https://down-my.img.susercontent.com/file/sg-11134201-22100-xt31pz36ymiv61_tn",
"https://down-my.img.susercontent.com/file/sg-11134201-22100-ylgufz36ymiv2f_tn",
"https://down-my.img.susercontent.com/file/a2d48d220969d5b53fafc48d151891b7_tn",
"https://down-my.img.susercontent.com/file/sg-11134201-22100-qbnu0z36ymiv20_tn"
],
"product_id": "21954254648",
"price": 0.71,
"list_price": 0,
"sales_count": 5574,
"sales_amount": 3957.54,
"his_sales_count": 100087,
"shop_id": "115086339",
"shop_name": "my baking place",
"shop_location": "",
"shop_loc_type": "local",
"shop_type": "regular",
"discount": 0,
"brand": "PETSOLA",
"brand_id": "1285522",
"ratings": 4.94,
"ratings_count": 1168,
"sale_time": "2022-10-13",
"coupon_str": "4% off",
"rating_detail": [3, 3, 10, 24, 1128],
"bsr_category": [["Bakeware", "11001231", "1"]],
"sales_calc_time": "2026-11-24",
"sale_is_correction": "2026-11-17"
},
{
"title": "Birthday Cake Knife Pisa Kek 蛋糕切刀Disposable Plastic Knife",
"photo": [
"https://down-my.img.susercontent.com/file/f9a23b067863baf884f5c9449225f834_tn"
],
"product_id": "9655852698",
"price": 0.5,
"list_price": 0,
"sales_count": 2171,
"sales_amount": 1085.5,
"his_sales_count": 107778,
"shop_id": "265429894",
"shop_name": "Yenmyshop",
"shop_location": "",
"shop_loc_type": "local",
"shop_type": "regular",
"discount": 0,
"brand": "KZM",
"brand_id": "1285522",
"ratings": 4.95,
"ratings_count": 2291,
"sale_time": "2021-05-17",
"coupon_str": "10% off",
"rating_detail": [6, 4, 12, 51, 2218],
"bsr_category": [["Bakeware", "11001231", "3"]],
"sales_calc_time": "2026-11-24",
"sale_is_correction": "2026-09-27"
},
{
"title": "《 𝗙𝗥𝗢𝗦𝗧 𝗙𝗟𝗢𝗪 》 100pcs Disposable Piping Bag Pastry Icing Bags Baking Supplies Beg Paip 一次性裱花袋 NWD",
"photo": [
"https://down-my.img.susercontent.com/file/sg-11134201-824hr-mes2i4d3s54zd3_tn",
"https://down-my.img.susercontent.com/file/sg-11134201-824h5-mes2i5wyskck43_tn",
"https://down-my.img.susercontent.com/file/sg-11134201-824je-mes2jeuvvvgneb_tn",
"https://down-my.img.susercontent.com/file/sg-11134201-824io-mes2j6hc91ja09_tn",
"https://down-my.img.susercontent.com/file/sg-11134201-824is-mes2j0f33wu865_tn",
"https://down-my.img.susercontent.com/file/sg-11134201-824hb-mes2j0st8j5z05_tn",
"https://down-my.img.susercontent.com/file/sg-11134201-824gu-mes2j03f198m86_tn",
"https://down-my.img.susercontent.com/file/sg-11134201-824ht-mes2j14wzv2c1f_tn"
],
"product_id": "43369594832",
"price": 2.57,
"list_price": 7.95,
"sales_count": 1262,
"sales_amount": 3243.34,
"his_sales_count": 4866,
"shop_id": "7727453",
"shop_name": "NWD - New World Depot",
"shop_location": "",
"shop_loc_type": "local",
"shop_type": "regular",
"discount": 0.68,
"brand": "N/A",
"brand_id": "",
"ratings": 4.94,
"ratings_count": 699,
"sale_time": "2025-09-18",
"coupon_str": "5% off",
"rating_detail": [2, 0, 9, 14, 674],
"bsr_category": [["Bakeware", "11001231", "4"]],
"sales_calc_time": "2026-11-24",
"sale_is_correction": "2026-11-02"
}
]
}
}错误响应、请求追踪和限流头说明见错误与限流。