以下是一篇关于“淘宝/天猫相似商品查询API接口”的文档,包含接口说明、请求参数、返回参数以及返回示例等内容:
接口名称
淘宝/天猫相似商品查询(SimilarProduct)
请求端口名称与示例
端口名称:taobao/SimilarProduct
请求示例:taobao/SimilarProduct?token=test123&itemId=7975266564
请求参数
参数名 | 类型 | 是否必填 | 说明 |
---|---|---|---|
token | string | 是 | 接口访问令牌,用于鉴权 |
itemId | string | 是 | 要查询相似商品的宝贝ID(商品ID) |
返回参数说明(JSON格式)
参数名 | 类型 | 说明 |
---|---|---|
code | int | 状态码,200为成功,其他为失败 |
message | string | 返回信息 |
itemId | string | 原始商品ID |
similarItems | array | 相似商品数组 |
├─ itemId | string | 相似商品ID |
├─ title | string | 相似商品标题 |
├─ imageUrl | string | 商品主图URL |
├─ price | string | 商品价格(字符串格式,单位:元) |
├─ shopName | string | 店铺名称 |
├─ shopUrl | string | 店铺链接 |
返回示例
{
"code": 200,
"message": "查询成功",
"itemId": "797526656459",
"similarItems": [
{
"itemId": "7894561230123",
"title": "夏季新款男士短袖T恤纯棉修身圆领潮流休闲体恤",
"imageUrl": "https://img.alicdn.com/imgextra/i3/1234567890/O1CN01xyzabc.jpg",
"price": "59.00",
"shopName": "潮流男装旗舰店",
"shopUrl": "https://shop123456.taobao.com"
},
{
"itemId": "7888888888888",
"title": "纯色简约短袖T恤 男士百搭打底衫上衣",
"imageUrl": "https://img.alicdn.com/imgextra/i2/9876543210/O1CN01abcdxyz.jpg",
"price": "45.00",
"shopName": "优选服饰专营店",
"shopUrl": "https://shop987654.taobao.com"
}
]
}