当前位置: 首页 > news >正文

淘宝API接口(item_search- 关键词搜索淘宝商品列表数据查询)

淘宝 API 接口中的 item_search(关键词搜索淘宝商品列表数据查询)是一个非常重要的接口,用于根据指定的关键词搜索淘宝平台上的商品信息,并返回相关的商品列表数据。以下是关于该接口的详细介绍:

  1. 请求参数
    • q:搜索关键字,这是必填参数,用于指定要搜索的商品关键词,例如 “女装”“运动鞋” 等。
    • cat:分类 id,可选参数,用于指定商品的分类,以便更精确地搜索到符合特定分类的商品。如果不填写该参数,将搜索所有分类的商品。
    • start_price:开始价格,可选参数,用于设置搜索商品的价格范围的起始值。
    • end_price:结束价格,可选参数,用于设置搜索商品的价格范围的结束值。
    • sort:排序方式,可选参数,支持多种排序方式,如 bid(总价)、bid2(商品价格)、_sale(销量,加 _ 前缀为从大到小排序)、_credit(信用)等。
    • page:页数,可选参数,用于指定要获取的搜索结果页面。淘宝的搜索结果通常会分页显示,通过设置该参数可以获取不同页面的商品信息。
    • page_size:每页宝贝数量,可选参数,默认值一般为 40。可以根据需求设置每页显示的商品数量。
    • seller_info:是否获取商家信息,可选参数,默认值为 yes。如果设置为 yes,则返回的商品信息中会包含商家的相关信息;如果设置为 no,则不返回商家信息。
  2. 响应参数
    • title:商品标题,描述了商品的名称或主要特征。
    • pic_url:宝贝图片链接,通过该链接可以获取商品的图片。
    • promotion_price:优惠价,如果商品有促销活动,该参数会显示优惠后的价格。
    • price:价格,商品的原始价格。
    • sales:销量,显示商品的销售数量。
    • num_iid:宝贝 id,淘宝商品的唯一标识符,可用于后续对商品的详细信息查询等操作。
    • seller_nick:掌柜昵称,即商家的淘宝昵称。
    • detail_url:宝贝链接,点击该链接可以跳转到淘宝商品的详情页面。
  3. 使用示例

taobao.item_search-按关键字搜索淘宝商品列表数据API接口返回值说明

1.请求参数

请求参数:q=女装&start_price=0&end_price=0&page=1&cat=0&discount_only=&sort=&page_size=&seller_info=&nick=&ppath=&imgid=&filter=

参数说明:q:搜索关键字
page:页数

