淘宝搜索引擎API接口关键字搜索商品列表获取商品详情价格评论销量API

item_search-按关键字搜索淘宝商品

公共参数  查看API完整文档

名称类型必须描述
keyString调用key(必须以GET方式拼接在URL中)
secretString调用密钥
api_nameStringAPI接口名称(包括在请求地址中)[item_search,item_get,item_search_shop等]
cacheString[yes,no]默认yes,将调用缓存的数据,速度比较快
result_typeString[json,jsonu,xml,serialize,var_export]返回数据格式,默认为json,jsonu输出的内容中文可以直接阅读
langString[cn,en,ru]翻译语言,默认cn简体中文
versionStringAPI版本

API请求示例

<?php// 请求示例 url 默认请求参数已经URL编码处理
// 本示例代码未加密secret参数明文传输,若要加密请参考:API文档
$method = "GET";
$url = "https://api-gw.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=";
$curl = curl_init();
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST,FALSE);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER,FALSE);
curl_setopt($curl, CURLOPT_FAILONERROR, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HEADER, true);
curl_setopt($curl, CURLOPT_ENCODING, "gzip");
var_dump(curl_exec($curl));
?>

 

响应示例

"items": {"page": "1","real_total_results": 200,"total_results": 2000,"page_size": 20,"pagecount": 100,"data_from": "szx","item": [{"title": "秋冬中长款女士毛呢大衣高档柔软面料中老年妈妈女装修身呢子外套","pic_url": "http://gw.alicdn.com/i1/832633895/O1CN01v9nrhx1edxYezbajh_!!832633895.jpg","orginal_price": "329.8","promotion_price": "329.8","price": "329.8","sales": 1,"num_iid": "741361161153","seller_nick": "啄木鸟运营店","detail_url": "https://item.taobao.com/item.htm?id=741361161153"},{"title": "飞行员夹克设计感小众街头棒球服2023新款女装美式复古外套女春秋","pic_url": "http://gw.alicdn.com/i2/2187834683/O1CN01t7kDTh1kSrfLoyUfv_!!2187834683.jpg","orginal_price": "55.9","promotion_price": "55.9","price": "55.9","sales": 1,"num_iid": "744425139997","seller_nick": "小CC女装小店","detail_url": "https://item.taobao.com/item.htm?id=744425139997"},{"title": "外套女春秋2023新款秋装修身套装女装上衣运动粉色棉质卫衣秋季薄","pic_url": "http://gw.alicdn.com/i1/2950624550/O1CN01nS6I4u1jTwzT3USqP_!!2950624550.jpg","orginal_price": "79.0","promotion_price": "79.0","price": "79.0","sales": 2,"num_iid": "744703721325","seller_nick": "张小瑶同学","detail_url": "https://item.taobao.com/item.htm?id=744703721325"},{"title": "2023新款高级设计感洋气ins开衫上衣小香风短款长袖外套女装","pic_url": "http://gw.alicdn.com/i1/2832801581/O1CN017Q6zKJ1NY93cQ0rXJ_!!2832801581.jpg","orginal_price": "93.6","promotion_price": "93.6","price": "93.6","sales": 1,"num_iid": "739552657500","seller_nick": "墨雾港风休闲女装","detail_url": "https://item.taobao.com/item.htm?id=739552657500"},{"title": "欧阳喜《夏日绮梦》新国风女装夏季约会裙子气质少女新中式连衣裙","pic_url": "http://gw.alicdn.com/i4/96605289/O1CN012bFthB1owPi1c5yFJ_!!0-item_pic.jpg","orginal_price": "158.0","promotion_price": "158.0","price": "158.0","sales": 8,"num_iid": "719479968768","seller_nick": "欧阳喜OYANXI","detail_url": "https://item.taobao.com/item.htm?id=719479968768"},{"title": "小妈风连衣裙女包臀裙黑丝搭配的裙子辣妹穿搭秋冬季新款女装套装","pic_url": "http://gw.alicdn.com/i1/2215532503471/O1CN013u9ROP1bVldF8XpVB_!!2215532503471.jpg","orginal_price": "26.9","promotion_price": "26.9","price": "26.9","sales": 100,"num_iid": "744926439879","seller_nick": "曼茜欣","detail_url": "https://item.taobao.com/item.htm?id=744926439879"},{"title": "风衣女士中长款小个子2023春秋季女装新款英伦风大衣外套时尚洋气","pic_url": "http://gw.alicdn.com/i2/2187834683/O1CN01fgMsZe1kSrfKhHZaB_!!2187834683.jpg","orginal_price": "75.9","promotion_price": "75.9","price": "75.9","sales": 3,"num_iid": "744691099355","seller_nick": "小CC女装小店","detail_url": "https://item.taobao.com/item.htm?id=744691099355"},{"title": "连帽卫衣女秋冬2023年女装妈妈上衣冬季加绒加厚洋气外套","pic_url": "http://gw.alicdn.com/i4/2960160722/O1CN01vf0Hhe1HCiqZzHn7Q_!!2960160722.jpg","orginal_price": "13.8","promotion_price": "13.8","price": "13.8","sales": 20,"num_iid": "744548004840","seller_nick": "AE服饰女装店","detail_url": "https://item.taobao.com/item.htm?id=744548004840"},{"title": "纯棉奶乖连帽卫衣女秋冬2023新款小个子宽松字母印花女装秋季上衣","pic_url": "http://gw.alicdn.com/i2/2214359593133/O1CN01ceA2Nf1Z0xlbTPEM5_!!2214359593133.jpg","orginal_price": "49.88","promotion_price": "49.88","price": "49.88","sales": 6,"num_iid": "746376707675","seller_nick": "欧雅坊精品女装","detail_url": "https://item.taobao.com/item.htm?id=746376707675"},{"title": "优衣库男装女装情侣装(UT) kaws卫衣T恤长袖印花运动衫亲子467395","pic_url": "http://gw.alicdn.com/i1/196993935/O1CN014uESyl1ewHQwjddBN_!!0-item_pic.jpg","orginal_price": "199.0","promotion_price": "199.0","price": "199.0","sales": 500,"num_iid": "735603199058","seller_nick": "优衣库官方旗舰店","detail_url": "https://item.taobao.com/item.htm?id=735603199058"},{"title": "优衣库男装女装情侣装(UT) kaws卫衣T恤长袖印花运动衫亲子467773","pic_url": "http://gw.alicdn.com/i1/196993935/O1CN01UgzWwH1ewHQsy0l65_!!0-item_pic.jpg","orginal_price": "199.0","promotion_price": "199.0","price": "199.0","sales": 1000,"num_iid": "735606555790","seller_nick": "优衣库官方旗舰店","detail_url": "https://item.taobao.com/item.htm?id=735606555790"},{"title": "优衣库 宋轶同款 男装女装情侣装UT kaws印花T恤短袖亲子装467775","pic_url": "http://gw.alicdn.com/i2/196993935/O1CN01mRnSpr1ewHR2dQ5uF_!!0-item_pic.jpg","orginal_price": "99.0","promotion_price": "99.0","price": "99.0","sales": 500,"num_iid": "735604199230","seller_nick": "优衣库官方旗舰店","detail_url": "https://item.taobao.com/item.htm?id=735604199230"},{"title": "白色长袖t恤纯棉宽松加绒打底衫女内搭大码上衣秋季新款女装","pic_url": "http://gw.alicdn.com/i2/2187834683/O1CN01UB41Mm1kSrfJdews1_!!2187834683.jpg","orginal_price": "49.9","promotion_price": "49.9","price": "49.9","sales": 4,"num_iid": "744695399084","seller_nick": "小CC女装小店","detail_url": "https://item.taobao.com/item.htm?id=744695399084"},{"title": "早秋装新款妈妈上衣服大码宽松长袖条纹t恤女装体恤内搭打底衫女","pic_url": "http://gw.alicdn.com/i4/2960160722/O1CN01oIX6MH1HCiqmtmfcv_!!2960160722.jpg","orginal_price": "7.8","promotion_price": "7.8","price": "7.8","sales": 20,"num_iid": "744553812924","seller_nick": "AE服饰女装店","detail_url": "https://item.taobao.com/item.htm?id=744553812924"},{"title": "优衣库 男装女装情侣装(UT) kaws印花T恤(短袖亲子装)467525","pic_url": "http://gw.alicdn.com/i3/196993935/O1CN01ZcPAli1ewHR4CkgBl_!!0-item_pic.jpg","orginal_price": "99.0","promotion_price": "99.0","price": "99.0","sales": 200,"num_iid": "735461950612","seller_nick": "优衣库官方旗舰店","detail_url": "https://item.taobao.com/item.htm?id=735461950612"},{"title": "半高领德绒打底衫女装内搭长袖上衣秋冬中领加厚t恤","pic_url": "http://gw.alicdn.com/i4/2216751516082/O1CN01Y0LkQ41unblJsfvND_!!2216751516082.jpg","orginal_price": "29.9","promotion_price": "29.9","price": "29.9","sales": 10,"num_iid": "744350316840","seller_nick": "晨晨时尚女装","detail_url": "https://item.taobao.com/item.htm?id=744350316840"},{"title": "优衣库 男装女装情侣装(UT) kaws印花T恤(短袖亲子装)467774","pic_url": "http://gw.alicdn.com/i4/196993935/O1CN01fa7iYx1ewHR28pPQ6_!!0-item_pic.jpg","orginal_price": "99.0","promotion_price": "99.0","price": "99.0","sales": 500,"num_iid": "735602171641","seller_nick": "优衣库官方旗舰店","detail_url": "https://item.taobao.com/item.htm?id=735602171641"},{"title": "黑色微喇牛仔裤女装小个子高腰喇叭裤修身显瘦复古马蹄裤子春秋","pic_url": "http://gw.alicdn.com/i1/2201475355988/O1CN01jOu30Q1u6YWy49la2_!!2201475355988.jpg","orginal_price": "49.9","promotion_price": "49.9","price": "49.9","sales": 1,"num_iid": "744835150284","seller_nick": "依岚服装","detail_url": "https://item.taobao.com/item.htm?id=744835150284"},{"title": "秋冬新款窄版高腰阔腿裤女小个子女装松紧腰休闲裤加绒垂感长裤","pic_url": "http://gw.alicdn.com/i2/2244309596/O1CN01kNuu4N2Kl1SSfx5sy_!!2244309596.jpg","orginal_price": "49.0","promotion_price": "49.0","price": "49.0","sales": 5,"num_iid": "699982776245","seller_nick": "都米郡纯棉女装","detail_url": "https://item.taobao.com/item.htm?id=699982776245"},{"title": "美式卫衣女装学生韩版宽松潮ins春秋冬季拉链外套加绒加厚连帽bf","pic_url": "http://gw.alicdn.com/i3/2692282779/O1CN01sknuw11WOpYMJkuCm_!!2692282779.jpg","orginal_price": "48.0","promotion_price": "48.0","price": "48.0","sales": 1,"num_iid": "742540458371","seller_nick": "酱酱欧尼小个子穿搭","detail_url": "https://item.taobao.com/item.htm?id=742540458371"}],"item_weight_update": 0},

 

