淘宝搜索引擎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,一经查实,立即删除!

相关文章

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;需要遵循一些事先约定好的规则…

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…

GaussDB数据库中的MERGE INTO介绍

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

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

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

网络文件共享服务 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…

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

中式教育以应试为核心&#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;我也没意见。咕咕咕咯咯咯哒是…

Spring Boot 中实现定时任务(quartz)功能实战

&#x1f3c6;作者简介&#xff0c;普修罗双战士&#xff0c;一直追求不断学习和成长&#xff0c;在技术的道路上持续探索和实践。 &#x1f3c6;多年互联网行业从业经验&#xff0c;历任核心研发工程师&#xff0c;项目技术负责人。 &#x1f389;欢迎 &#x1f44d;点赞✍评论…

电脑锁屏时间怎么设置?跟着这篇教程轻松搞定

在现代社会&#xff0c;我们使用电脑的时间越来越长&#xff0c;为了保护个人隐私和确保信息安全&#xff0c;设置电脑锁屏时间成为一项重要的操作。可是电脑锁屏时间怎么设置呢&#xff1f;本文将介绍三种常见的方法&#xff0c;详细解释如何设置电脑的锁屏时间&#xff0c;以…

TDengine 如何进行数据建模

小 T 导读&#xff1a;在使用 TDengine 的时候&#xff0c;通过官网的技术文档可以学习到建库&#xff08;database&#xff09;、建表&#xff08;table&#xff09;的各种 SQL 语句&#xff0c;但是一旦要跟自己的具体业务场景结合&#xff0c;经验不足的朋友可能会不知道到底…

指针及其应用

1.定义 指针&#xff1a;也是一个变量&#xff0c;存放所指变量的地址&#xff0c;根据变量定义的不同&#xff0c;指针指向的类型也不同 注意&#xff1a;*是与前面类型一体的 int main(void) {int* p; //等价于int *p;//为了区分变量&#xff0c;C语言中一般将*放置于变量…

.NET 8.0 发布到 IIS

如何在IIS&#xff08;Internet信息服务&#xff09;上发布ASP.NET Core 8&#xff1f; 在本文中&#xff0c;我假设您的 Windows Server IIS 上已经有一个应用程序池。 按照步骤了解在 IIS 环境下发布 ASP.NET Core 8 应用程序的技巧。 您需要设置代码以支持 IIS 并将项目配…

智算让大模型触手可及

本文整理自2023年 12 月 20 日举办的「2023 百度云智大会智算大会」主论坛&#xff0c;百度智能云 AI 与大数据平台总经理忻舟的主题演讲《智算让大模型触手可及》。 在之前极客公园举办的创新大会上&#xff0c;百度集团董事长兼 CEO 李彦宏先生提到&#xff1a;卷 AI 原生应用…

【Linux】各目录说明

【常见目录说明】 目录 /bin 存放二进制可执行文件(ls,cat,mkdir等)&#xff0c;常用命令一般都在这里。 /etc 存放系统管理和配置文件 /home 存放所有用户文件的根目录&#xff0c;是用户主目录的基点&#xff0c;比如用户user的主目录就是/home/user&#xff0c;可以…

智能助手的巅峰对决:ChatGPT对阵文心一言

在人工智能的世界里&#xff0c;ChatGPT与文心一言都是备受瞩目的明星产品。它们凭借先进的技术和强大的性能&#xff0c;吸引了大量用户的关注。但究竟哪一个在智能回复、语言准确性、知识库丰富度等方面更胜一筹呢&#xff1f;下面就让我们一探究竟。 首先来谈谈智能回复能力…