2.请求示例 (以 Python 为例,前往体验API:如o0b.cn/opandy 

    
-- 请求示例 url 默认请求参数已经URL编码处理
curl -i "https://api-vx.Taobaoapi2014.cn/taobao/item_search/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&q=女装&start_price=0&end_price=0&page=1&cat=0&discount_only=&sort=&page_size=&seller_info=&nick=&ppath=&imgid=&filter="

3.响应示例

{"items": {"page": "1","real_total_results": "360000","total_results": "360000","page_size": 10,"pagecount": "200","_ddf": "szx","item": [{"title": "高腰百搭羊羔绒阔腿裤冬季保暖","pic_url": "https://img.alicdn.com/img/bao/uploaded/i4/O1CN01TpegE82EAUGWQD2JI_!!0-item_pic.jpg","promotion_price": "50.00","orginal_price": "50.00","price": "50.00","sales": 0,"num_iid": "756775095301","seller_id": "1704328704","detail_url": "https://item.taobao.com/item.htm?id=756775095301"},{"title": "德绒圆领打底衫短款修身内搭长袖T恤女秋冬纯色弧形小众百搭上衣","pic_url": "https://img.alicdn.com/img/bao/uploaded/i4/O1CN01xuzAuZ2LY21GBhlfE_!!3937219703-0-C2M.jpg","promotion_price": "44.40","orginal_price": "44.40","price": "44.40","sales": 0,"num_iid": "825927041956","seller_id": "3937219703","detail_url": "https://item.taobao.com/item.htm?id=825927041956"},{"title": "美式辣妹螺纹修身女打底衫长袖","pic_url": "https://img.alicdn.com/img/bao/uploaded/i4/O1CN010d2Jxj1ZOJwsXSEHg_!!862293184.jpg","promotion_price": "58.00","orginal_price": "58.00","price": "58.00","sales": 0,"num_iid": "735775262176","seller_id": "862293184","detail_url": "https://item.taobao.com/item.htm?id=735775262176"},{"title": "2024年新款高腰复古牛仔裤女秋季","pic_url": "https://img.alicdn.com/img/bao/uploaded/i4/O1CN01YfwUGX1h1tbd5rczJ_!!2206584264218-0-C2M.jpg","promotion_price": "59.85","orginal_price": "59.85","price": "59.85","sales": 0,"num_iid": "837243885999","seller_id": "2206584264218","detail_url": "https://item.taobao.com/item.htm?id=837243885999"},{"title": "【秋冬绝美可单穿慵懒小上衣】","pic_url": "https://img.alicdn.com/img/bao/uploaded/i4/O1CN01m6HRZH1zxkhIMd3OG_!!0-item_pic.jpg","promotion_price": "57.00","orginal_price": "57.00","price": "57.00","sales": 0,"num_iid": "818387607863","seller_id": "2209434566781","detail_url": "https://item.taobao.com/item.htm?id=818387607863"},{"title": "秋季新款复古高腰阔腿牛仔裤女宽松显瘦垂感拖地直筒长裤水洗做旧","pic_url": "https://img.alicdn.com/img/bao/uploaded/i4/O1CN01aJeIvR1mQEi3d7tnq_!!2206588314948-2-C2M.jpg","promotion_price": "74.85","orginal_price": "74.85","price": "74.85","sales": 0,"num_iid": "819491929229","seller_id": "2206588314948","detail_url": "https://item.taobao.com/item.htm?id=819491929229"},{"title": "美式复古豹纹牛仔裤女男夏季潮牌小众阔腿裤宽松垂感休闲长裤腰带","pic_url": "https://img.alicdn.com/img/bao/uploaded/i4/O1CN01fQC8Vc2LY21fSyrpo_!!3937219703-0-C2M.jpg","promotion_price": "55.80","orginal_price": "55.80","price": "55.80","sales": 0,"num_iid": "797999211515","seller_id": "3937219703","detail_url": "https://item.taobao.com/item.htm?id=797999211515"},{"title": "u领冬季白色内搭长袖秋季上衣女秋冬打底衫短款秋衣春秋修身t恤","pic_url": "https://img.alicdn.com/img/bao/uploaded/i4/O1CN01XfN4ys1I8Qr51Xkzq_!!0-item_pic.jpg","promotion_price": "47.75","orginal_price": "47.75","price": "47.75","sales": 0,"num_iid": "835469595962","seller_id": "2216045650848","detail_url": "https://item.taobao.com/item.htm?id=835469595962"},{"title": "【李佳锜推荐】高领内搭打底衫女","pic_url": "https://img.alicdn.com/img/bao/uploaded/i4/O1CN01X1jpKO1Xzl0WvcLqA_!!0-item_pic.jpg","promotion_price": "59.00","orginal_price": "59.00","price": "59.00","sales": 0,"num_iid": "690366689843","seller_id": "3855402995","detail_url": "https://item.taobao.com/item.htm?id=690366689843"},{"title": "高腰休闲宽松条纹运动裤","pic_url": "https://img.alicdn.com/img/bao/uploaded/i4/O1CN01yL3DXE1ToWxdKP8UP_!!0-item_pic.jpg","promotion_price": "42.78","orginal_price": "42.78","price": "42.78","sales": 0,"num_iid": "841863957500","seller_id": "2132122429","detail_url": "https://item.taobao.com/item.htm?id=841863957500"}],"item_weight_update": 0},"error_code": "0000","reason": "ok","secache": "a8881ed5637e3c7e84f03acdc86be64f","secache_time": 1729489209,"secache_date": "2024-10-21 13:40:09","translate_status": "","translate_time": 0,"language": {"default_lang": "cn","current_lang": "cn"},"error": "","cache": 0,"api_info": "today:57 max:10000 all[2982=57+30+2895];expires:2030-10-30","execution_time": "1.911","server_time": "Beijing/2024-10-21 13:40:09","client_ip": "61.131.237.50","call_args": {"q": "女装","start_price": "0","end_price": "0","page": "1","cat": "0"},"api_type": "taobao","translate_language": "zh-CN","translate_engine": "","server_memory": "4.39MB","request_id": "gw-3.6715e9377d64c","last_id": "3628047818"
}

 


http://www.mrgr.cn/news/62721.html

相关文章:

  • 探秘 Feign 核心注解:@FeignClient 和 @EnableFeignClients 是如何打通微服务通信的 “任督二脉” 的?
  • 理解 Vue 的单向数据流
  • 新兴斗篷cloak技术,你了解吗?
  • 相关矩阵图——Python实现
  • 记第一次本地编译seatunnel源码
  • 【机器学习】 15. SVM 支撑向量机 support vector machine,拉格朗日,软边界,核函数
  • 基于单片机的智能家居排气扇系统设计
  • 外贸单证小技巧,Winseeing汇信外贸软件让制单事半功倍
  • Es 基础操作 增删改查
  • Spring Cloud Gateway
  • 深度学习常见面试题及答案(41~45)
  • 动态规划 —— 路径问题-下降路径最小和
  • 什么是x86架构,什么是arm架构
  • 算法竞赛——02基本算法
  • AI机西好用吗?有哪些实用功能?真实用户体验告诉你!
  • 网鼎杯2024青龙组官方资格赛wp
  • 接入AI后,开源项目顿时有趣了
  • JVM(HotSpot):finally块的相关问题
  • CSS网页布局综合练习(涵盖大多CSS知识点)
  • 台州ctf市赛reverse(easy_choice)超详细复现
  • 什么是决策树桩
  • 因特网的概述和三种交换方式
  • C++笔记---可变参数模板
  • XHCI 1.2b 规范摘要(八)
  • 从零实现数据结构:二叉搜索树
  • 【HTML5标准】深度解析HTML5:前端开发的基石