淘宝API开发系列中的item_get和item_search是用于获取淘宝商品详情的两个重要接口。
- item_get接口:
item_get接口用于获取淘宝商品详情数据。通过该接口,您可以获取到商品的ID、标题、价格、销量、评价等信息。要使用item_get接口,您需要先通过淘宝开放平台申请API密钥,并确保您的应用已经完成了淘宝账号的授权。
要调用item_get接口,您需要传入商品的ID作为参数。一旦调用了该接口,您将获得商品详情的JSON数据。您可以使用这些数据来展示商品详情页面、进行数据分析或进行其他相关操作。
- item_search接口:
item_search接口用于按关键字搜索淘宝商品。通过该接口,您可以根据用户输入的关键字搜索相关商品,并获取到符合条件的商品列表。要使用item_search接口,您同样需要先通过淘宝开放平台申请API密钥,并确保您的应用已经完成了淘宝账号的授权。
要调用item_search接口,您需要传入关键字作为参数。该接口会根据关键字返回符合条件的商品列表,包括商品的ID、标题、价格等信息。您可以使用这些数据来展示搜索结果页面、推荐相关商品或进行其他相关操作。
item_search-按关键字搜索淘宝商品
请求参数
请求参数:q=女装&start_price=0&end_price=0&page=1&cat=0&discount_only=&sort=&page_size=&seller_info=&nick=&ppath=&imgid=&filter=
参数说明:q:搜索关键字
sort:排序[bid,_bid,bid2,_bid2,_sale,_credit]
(bid:总价,bid2:商品价格,sale:销量,credit信用,加_前缀为从大到小排序)
page:页数
请求示例,API接入Anzexi58
响应示例
{
"items": {
"page": "1",
"real_total_results": 200,
"total_results": 2000,
"page_size": 20,
"pagecount": 100,
"data_from": "szx",
"item": [
{
"title": "MM明摩女装长款羽绒服男女超长款过膝加厚冬季2023年新款情侣中戏",
"pic_url": "http://gw.alicdn.com/i4/828064445/O1CN011tBW9e1ihrMEQHuzX_!!828064445.jpg",
"orginal_price": "485.0",
"promotion_price": "485.0",
"price": "485.0",
"sales": 10000,
"num_iid": "722907989144",
"seller_nick": "MM明摩女装",
"detail_url": "https://item.taobao.com/item.htm?id=722907989144"
},
{
"title": "优衣库女装罗纹高领T恤(长袖打底衫小高领)449880/460295",
"pic_url": "http://gw.alicdn.com/i3/196993935/O1CN01GPCbRY1ewHR3B8sve_!!196993935.jpg",
"orginal_price": "59.0",
"promotion_price": "59.0",
"price": "59.0",
"sales": 10000,
"num_iid": "730866214125",
"seller_nick": "优衣库官方旗舰店",
"detail_url": "https://item.taobao.com/item.htm?id=730866214125"
},
{
"title": "优衣库女装柔滑弹力棉质两翻领T恤长袖打底衫新年红本命年460296",
"pic_url": "http://gw.alicdn.com/i1/196993935/O1CN01ki5d2I1ewHR3B9kyq_!!196993935.jpg",
"orginal_price": "59.0",
"promotion_price": "59.0",
"price": "59.0",
"sales": 10000,
"num_iid": "731013630048",
"seller_nick": "优衣库官方旗舰店",
"detail_url": "https://item.taobao.com/item.htm?id=731013630048"
},
{
"title": "MM明摩女装羽绒服男女短款冬季2023年新款加厚连帽情侣款宽松中戏",
"pic_url": "http://gw.alicdn.com/i1/828064445/O1CN01b5x6VK1ihrMSPalyt_!!828064445.jpg",
"orginal_price": "428.0",
"promotion_price": "428.0",
"price": "428.0",
"sales": 5000,
"num_iid": "723497896973",
"seller_nick": "MM明摩女装",
"detail_url": "https://item.taobao.com/item.htm?id=723497896973"
},
{
"title": "陈都灵同款丨森马羽绒服女长款上衣保暖2023冬季新款外套防水女装",
"pic_url": "http://gw.alicdn.com/i1/397341302/O1CN01z9GpXX1LUMbE1vs58_!!0-item_pic.jpg",
"orginal_price": "599.0",
"promotion_price": "599.0",
"price": "599.0",
"sales": 1000,
"num_iid": "733588524101",
"seller_nick": "森马官方旗舰店",
"detail_url": "https://item.taobao.com/item.htm?id=733588524101"
},
{
"title": "lulu外套女秋冬紧身连帽加绒修身女装瑜伽上衣运动粉色卫衣冬季春",
"pic_url": "http://gw.alicdn.com/i3/2209434566781/O1CN01xU3LsB1zxkbuTD2KW_!!0-item_pic.jpg",
"orginal_price": "89.9",
"promotion_price": "89.9",
"price": "89.9",
"sales": 5000,
"num_iid": "733239482732",
"seller_nick": "白歌旗舰店",
"detail_url": "https://item.taobao.com/item.htm?id=733239482732"
},
{
"title": "美式运动卫衣连帽外套女装秋冬加绒加厚白色拉链修身短款开衫上衣",
"pic_url": "http://gw.alicdn.com/i3/3284604058/O1CN01pEpiKe1fqc7VM2FDj_!!3284604058.jpg",
"orginal_price": "49.98",
"promotion_price": "49.98",
"price": "49.98",
"sales": 5000,
"num_iid": "740077864686",
"seller_nick": "莓莓有点辣",
"detail_url": "https://item.taobao.com/item.htm?id=740077864686"
},
{
"title": "白色芭蕾风半身裙女装秋冬蛋糕裙仙女裙蕾丝半裙小个子a字裙长裙",
"pic_url": "http://gw.alicdn.com/i4/3284604058/O1CN01xUjnPV1fqc7oAxKtO_!!3284604058.jpg",
"orginal_price": "49.78",
"promotion_price": "49.78",
"price": "49.78",
"sales": 5000,
"num_iid": "744321588828",
"seller_nick": "莓莓有点辣",
"detail_url": "https://item.taobao.com/item.htm?id=744321588828"
},
{
"title": "GUJI谷纪女装长款羽绒服女过膝2023年新款加厚宽松超长情侣冬外套",
"pic_url": "http://gw.alicdn.com/i4/693302686/O1CN01K5Csfq1ViEieI4qDZ_!!693302686.jpg",
"orginal_price": "498.0",
"promotion_price": "498.0",
"price": "498.0",
"sales": 1000,
"num_iid": "741517861896",
"seller_nick": "GUJI谷纪女装",
"detail_url": "https://item.taobao.com/item.htm?id=741517861896"
},
{
"title": "棉致加厚双面德绒半高领打底衫女装秋冬中领保暖内搭长袖t恤修身",
"pic_url": "http://gw.alicdn.com/i3/2212630162575/O1CN014nrb7u1UtOkAgKnTl_!!0-item_pic.jpg",
"orginal_price": "35.9",
"promotion_price": "35.9",
"price": "35.9",
"sales": 1000,
"num_iid": "736866954505",
"seller_nick": "棉致女装旗舰店",
"detail_url": "https://item.taobao.com/item.htm?id=736866954505"
},
{
"title": "打底衫女半高领黑色小香风内搭秋冬针织毛衣女装2023新款羊毛上衣",
"pic_url": "http://gw.alicdn.com/i2/2212044631104/O1CN01s2ToEx1K1gAyJTxmX_!!2212044631104.jpg",
"orginal_price": "99.9",
"promotion_price": "99.9",
"price": "99.9",
"sales": 5000,
"num_iid": "735143926899",
"seller_nick": "猫人优选旗舰店",
"detail_url": "https://item.taobao.com/item.htm?id=735143926899"
},
{
"title": "女装双面德绒打底衫女秋冬2023新款内搭圆领长袖T恤磨毛洋气上衣",
"pic_url": "http://gw.alicdn.com/i4/822839122/O1CN01jNTBOh2HFvnkFI5IM_!!822839122.jpg",
"orginal_price": "23.0",
"promotion_price": "23.0",
"price": "23.0",
"sales": 5000,
"num_iid": "744387539024",
"seller_nick": "素色衣库",
"detail_url": "https://item.taobao.com/item.htm?id=744387539024"
},
{
"title": "大码女装半高领加厚洋气打底毛衣女秋冬胖mm宽松显瘦内搭针织上衣",
"pic_url": "http://gw.alicdn.com/i3/2206875230419/O1CN01K1ZBqH1ExwrYr3d10_!!2206875230419.jpg",
"orginal_price": "63.8",
"promotion_price": "63.8",
"price": "63.8",
"sales": 1000,
"num_iid": "757377678629",
"seller_nick": "唯妮可 大码女装",
"detail_url": "https://item.taobao.com/item.htm?id=757377678629"
},
{
"title": "中年妈妈冬装羽绒棉服新中式外套2023新款中老年女装冬季棉衣棉袄",
"pic_url": "http://gw.alicdn.com/i4/3379180942/O1CN012pKSm81IpTzixd68d_!!0-item_pic.jpg",
"orginal_price": "119.0",
"promotion_price": "119.0",
"price": "119.0",
"sales": 1000,
"num_iid": "750107843318",
"seller_nick": "福妈锦缘旗舰店",
"detail_url": "https://item.taobao.com/item.htm?id=750107843318"
},
{
"title": "奶奶冬装羽绒服真水貂毛保暖加厚外套大码老年妈妈女装鸭绒袄上衣",
"pic_url": "http://gw.alicdn.com/i1/3866632225/O1CN01aSNHEi1SJ69P8KdFc_!!0-item_pic.jpg",
"orginal_price": "288.0",
"promotion_price": "288.0",
"price": "288.0",
"sales": 1000,
"num_iid": "753029152911",
"seller_nick": "宝卡袖旗舰店",
"detail_url": "https://item.taobao.com/item.htm?id=753029152911"
},
{
"title": "毛呢半身裙高腰短裙秋款女装2023新款搭配毛衣A字裙一步裙包臀裙",
"pic_url": "http://gw.alicdn.com/i1/670226640/O1CN01D5A23u1yvAeYowA83_!!670226640.jpg",
"orginal_price": "55.0",
"promotion_price": "55.0",
"price": "55.0",
"sales": 1000,
"num_iid": "682234484555",
"seller_nick": "小靓点服饰",
"detail_url": "https://item.taobao.com/item.htm?id=682234484555"
},
{
"title": "中老年人女装奶奶冬装短款棉衣加绒加厚老人太太棉服棉袄宽松大码",
"pic_url": "http://gw.alicdn.com/i4/643568599/O1CN01L04FDo2DOOYY0g2Zp_!!643568599.jpg",
"orginal_price": "88.0",
"promotion_price": "88.0",
"price": "88.0",
"sales": 1000,
"num_iid": "657024645085",
"seller_nick": "百福缘商城店",
"detail_url": "https://item.taobao.com/item.htm?id=657024645085"
},
{
"title": "小妈风连衣裙女包臀裙黑丝搭配加绒加厚裙子辣妹穿搭秋冬女装套装",
"pic_url": "http://gw.alicdn.com/i4/3694437632/O1CN01HKg2c426FVdoRXax6_!!0-item_pic.jpg",
"orginal_price": "49.9",
"promotion_price": "49.9",
"price": "49.9",
"sales": 1000,
"num_iid": "733106184642",
"seller_nick": "霍丽丝旗舰店",
"detail_url": "https://item.taobao.com/item.htm?id=733106184642"
},
{
"title": "GUJI谷纪女装羽绒服女短款2023年新款冬季加厚宽松连帽小个子外套",
"pic_url": "http://gw.alicdn.com/i3/693302686/O1CN01TszacW1ViEiCtF5I6_!!693302686.jpg",
"orginal_price": "418.0",
"promotion_price": "418.0",
"price": "418.0",
"sales": 1000,
"num_iid": "739749802327",
"seller_nick": "GUJI谷纪女装",
"detail_url": "https://item.taobao.com/item.htm?id=739749802327"
},
{
"title": "撞色半高领针织毛衣女装2024春季秋冬修身洋气内搭上衣黑色打底衫",
"pic_url": "http://gw.alicdn.com/i1/862293184/O1CN01MXFRPb1ZOJyLxvNMz_!!862293184.jpg",
"orginal_price": "39.9",
"promotion_price": "39.9",
"price": "39.9",
"sales": 1000,
"num_iid": "750327889558",
"seller_nick": "莼白CHUNBAI品质生活纯白家女装",
"detail_url": "https://item.taobao.com/item.htm?id=750327889558"
}
],
"item_weight_update": 0
},