错误码解释

状态代码(error_code)状态信息详细描述是否收费
0000success接口调用成功并返回相关数据
2000Search success but no result接口访问成功,但是搜索没有结果
4000Server internal error服务器内部错误
4001Network error网络错误
4002Target server error目标服务器错误
4003Param error用户输入参数错误忽略
4004Account not found用户帐号不存在忽略
4005Invalid authentication credentials授权失败忽略
4006API stopped您的当前API已停用忽略
4007Account stopped您的账户已停用忽略
4008API rate limit exceeded并发已达上限忽略
4009API maintenanceAPI维护中忽略
4010API not found with these valuesAPI不存在忽略
4012Please add api first请先添加api忽略
4013Number of calls exceeded调用次数超限忽略
4014Missing url param参数缺失忽略
4015Wrong pageToken参数pageToken有误忽略
4016Insufficient balance余额不足忽略
4017timeout error请求超时
5000unknown error未知错误

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/626586.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

产品运营--面试必会

工作内容&#xff1a; 行业竞品调研 包括&#xff1a; 产品上线的新功能发布的活动&#xff08;活动方案、活动头图设计、运营的策略、奖励机制、开展活动的数据分析、带来的收益和影响&#xff09; 用户需求逻辑催生产品策略 场景时间段用户需求频率、路径 产品、路径…

