首页 > 其他分享 >淘宝item_search返回值实践指南

淘宝item_search返回值实践指南

时间:2024-09-04 14:24:29浏览次数:12  
标签:search price pic seller item 返回值 com id

关键词搜索淘宝商品数据接口是指通过API接口,使用关键词搜索淘宝网上的商品信息,并获取相关数据。这个接口可以通过淘宝开放平台提供的API实现。

淘宝item_search返回值实践指南_json

taobao.item_search

公共参数

请求地址:

名称

类型

必须

描述

key

String


调用key(必须以GET方式拼接在URL中)

secret

String


调用密钥

api_name

String


API接口名称(包括在请求地址中)[item_search,item_get,item_search_shop等]

cache

String


[yes,no]默认yes,将调用缓存的数据,速度比较快

result_type

String


[json,jsonu,xml,serialize,var_export]返回数据格式,默认为json,jsonu输出的内容中文可以直接阅读

lang

String


[cn,en,ru]翻译语言,默认cn简体中文

version

String


API版本

请求参数

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

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

响应参数

Version: Date:

名称

类型

必须

示例值

描述

title

String

0

法式复古山本超仙chic仙女赫本网红初春很仙法国小众裙子两件套装

商品标题

pic_url

String

0

//img.alicdn.com/bao/uploaded/i3/3083218865/O1CN012FMDaiwxkenJGaM_!!0-item_pic.jpg

宝贝图片

promotion_price

Float

0

178.00

优惠价

price

Float

0

178.00

价格

num_iid

Bigint

0

577437133060

宝贝ID

area

String

0

山东

店铺所在地

detail_url

String

0

//detail.tmall.com/item.htm?id=586794298909&ns=1&abbucket=0

宝贝链接


响应示例

