Mercado Libre 店铺详情
10 点 / 次GET
/api/v2/data/mercadolibre/mall/detail请求参数
2 个参数
Query 参数
siteIdinteger站点 ID示例:
1mallIdstring店铺 ID请求示例代码
import { createHmac, createHash, randomBytes } from "node:crypto";
const baseUrl = "";
const path = "/api/v2/data/mercadolibre/mall/detail";
const appKey = process.env.GB_APP_KEY;
const appSecret = process.env.GB_APP_SECRET;
if (!appKey || !appSecret) throw new Error("请设置 GB_APP_KEY 和 GB_APP_SECRET");
const params = {};
const timestamp = String(Math.floor(Date.now() / 1000));
const nonce = randomBytes(16).toString("hex");
const query = new URLSearchParams(params).toString();
const canonical = ["GET", path, query, timestamp, nonce].join("\n");
const signature = createHmac("sha256", appSecret).update(canonical).digest("base64");
const headers = {
"X-GB-App-Key": appKey,
"X-GB-Timestamp": timestamp,
"X-GB-Nonce": nonce,
"X-GB-Signature": signature,
};
const response = await fetch(baseUrl + path + (query ? "?" + query : ""), {
method: "GET",
headers,
});
console.log(response.status, await response.text());返回响应
200 OK
application/json
codeinteger业务状态码;0 表示成功,非 0 表示失败。msgstring错误或提示信息;成功时可能不返回。dataobject业务数据对象;仅对应当前请求模式的字段会出现。mallMercadoLibreMallItem关联店铺对象;未找到时可能不返回。regionstring平台地区编码。mallIdstring平台店铺 ID。mallNamestring店铺名称。mallLogostring店铺标志图片地址。goodsNuminteger店铺商品数量。followerNuminteger关注人数。mallSoldinteger店铺累计销量。mallStarnumber店铺星级或评分。reputationLevelTextstring卖家信誉等级说明。powerSellerStatusTextstring优质卖家状态说明。sellerTypeTextstring卖家类型说明。mallOpenTimestring店铺开店时间;ISO 8601 带时区时间,毫秒可选,如 2026-11-17T00:00:00+08:00。createTimestring记录创建时间;ISO 8601 带时区时间,毫秒可选,如 2026-11-17T00:00:00+08:00。updateTimestring记录更新时间;ISO 8601 带时区时间,毫秒可选,如 2026-11-17T00:00:00+08:00。siteMercadoLibreSiteItem当前查询的站点信息。siteIdinteger平台站点 ID。regionIdstring平台地区 ID。namestring名称。cnNamestring中文名称。langstring语言代码。currencystring货币代码。symbolstring货币符号。结构实例
{
"code": 0,
"msg": "string",
"data": {
"mall": {
"region": "string",
"mallId": "string",
"mallName": "string",
"mallLogo": "string",
"goodsNum": 0,
"followerNum": 0,
"mallSold": 0,
"mallStar": 0,
"reputationLevelText": "string",
"powerSellerStatusText": "string",
"sellerTypeText": "string",
"mallOpenTime": "2026-11-17T00:00:00+08:00",
"createTime": "2026-11-17T00:00:00+08:00",
"updateTime": "2026-11-17T00:00:00+08:00"
},
"site": {
"siteId": 0,
"regionId": "string",
"name": "string",
"cnName": "string",
"lang": "string",
"currency": "string",
"symbol": "string"
}
}
}