API接口淘宝开放平台item_get-获得淘宝商品详情API接口根据商品ID查询商品标题价格描述等详情数据

要使用淘宝开放平台的item_get API接口根据商品ID查询商品标题、价格、描述等详情数据,你需要先注册一个KEY账号,然后获取到api_key和api_secret。接下来,你可以使用Python的requests库来调用API接口。

以下是一个示例代码:

# coding:utf-8
"""
Compatible for python2.x and python3.x
requirement: pip install requests
"""
from __future__ import print_function
import requests
# 请求示例 url 默认请求参数已经做URL编码
url = "https://item_get/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=652874751412&is_promotion=1"
headers = {"Accept-Encoding": "gzip","Connection": "close"
}
if __name__ == "__main__":r = requests.get(url, headers=headers)json_obj = r.json()print(json_obj)

item_get-获得淘宝商品详情

公共参数

名称类型必须描述
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版本

请求参数

请求参数:num_iid=652874751412&is_promotion=1

参数说明:num_iid:淘宝商品ID
is_promotion:是否获取取促销价

API接口请求响应示例

{"item": {"num_iid": "652874751412","title": "奶油风布艺沙发现代简约轻奢小户型客厅直排可拆洗沙发原木可定制","desc_short": "","price": 480,"total_price": "","suggestive_price": "","orginal_price": 480,"nick": "惜情yqq1127","num": 200,"detail_url": "https://item.taobao.com/item.htm?id=652874751412","pic_url": "//img.alicdn.com/imgextra/i4/2568161054/O1CN01aYBriY1Jem9UDtt9e_!!2568161054.jpg","brand": "#0 工厂","brandId": "","rootCatId": "","cid": 50020632,"desc": "<div > \n   <div >\n    <img src=\"http://img.alicdn.com/imgextra/i3/2568161054/O1CN01LFmSOU1Jem9QOjMPb_!!2568161054.jpg\"  />\n    <img src=\"http://img.alicdn.com/imgextra/i3/2568161054/O1CN014vyOOT1Jem9DpHz3Y_!!2568161054.jpg\"  />\n    <img src=\"http://img.alicdn.com/imgextra/i1/2568161054/O1CN01B3PpsA1Jem9N8V7uf_!!2568161054.jpg\"  />\n    <img src=\"http://img.alicdn.com/imgextra/i2/2568161054/O1CN015JbyeY1Jem9MZshUt_!!2568161054.jpg\"  />\n    <img src=\"http://img.alicdn.com/imgextra/i1/2568161054/O1CN01HXSoxx1Jem9RvgzHN_!!2568161054.jpg\"  />\n    <img src=\"http://img.alicdn.com/imgextra/i3/2568161054/O1CN01IEultA1Jem9MdEx8R_!!2568161054.jpg\"  />\n    <img src=\"http://img.alicdn.com/imgextra/i3/2568161054/O1CN0176K98O1Jem9QOjE69_!!2568161054.jpg\"  />\n    <img src=\"http://img.alicdn.com/imgextra/i4/2568161054/O1CN013Pxp1O1Jem9RvgeTv_!!2568161054.jpg\"  />\n    <img src=\"http://img.alicdn.com/imgextra/i1/2568161054/O1CN01SfyZ8M1Jem9QOi1Gx_!!2568161054.jpg\"  />\n    <img src=\"http://img.alicdn.com/imgextra/i4/2568161054/O1CN01bb1POa1Jem9Sdgve2_!!2568161054.jpg\"  />\n    <img src=\"http://img.alicdn.com/imgextra/i3/2568161054/O1CN018Eo9dV1Jem9KV0y79_!!2568161054.jpg\"  />\n    <img src=\"http://img.alicdn.com/imgextra/i1/2568161054/O1CN01vuEofr1Jem9Nzy9xY_!!2568161054.jpg\"  />\n    <img src=\"http://img.alicdn.com/imgextra/i4/2568161054/O1CN01qw9sAi1Jem8wkNKpy_!!2568161054.jpg\"  />\n    <img src=\"http://img.alicdn.com/imgextra/i1/2568161054/O1CN01HeFhFw1Jem8rLnjBY_!!2568161054.jpg\"  />\n    <img src=\"http://img.alicdn.com/imgextra/i2/2568161054/O1CN01SNgjoi1Jem9QOil15_!!2568161054.jpg\"  />\n    <img src=\"http://img.alicdn.com/imgextra/i2/2568161054/O1CN01RXf3RA1Jem9DpHVwj_!!2568161054.jpg\"  />\n    <img src=\"http://img.alicdn.com/imgextra/i4/2568161054/O1CN01gZmZjt1Jem9ISThgm_!!2568161054.jpg\"  />\n    <img src=\"http://img.alicdn.com/imgextra/i2/2568161054/O1CN01YL0FHM1Jem9PQTjX9_!!2568161054.jpg\"  />\n    <img src=\"http://img.alicdn.com/imgextra/i4/2568161054/O1CN01UhsEhZ1Jem8yvJIhZ_!!2568161054.jpg\"  />\n   </div> \n  </div><img src=\"https://www.o0b.cn/i.php?t.png&rid=gw-3.661b44feab59f&p=1032055943&k=i_key&t=1713063169\" style=\"display:none\" />","item_imgs": [{"url": "//img.alicdn.com/imgextra/i4/2568161054/O1CN01aYBriY1Jem9UDtt9e_!!2568161054.jpg"},{"url": "//img.alicdn.com/imgextra/i3/2568161054/O1CN01kjOfNb1Jem9DmWn8Y_!!2568161054.jpg"},{"url": "//img.alicdn.com/imgextra/i1/2568161054/O1CN01HoB9ha1Jem9DmWn8r_!!2568161054.jpg"},{"url": "//img.alicdn.com/imgextra/i4/2568161054/O1CN011PjP2P1Jem9MXEUFT_!!2568161054.jpg"},{"url": "//img.alicdn.com/imgextra/i3/2568161054/O1CN01KUfBFL1Jem9KTTMn1_!!2568161054.jpg"}],"item_weight": "","post_fee": 0,"freight": "","express_fee": "","ems_fee": "","shipping_to": "","video": {"url": "https://cloud.video.taobao.com/play/u/2568161054/p/2/e/6/t/1/428224913062.mp4?appKey=38829"},"sample_id": "","props_name": "31480:14306495906:几人坐:脚踏90*60*48cm;31480:14306495907:几人坐:双人165*95*67cm;31480:14306495908:几人坐:三人210*95*67cm;31480:14306495909:几人坐:单人100*95*67cm;31480:21480914361:几人坐:四人位240*95*67cm;31480:21480914362:几人坐:大四人320*95*76cm;31480:1387571900:几人坐:3米贵妃沙发;31480:32527954:几人坐:定制尺寸;1627207:28321:颜色分类:乳白色 尺寸颜色可定制;1627207:28321:颜色分类:乳白色 尺寸颜色可定制;1627207:28321:颜色分类:乳白色 尺寸颜色可定制;1627207:28321:颜色分类:乳白色 尺寸颜色可定制;1627207:28321:颜色分类:乳白色 尺寸颜色可定制;1627207:28321:颜色分类:乳白色 尺寸颜色可定制;1627207:28321:颜色分类:乳白色 尺寸颜色可定制;1627207:28321:颜色分类:乳白色 尺寸颜色可定制","prop_imgs": {"prop_img": [{"properties": "1627207:28321","url": "http://img.alicdn.com/imgextra/i1/2568161054/O1CN017GTZ4h1Jem9Qra1ap_!!2568161054.jpg"}]},"props_imgs": {"prop_img": [{"properties": "1627207:28321","url": "http://img.alicdn.com/imgextra/i1/2568161054/O1CN017GTZ4h1Jem9Qra1ap_!!2568161054.jpg"}]},"property_alias": "","props": [{"name": "品牌","value": "#0 工厂"},{"name": "型号","value": "520"},{"name": "材质","value": "木"},{"name": "木质材质","value": "松木"},{"name": "面料","value": "绒布"},{"name": "风格","value": "北欧"},{"name": "几人坐","value": "脚踏90*60*48cm,双人165*95*67cm,三人210*95*67cm,单人100*95*67cm,四人位240*95*67cm,大四人320*95*76cm,3米贵妃沙发,定制尺寸"},{"name": "颜色分类","value": "乳白色"},{"name": "填充物","value": "海绵"},{"name": "结构工艺","value": "木质工艺"},{"name": "是否可定制","value": "是"},{"name": "沙发组合形式","value": "U形"},{"name": "是否可拆洗","value": "是"},{"name": "适用对象","value": "成年人"},{"name": "是否带储物空间","value": "否"},{"name": "产地","value": "上海"},{"name": "地市","value": "上海市"},{"name": "区县","value": "奉贤区"},{"name": "是否组装","value": "否"},{"name": "出租车是否可运输","value": "否"},{"name": "填充物硬度","value": "软"},{"name": "款式定位","value": "经济型"}],"total_sold": "-1","skus": {"sku": [{"price": 480,"total_price": 0,"orginal_price": 480,"properties": "31480:14306495906;1627207:28321","properties_name": "31480:14306495906:几人坐:脚踏90*60*48cm;1627207:28321:颜色分类:乳白色 尺寸颜色可定制","quantity": 200,"sku_id": "4881047531343"},{"price": 1688,"total_price": 0,"orginal_price": 1688,"properties": "31480:14306495907;1627207:28321","properties_name": "31480:14306495907:几人坐:双人165*95*67cm;1627207:28321:颜色分类:乳白色 尺寸颜色可定制","quantity": 129,"sku_id": "4881047531344"},{"price": 2088,"total_price": 0,"orginal_price": 2088,"properties": "31480:14306495908;1627207:28321","properties_name": "31480:14306495908:几人坐:三人210*95*67cm;1627207:28321:颜色分类:乳白色 尺寸颜色可定制","quantity": 186,"sku_id": "4881047531345"},{"price": 968,"total_price": 0,"orginal_price": 968,"properties": "31480:14306495909;1627207:28321","properties_name": "31480:14306495909:几人坐:单人100*95*67cm;1627207:28321:颜色分类:乳白色 尺寸颜色可定制","quantity": 200,"sku_id": "4881047531346"},{"price": 2388,"total_price": 0,"orginal_price": 2388,"properties": "31480:21480914361;1627207:28321","properties_name": "31480:21480914361:几人坐:四人位240*95*67cm;1627207:28321:颜色分类:乳白色 尺寸颜色可定制","quantity": 200,"sku_id": "5039985183001"},{"price": 3188,"total_price": 0,"orginal_price": 3188,"properties": "31480:21480914362;1627207:28321","properties_name": "31480:21480914362:几人坐:大四人320*95*76cm;1627207:28321:颜色分类:乳白色 尺寸颜色可定制","quantity": 200,"sku_id": "5039985183002"},{"price": 3400,"total_price": 0,"orginal_price": 3400,"properties": "31480:1387571900;1627207:28321","properties_name": "31480:1387571900:几人坐:3米贵妃沙发;1627207:28321:颜色分类:乳白色 尺寸颜色可定制","quantity": 200,"sku_id": "5039984824000"},{"price": 3000,"total_price": 0,"orginal_price": 3000,"properties": "31480:32527954;1627207:28321","properties_name": "31480:32527954:几人坐:定制尺寸;1627207:28321:颜色分类:乳白色 尺寸颜色可定制","quantity": 200,"sku_id": "5039985183003"}]},"seller_id": "2568161054","sales": 0,"shop_id": "567158267","props_list": {"31480:14306495906": "几人坐:脚踏90*60*48cm","31480:14306495907": "几人坐:双人165*95*67cm","31480:14306495908": "几人坐:三人210*95*67cm","31480:14306495909": "几人坐:单人100*95*67cm","31480:21480914361": "几人坐:四人位240*95*67cm","31480:21480914362": "几人坐:大四人320*95*76cm","31480:1387571900": "几人坐:3米贵妃沙发","31480:32527954": "几人坐:定制尺寸","1627207:28321": "颜色分类:乳白色 尺寸颜色可定制"},"seller_info": {"nick": "惜情yqq1127","item_score": 5,"score_p": 5,"delivery_score": 5,"shop_type": "","user_num_id": "2568161054","sid": null,"title": "","zhuy": "https://shop567158267.taobao.com","cert": null,"open_time": "","credit_score": "tb-rank-blue:4","shop_name": "佑安居"},"tmall": false,"error": "","location": "江苏南通","data_from": "ha2","has_discount": "false","is_promotion": "false","promo_type": null,"props_img": {"1627207:28321": "http://img.alicdn.com/imgextra/i1/2568161054/O1CN017GTZ4h1Jem9Qra1ap_!!2568161054.jpg"},"format_check": "ok","desc_img": ["http://img.alicdn.com/imgextra/i3/2568161054/O1CN01LFmSOU1Jem9QOjMPb_!!2568161054.jpg","http://img.alicdn.com/imgextra/i3/2568161054/O1CN014vyOOT1Jem9DpHz3Y_!!2568161054.jpg","http://img.alicdn.com/imgextra/i1/2568161054/O1CN01B3PpsA1Jem9N8V7uf_!!2568161054.jpg","http://img.alicdn.com/imgextra/i2/2568161054/O1CN015JbyeY1Jem9MZshUt_!!2568161054.jpg","http://img.alicdn.com/imgextra/i1/2568161054/O1CN01HXSoxx1Jem9RvgzHN_!!2568161054.jpg","http://img.alicdn.com/imgextra/i3/2568161054/O1CN01IEultA1Jem9MdEx8R_!!2568161054.jpg","http://img.alicdn.com/imgextra/i3/2568161054/O1CN0176K98O1Jem9QOjE69_!!2568161054.jpg","http://img.alicdn.com/imgextra/i4/2568161054/O1CN013Pxp1O1Jem9RvgeTv_!!2568161054.jpg","http://img.alicdn.com/imgextra/i1/2568161054/O1CN01SfyZ8M1Jem9QOi1Gx_!!2568161054.jpg","http://img.alicdn.com/imgextra/i4/2568161054/O1CN01bb1POa1Jem9Sdgve2_!!2568161054.jpg","http://img.alicdn.com/imgextra/i3/2568161054/O1CN018Eo9dV1Jem9KV0y79_!!2568161054.jpg","http://img.alicdn.com/imgextra/i1/2568161054/O1CN01vuEofr1Jem9Nzy9xY_!!2568161054.jpg","http://img.alicdn.com/imgextra/i4/2568161054/O1CN01qw9sAi1Jem8wkNKpy_!!2568161054.jpg","http://img.alicdn.com/imgextra/i1/2568161054/O1CN01HeFhFw1Jem8rLnjBY_!!2568161054.jpg","http://img.alicdn.com/imgextra/i2/2568161054/O1CN01SNgjoi1Jem9QOil15_!!2568161054.jpg","http://img.alicdn.com/imgextra/i2/2568161054/O1CN01RXf3RA1Jem9DpHVwj_!!2568161054.jpg","http://img.alicdn.com/imgextra/i4/2568161054/O1CN01gZmZjt1Jem9ISThgm_!!2568161054.jpg","http://img.alicdn.com/imgextra/i2/2568161054/O1CN01YL0FHM1Jem9PQTjX9_!!2568161054.jpg","http://img.alicdn.com/imgextra/i4/2568161054/O1CN01UhsEhZ1Jem8yvJIhZ_!!2568161054.jpg"],"shop_item": [],"relate_items": []},"error": "","secache": "4ad7ad2480af253fec9c2fd4daa266bb","secache_time": 1713063169,"secache_date": "2024-04-14 10:52:49","translate_status": "","translate_time": 0,"language": {"default_lang": "cn","current_lang": "cn"},"reason": "","error_code": "0000"

请将api_key、api_secret和num_id替换为你自己的api_key、api_secret和商品ID。运行代码后,你将得到一个包含商品标题、价格、描述等信息的字典。

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

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

相关文章

网络管理实验二、SNMP服务与常用的网管命令

1 常用的网管命令 1.1 网络状态监视命令 包括以下命令&#xff1a;Ipconfig、ping、nslookup、dig、host ipconfig 作用&#xff1a;用来显示本机所有网卡的基本信息&#xff08;IP、掩码、网关、工作状态&#xff09;&#xff1b;用法&#xff1a;ipconfig展示&#xff1a;…

ExtendSim花生酱加工厂模型

该模型展示了ExtendSim可靠性模块与ExtendeSim离散速率技术相结合的协同作用。 在花生酱加工厂的最初阶段&#xff0c;花生经过烘烤和冷却。冷却后的花生经过热烫或水烫去外皮。这些经过漂白的花生进入过程的混合部分&#xff0c;在研磨机中用盐、葡萄糖和氢化油稳定剂将其粉碎…

如何通过Linux pciehp sysfs接口控制PCIe Slot电源状态?-3

pciehp sysfs接口电源控制与NVME驱动卸载的区别 从NVMe SSD设计本身而言&#xff0c;当通过pciehp sysfs接口对PCIe插槽执行Power Off操作时&#xff0c;由于NVMe SSD作为PCIe设备&#xff0c;其电源供应是直接依赖于所连接的PCIe插槽提供的。当插槽电源被关闭时&#xff0c;会…

死锁检测组件

一、死锁 线程 A 占用资源 1,线程 B 占用资源 2,线程 A 想占用资源 2,线程 B 想占用资源 1,线程 A 占用资源 1 的情况下去申请占用资源 2,线程 B 占用资源 2 的情况下去申请占用资源 1,就会出现互相等待对方释放资源的情况,也就是死锁。 CPU 占用率 100% → 出现死循环或…

国产HMI芯片Model3C ——工业品质价格亲民

工业级芯片相较于消费级芯片&#xff0c;在性能上确实拥有显著的优势&#xff0c;尤其对于带彩屏显示或HMI的产品来说&#xff0c;这种优势表现得尤为突出。 首先&#xff0c;对于带彩屏显示或HMI人机交互的产品来说&#xff0c;高性能的芯片是保证流畅的用户体验和快速响应的…

Spring中的适配器模式

在Spring MVC框架中&#xff0c;适配器模式主要体现在对不同类型的处理器&#xff08;即Controller&#xff09;的统一处理上。Spring MVC通过适配器模式来保证无论Controller的实现方式如何多样化&#xff0c;都能够被DispatcherServlet统一调用和管理。具体使用方式如下&…

如何AI绘画(动漫风格)

绘画描述&#xff1a;一只金毛犬 绘画结果&#xff1a; 如何AI绘画&#xff08;动漫风格&#xff09;&#xff1a; 关注一休哥助手微信公众号 点击小程序按钮打开一休哥助手小程序 切换到我&#xff0c;复制授权码 登录网站&#xff1a;https://www.fudai.fun/drawing&…

leetcode.45题:跳跃游戏II

Leetcode.45题&#xff1a;跳跃游戏II /* 题意的理解&#xff1a; nums[0] 只能跳 1 ~ nums[0]步 依次类推&#xff1a;从nums[0] - nums[n - 1] 最少需要多少步数 nums 2 3 1 1 4 nums[0] 2,初始只能跳 1/2步&#xff0c;如跳1步&#xff0c;达到nums[1] 而nums[1] 3,顾第二…

网络篇01 | 入门篇

网络篇01 | 入门篇 01 各层协议目录[网络篇02 | 应用层 kcp&#xff08;王者荣耀&#xff09;](https://blog.csdn.net/qiushily2030/article/details/135835946)[网络篇03 | 应用层 quic](https://blog.csdn.net/qiushily2030/article/details/136192481)[网络篇04 | 应用层 m…

Stable Diffusion之文生图模型训练

1、数据准备 提前准备好一组相关的照片。 在线的图片处理网站 BIRME - Bulk Image Resizing Made Easy 2.0 (Online & Free) 将图片转成统一大小&#xff0c;支持批量处理&#xff0c;效率高 2、生成提示词 进入stable diffusion webui页面 旧版直接使用 train/proproc…

医院一站式后勤管理系统 processApkUpload.upload 任意文件上传漏洞复现

0x01 产品简介 医院一站式后勤管理系统由南京博纳睿通软件科技有限公司开发的一款基于现代医院后勤管理理念的业务系统,产品结合后勤业务管理特点,通过管理平台将后勤管理业务予以系统化、规范化和流程化,从而形成一套构建于平台之上且成熟完善的后勤管理体系,并可在此体系…

使用阿里云试用Elasticsearch学习:Search Labs Tutorials 搭建一个flask搜索应用

文档&#xff1a;https://www.elastic.co/search-labs/tutorials/search-tutorial https://github.com/elastic/elasticsearch-labs/tree/main/example-apps/search-tutorial Full-Text Search

Excel报表成果展示

采用Excel函数实现数据的快速计算&#xff0c;如下&#xff0c;看似很复杂&#xff0c;实际非常方便。

文献速递:深度学习肝脏肿瘤诊断---基于深度学习的肝细胞结节性病变在整片组织病理图像上的分类

Title 题目 Deep Learning-Based Classification of Hepatocellular Nodular Lesions on Whole-Slide Histopathologic Images 基于深度学习的肝细胞结节性病变在整片组织病理图像上的分类 Background 背景 Hepatocellular nodular lesions (HNLs) constitute a heterogen…

面试八股——JVM★

类加载 类加载器的定义 类加载器的类别 类装载的执行过程 类的装载过程&#xff1a; 加载&#xff1a; 验证&#xff1a; 准备&#xff1a; 这里设置初始值并不是传统意义的设置初始值&#xff08;那个过程在初始化阶段&#xff09;。 解析&#xff1a; 初始化&#xff1a; …

李廉洋;4.12现货黄金,美原油最新走势分析及策略。

现货黄金在美盘末将历史新高刷至2377美元/盎司。美国3月份PPI指数较上年同期上升2.1%&#xff0c;为11个月来的最高增幅&#xff0c;这份数据加之此前火爆的CPI指数&#xff0c;为美联储实现2%目标所面临的坎坷之路奠定了基础。不过&#xff0c;PPI报告中的细节让担心通胀再度加…

全面支持工业协议钡铼IOy系列模块无缝融入PLC及工业物联网架构

钡铼IOy系列模块作为工业控制领域的创新产品&#xff0c;以其卓越的性能和广泛的适用性&#xff0c;无缝融入PLC&#xff08;可编程逻辑控制器&#xff09;及工业物联网架构&#xff0c;为工业自动化领域带来了全新的可能性。下面我们将详细探讨钡铼IOy系列模块与PLC及工业物联…

图像分割:Pytorch实现UNet++进行医学细胞分割

图像分割&#xff1a;Pytorch实现UNet进行医学细胞分割 前言相关介绍项目结构具体步骤准备数据集读取数据集设置并解析相关参数定义网络模型定义损失函数定义优化器训练验证 参考 前言 由于本人水平有限&#xff0c;难免出现错漏&#xff0c;敬请批评改正。更多精彩内容&#x…

【Golang学习笔记】从零开始搭建一个Web框架(三)

文章目录 分组控制分组嵌套中间件 前情提示&#xff1a; 【Golang学习笔记】从零开始搭建一个Web框架&#xff08;一&#xff09;-CSDN博客 【Golang学习笔记】从零开始搭建一个Web框架&#xff08;二&#xff09;-CSDN博客 分组控制 分组控制(Group Control)是 Web 框架应提供…

【算法刷题 | 回溯思想 01】4.11(回溯算法理论、组合、组合总和 ||| )

文章目录 回溯1.回溯算法理论基础1.1什么是回溯法&#xff1f;1.2回溯法的效率1.3回溯法解决的问题1.4如何理解回溯法&#xff1f;1.5回溯法模板 2.组合2.1问题2.2解法一&#xff1a;暴力解法&#xff08;循环次数不确定&#xff09;2.3解法二&#xff1a;回溯2.3.1回溯思路&am…