Request address:
https://api-gw.fan-b.com/taobao/item_search/?key=fanb_test_key&
&q=女装&start_price=0&end_price=0&page=1&cat=0&discount_only=&sort=&page_size=&seller_info=&nick=&ppath=&imgid=&filter=&cache=no&&lang=zh-CN&secret=FanB2023
---------------------------------------
Result Object:
---------------------------------------
{
	"items": {
		"page": "1",
		"real_total_results": "360000",
		"total_results": "360000",
		"page_size": 12,
		"pagecount": "200",
		"_ddf": "szx",
		"item": [
			{
				"title": "白色纯棉长袖t恤女秋内搭打底衫",
				"pic_url": "https://img.alicdn.com/img/bao/uploaded/i4/O1CN01JsJvtl1tWNKTNBFnr_!!0-item_pic.jpg",
				"promotion_price": "13.79",
				"orginal_price": "13.79",
				"price": "13.79",
				"sales": 0,
				"num_iid": "742345030775",
				"seller_nick": "天天热卖",
				"seller_id": "2215909575909",
				"detail_url": "https://item.taobao.com/item.htm?id=742345030775"
			},
			{
				"title": "库洛米美乐蒂安静书diy玩具",
				"pic_url": "https://img.alicdn.com/img/bao/uploaded/i4/O1CN01Gu24Wj1tWNJbSvNBG_!!0-item_pic.jpg",
				"promotion_price": "4.00",
				"orginal_price": "4.00",
				"price": "4.00",
				"sales": 0,
				"num_iid": "744343783382",
				"seller_nick": "天天热卖",
				"seller_id": "2215909575909",
				"detail_url": "https://item.taobao.com/item.htm?id=744343783382"
			},
			{
				"title": "泽塔升华器变身器奥特曼玩具",
				"pic_url": "https://img.alicdn.com/img/bao/uploaded/i4/O1CN01enUnSm1tWNI3HZc85_!!0-item_pic.jpg",
				"promotion_price": "5.80",
				"orginal_price": "5.80",
				"price": "5.80",
				"sales": 0,
				"num_iid": "744303583211",
				"seller_nick": "天天热卖",
				"seller_id": "2215909575909",
				"detail_url": "https://item.taobao.com/item.htm?id=744303583211"
			},
			{
				"title": "中国修眉刀修眉刀安全初学者",
				"pic_url": "https://img.alicdn.com/img/bao/uploaded/i4/O1CN01qv0spj1tWNGqpEmUo_!!0-item_pic.jpg",
				"promotion_price": "1.90",
				"orginal_price": "1.90",
				"price": "1.90",
				"sales": 0,
				"num_iid": "743711327106",
				"seller_nick": "天天热卖",
				"seller_id": "2215909575909",
				"detail_url": "https://item.taobao.com/item.htm?id=743711327106"
			},
			{
				"title": "吸油纸面部300张超级多",
				"pic_url": "https://img.alicdn.com/img/bao/uploaded/i4/O1CN01RX4Unk1tWNKtC8BEU_!!0-item_pic.jpg",
				"promotion_price": "9.90",
				"orginal_price": "9.90",
				"price": "9.90",
				"sales": 0,
				"num_iid": "743711163427",
				"seller_nick": "天天热卖",
				"seller_id": "2215909575909",
				"detail_url": "https://item.taobao.com/item.htm?id=743711163427"
			},
			{
				"title": "身体素颜霜懒人霜裸妆学生专用少女防水妆前打底改善黄皮肤控油",
				"pic_url": "https://img.alicdn.com/img/bao/uploaded/i4/O1CN01bUGii51tWNKRnE1nl_!!0-item_pic.jpg",
				"promotion_price": "3.90",
				"orginal_price": "3.90",
				"price": "3.90",
				"sales": 0,
				"num_iid": "743681091735",
				"seller_nick": "天天热卖",
				"seller_id": "2215909575909",
				"detail_url": "https://item.taobao.com/item.htm?id=743681091735"
			},
			{
				"title": "【德国精工】初学者专业修眉刀片",
				"pic_url": "https://img.alicdn.com/img/bao/uploaded/i4/O1CN01l2QJGa1tWNL5KFOIy_!!0-item_pic.jpg",
				"promotion_price": "2.60",
				"orginal_price": "2.60",
				"price": "2.60",
				"sales": 0,
				"num_iid": "743677315395",
				"seller_nick": "天天热卖",
				"seller_id": "2215909575909",
				"detail_url": "https://item.taobao.com/item.htm?id=743677315395"
			},
			{
				"title": "黑色一字夹碎发夹边夹加粗钢夹",
				"pic_url": "https://img.alicdn.com/img/bao/uploaded/i4/O1CN01uvHYdh1tWNJsHA46s_!!0-item_pic.jpg",
				"promotion_price": "3.70",
				"orginal_price": "3.70",
				"price": "3.70",
				"sales": 0,
				"num_iid": "743587198060",
				"seller_nick": "天天热卖",
				"seller_id": "2215909575909",
				"detail_url": "https://item.taobao.com/item.htm?id=743587198060"
			},
			{
				"title": "10支植物护手霜滋润保湿补水嫩白清爽不油腻男女小巧便携随身装2",
				"pic_url": "https://img.alicdn.com/img/bao/uploaded/i4/O1CN01gCc2Ab1tWNL9Dw2SL_!!0-item_pic.jpg",
				"promotion_price": "2.76",
				"orginal_price": "2.76",
				"price": "2.76",
				"sales": 0,
				"num_iid": "742951943880",
				"seller_nick": "天天热卖",
				"seller_id": "2215909575909",
				"detail_url": "https://item.taobao.com/item.htm?id=742951943880"
			},
			{
				"title": "赛思蜜高腰收腹裤纯棉裆部抗菌",
				"pic_url": "https://img.alicdn.com/img/bao/uploaded/i4/O1CN01nXMBS01tWNHDFDS3R_!!0-item_pic.jpg",
				"promotion_price": "4.90",
				"orginal_price": "4.90",
				"price": "4.90",
				"sales": 0,
				"num_iid": "742710893673",
				"seller_nick": "天天热卖",
				"seller_id": "2215909575909",
				"detail_url": "https://item.taobao.com/item.htm?id=742710893673"
			},
			{
				"title": "赛思蜜女士内裤无痕舒适包臀",
				"pic_url": "https://img.alicdn.com/img/bao/uploaded/i4/O1CN01pkNATr1tWNJvV9bKg_!!0-item_pic.jpg",
				"promotion_price": "4.90",
				"orginal_price": "4.90",
				"price": "4.90",
				"sales": 0,
				"num_iid": "742610515430",
				"seller_nick": "天天热卖",
				"seller_id": "2215909575909",
				"detail_url": "https://item.taobao.com/item.htm?id=742610515430"
			},
			{
				"title": "人参黄精枸杞补茶男人滋",
				"pic_url": "https://img.alicdn.com/img/bao/uploaded/i4/O1CN01F6NCfE1tWNIisMb8N_!!0-item_pic.jpg",
				"promotion_price": "4.55",
				"orginal_price": "4.55",
				"price": "4.55",
				"sales": 0,
				"num_iid": "742529311329",
				"seller_nick": "天天热卖",
				"seller_id": "2215909575909",
				"detail_url": "https://item.taobao.com/item.htm?id=742529311329"
			}
		],
		"item_weight_update": 0
	},
	"error_code": "0000",
	"reason": "ok",
	"secache": "a8881ed5637e3c7e84f03acdc86be64f",
	"secache_time": 1725422271,
	"secache_date": "2024-09-04 11:57:51",
	"translate_status": "",
	"translate_time": 0,
	"language": {
		"default_lang": "cn",
		"current_lang": "cn"
	},
	"error": "",
	"cache": 0,
	"api_info": "today:0 max:5000 all[2=0+2+0];expires:2024-10-31",
	"execution_time": "2.541",
	"server_time": "Beijing/2024-09-04 11:57:51",
	"client_ip": "183.14.31.23",
	"call_args": {
		"q": "女装",
		"start_price": "0",
		"end_price": "0",
		"page": "1",
		"cat": "0"
	},
	"api_type": "taobao",
	"translate_language": "zh-CN",
	"translate_engine": "baidu",
	"server_memory": "4.51MB",
	"request_id": "gw-1.66d7dabd66bdb",
	"last_id": "3449058209"
}