Mac安装MySQL

环境 电脑: macOS Monterey 12.7.2 MacBook Pro( Retina, 13-inch, Early 2015) 处理器: 2.7GHz 双核 Inter Core i5 MySQL 的安装版本: 8.2.0 最近有更新系统, 重新配置了电脑, 因此, 之前安装的 MySQL 也都删除了, 这次安装经历有点坎坷, 记录下来, 希望可以帮助到需要的小伙…

1.12号网络

1 网络发展历史 1.1 APRAnet阶段 阿帕网&#xff0c;是Interne的最早雏形 不能互联不同类型的计算机和不同类型的操作系统 没有纠错功能 1.2 TCP/IP两个协议阶段 什么是协议 在计算机网络中&#xff0c;要做到有条不紊的交换数据&#xff0c;需要遵循一些事先约定好的规则…

(程序员专用简历助手)Prompt提示词

程序员专用简历助手 给大家提供了两种Prompt模版第一种是程序员通用型第二个是Java面试简历模版 给大家提供了两种Prompt模版 首先感谢大家的订阅&#xff0c;我会尽可能多的去提供给大家各种Prompt模版&#xff0c;第一次给大家提供了这两种Prompt模版&#xff0c;可以让chat…

Transformer详解(附代码实现及翻译任务实现)

一&#xff1a;了解背景和动机 阅读Transformer论文&#xff1a; 阅读原始的Transformer论文&#xff1a;“Attention is All You Need”&#xff0c;由Vaswani等人于2017年提出&#xff0c;是Transformer模型的开创性工作。 二&#xff1a;理解基本构建块 注意力机制&#…

Vue-20、Vue监测数组改变

1、数组调用以下方法Vue可以监测到。 arr.push(); 向数组的末尾追加元素 const array [1,2,3] const result array.push(4) // array [1,2,3,4] // result 4arr.pop(); 删除末尾的元素 const array [a, b] array.pop() // b array.pop() // a array.pop() // undefi…

react经验9:循环渲染的语法活用

在react中&#xff0c;循环渲染一般这么写 <ul> {list.map(item>(<li key{item.key}>{item.value}</li>)) } </ul>react语法规定每个循环的标签需要加不重复的key&#xff0c;只能有一个根标签。 如果一次循环要输出多个标签怎么办&#xff1f; i…

GaussDB数据库中的MERGE INTO介绍

一、前言 二、GaussDB MERGE INTO 语句的原理概述 1、MERGE INTO 语句原理 2、MERGE INTO 的语法 3、语法解释 三、GaussDB MERGE INTO 语句的应用场景 四、GaussDB MERGE INTO 语句的示例 1、示例场景举例 2、示例实现过程 1&#xff09;创建两个实验表&#xff0c;并…

Shell编程--expect

Expect 用法expect的安装实战——非交互式ssh连接案例1&#xff1a;普通操作案例2&#xff1a;设置变量与进行传参的方式案例3&#xff1a;进行批量推送公钥实现免密连接&#xff0c;ping通一个ip地址连接一个ip 实现批量修改密码&#xff0c;批量推送ssh的公钥&#xff0c;进行…

宝宝洗衣机买几公斤?婴儿专用洗衣机测评

由于幼龄时期的宝宝的皮肤比较娇嫩&#xff0c;很容易受到伤害。所以小宝宝的衣服一般都是棉质的&#xff0c;很柔软&#xff0c;很亲肤的&#xff0c;为的就是保护宝贝们娇嫩的肌肤。而宝宝们在日常中更换衣物会相对频繁&#xff0c;换的衣物也必须及时清洗晾晒&#xff0c;以…