以上仅为示例,具体接口的使用方式和参数可以参考淘宝开放平台的文档。

标签:search,price,pic,seller,item,返回值,com,id
From: https://blog.51cto.com/u_16940963/11917626

相关文章

  • 电商数据驱动决策:京东商品详情API返回值的力量
    在电商数据驱动决策的过程中,京东商品详情API返回值的力量不容忽视。这些返回值包含了丰富的商品信息,如商品标题、价格、图片、规格参数、用户评价等,为电商企业提供了强大的数据支持,帮助企业更加精准地把握市场动态,优化库存管理,提升客户满意度,从而制定更有效的销售策略和决策。以下......
  • 如何在Pyqt中渲染使用svggraphicsItem的SVG字形?
    在使用PyQt构建应用程序时,有时需要在图形用户界面中渲染SVG(可缩放矢量图形)文件,特别是当你需要显示图标或自定义字体时。QGraphicsSvgItem是PyQt提供的一个类,用于在QGraphicsView或QGraphicsScene中渲染SVG图像。然而,如果你想使用SVG字形或通过编程方式生成矢量图形,QS......
  • ElasticSearch入门到掌握,用心看完这三篇就够了【完结2】
    文章目录二、ElasticSearch详解1.DSL查询文档(1)DSL查询语法分类(2)DSLQuery基本语法(3)查询所有(4)全文检索查询(5)精确查询(6)地理查询(7)复合查询相关性算分fuctionscorebool查询2.搜索结果处理(1)排序(2)分页(3)深度分页问题(4)高亮3.RestClient查询文档(1)查询所有(2)全文检索查询(3......
  • ElasticSearch 备考 -- Runtime Field
    一、题目在集群上有索引task,请编写查询并满足要求:定义一个名为field_num的运行时字段,实现以下聚合(a字段的值等于field_x字段减去field_y字段),field_num聚合区间如下:聚合值小于0的文档聚合0到100之间的文档聚合大于100的文档二、思考1)运行时字段第一反应runtimefil......
  • ElasticSearch 备考 -- Nested
    一、题目存在索引phones,其中存在两条数据如下PUTphones/_doc/1{  "brand":"Samsumg",  "model":"GalaxyS9+",  "features":[    {      "type":"os",      "value":&......
  • 函数的力量:掌握Python中的“返回值”艺术
    引言在实际开发过程中,函数的返回值扮演着极其重要的角色。它不仅能够简化代码结构,提高代码复用性,还能帮助我们构建更加灵活高效的程序架构。通过合理设计函数的返回值,可以轻松实现数据处理、状态传递等多种功能。接下来,让我们一起深入了解如何定义与使用Python函数中的返回值。基......
  • 电商数据整合新篇章:京东商品详情API返回值应用实践
    电商数据整合在当今商业环境中具有重要地位,API(应用程序编程接口)提供了高效收集、整合和分析数据的途径。以京东商品详情API为例,通过其返回值,电商企业可以构建更精准的营销策略、优化产品以及提升用户体验。以下是一个基于京东商品详情API返回值的应用实践指南,并附简单代码示例。京......
  • 阿里巴巴商品搜索API返回值中的图片与详情链接
    在使用阿里巴巴(Alibaba)的商品搜索API时,通常返回的JSON或其他格式的数据中会包含商品的相关信息,如标题、价格、图片链接、详情页链接等。这些链接(特别是图片和详情页的链接)通常设计为直接可用的URL,可以直接在浏览器或应用中访问。然而,如果你发现这些链接中包含了看似“代码”的......
  • elasticsearch数据导出和导出
    数据导入和导出依赖于命令elasticdump数据导出#!/bin/bashES=http://ip:portED=数据保存位置datename=$(date+%Y-%m-%d)#datename=2021-08-20index=导出的索引名echo"elasticdump--input=$ES/$index--output=$ED/$index.json"elasticdump--input=$ES/$......
  • 26. shell当中函数返回值,返回值的作用,退出码状态,得到函数处理结果
    函数返回值作用在其他编程语言中,返回值是指函数被调用之后,执行函数体中的代码所得到的结果,这个结果可通过return语句返回。但Shell中返回值表示的是函数的退出状态:返回值0表示函数执行成功,非0表示函数执行失败。if、while、for等语句都是根据函数的退出状态来判断条件是否......