ConcurrentHashMap源码解析

1.介绍一下ConcurrentHashMap? concurrentHashMap是一个线程安全的集合&#xff0c;在HashMap基础上进行了优化&#xff0c;在JDK1.7中&#xff0c;ConcurrentHashMap由一个个的Segment组成&#xff0c;每个Segment就是一个类似于HashMap的结构&#xff0c;每个Segement可以单…

网络文件共享服务 FTP

一、存储类型 存储类型分为三种 直连式存储&#xff1a;Direct-Attached Storage&#xff0c;简称DAS 存储区域网络&#xff1a;Storage Area Network&#xff0c;简称SAN&#xff08;可以使用空间&#xff0c;管理也是你来管理&#xff09; 网络附加存储&#xff1a;Network…

model introduction

文章目录 前言一、传统机器学习方法1、基于规则的模型2、基于概率的模型3、基于几何学的模型4、基于统计的模型 二、深度学习方法1、Feed-Forward Neural Networks&#xff08;前馈神经网络&#xff09;2. RNN-Based Models&#xff08;基于循环神经网络的模型&#xff09;3. C…

日志配置(OpenFeign)

日志级别 NONE&#xff1a; 不记录任何日志&#xff08;默认值&#xff09;BASIC&#xff1a;仅记录请求方法、URL、应答状态码、执行时间HEADERS: 在BASIC的基础上&#xff0c;记录请求和应答的headerFULL: 记录请求和应答的header、body、元数据 修改级别 配置类配置文件 …

精心挑选免费好用的api,推荐给大家

企业基本信息&#xff1a;通过公司名称/公司ID/注册号或社会统一信用代码获取企业基本信息&#xff0c;企业基本信息包括公司名称或ID、类型、成立日期、经营状态、注册资本、法人、工商注册号、统一社会信用代码、组织机构代码、纳税人识别号等字段信息。 AI绘画-Stable Diff…

当代大学生是怎么被废掉的?

中式教育以应试为核心&#xff0c;强调知识的灌输和学生被动接受。随着社会的发展&#xff0c;中式教育的短板逐渐显现&#xff0c;创新能力的缺乏、对记忆的过度依赖、忽视个体差异等问题日益突出。 建议所有大学生都能去看看《上海交通大学生存手册》&#xff0c;它道出了中…

Flutter首页框架搭建

1.下载flutter 2. 安装android 3.配置环境变量 关于环境搭建部分&#xff0c;哪天写一下&#xff0c;日志杂乱无章。 打开android studio 新建项目&#xff0c;选择flutter 新建文件夹创建 navigator和pages 文件夹下分别创建文件&#xff0c;tab_navigator.dart&#xff…

【Android Gradle 插件】Android 依赖管理 ① ( 依赖库匹配 | 依赖库查找顺序及路径 | Gradle 资源库 )

一、依赖库匹配 依赖库匹配 : 依赖库由三部分组成 依赖库分组依赖库名称依赖库版本号 只有三者都对上 , 依赖库才能匹配上 , 如 dependencies {implementation androidx.appcompat:appcompat:1.3.1 }依赖库分组为 androidx.appcompat , 依赖库名称为 appcompat , 依赖库版本…

云厂商不能花钱当老六

1. 愤怒的国产“三大废物” 12月份的时候&#xff0c;某中立市场分析公司发表了它们的行业分析“刀乐象现”。透过各种浮躁的“领导、远见”之后&#xff0c;大致意思就是&#xff1a; A是老大&#xff1b;我没意见&#xff1b;A是老二&#xff1b;我也没意见。咕咕咕咯咯咯哒是…

深入理解 PyTorch 激活函数:从基础到高效实用技巧(3)

目录 torch.nn.functional激活层详解 logsigmoid 1. 函数用途 2. 参数详解 3. LogSigmoid函数的定义及数学解释 4. 使用示例 hardshrink 1. 函数用途 2. 参数详解 3. Hardshrink函数的定义及数学解释 4. 使用示例 tanhshrink 1. 函数用途 2. 参数详解 3. Tanhsh…