item_search_tmall - 按关键字搜索天猫商品接口接入说明

一、item_search_tmall - 按关键字搜索天猫商品接口说明:
点击注册获取key和secret测试账号
接口使用说明:用过关键词搜索天猫商品,不包括淘宝商品(其他的接口可以获取),可以获取商品列表,然后再次调用商品详情接口,可以拿到淘宝天猫整个站的数据,可用于多个业务场景。
item_search_tmall - 按关键字搜索天猫商品接口接入说明_第1张图片
二、建议使用场景
1、获取天猫商品列表,整个天猫站的数据
2、商城系统建设
3、代购系统商城建设
4、ERP系统商品选品
5、行业数据分析
6、商品数据上传
三、公共参数说明:
名称 类型 必须 描述
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版本
四、API请求参数说明:
请求参数:q=女装&start_price=0&end_price=0&page=1&cat=0&discount_only=&sort=&page_size=&seller_info=&nick=&ppath=&imgid=&filter=
参数说明:q:搜索关键字
cat:分类ID
start_price:开始价格
end_price:结束价格
sort:排序[bid,_bid,bid2,_bid2,_sale,credit]
(bid:总价,bid2:商品价格,sale:销量,credit信用,加_前缀为从大到小排序)
page:页数
五、响应参数:
名称 类型 示例值 描述
items items[] 按关键字搜索商品
page Int 1 页码
page_size Int 44 接口返回数量
real_total_results Int 1900 宝贝数量
total_results Int 1900 宝贝数量
pagecount Int 120 总页数
item item[] 宝贝详情数据
title String 法式复古山本超仙chic仙女赫本网红初春很仙法国小众裙子两件套装 商品标题
pic_url String //img.alicdn.com/bao/uploaded/i3/3083218865/O1CN012FMDaiwxkenJGaM
!!0-item_pic.jpg 宝贝图片
promotion_price Float 178.00 优惠价
price Float 178.00 价格
sales Int 890 销量
num_iid Bigint 577437133060 宝贝ID
sample_id String 商品风格标识ID
seller_nick String 初穆旗舰店 掌柜昵称
post_fee Float 10.00 物流费用
area String 山东 店铺所在地
detail_url String //detail.tmall.com/item.htm?id=586794298909&ns=1&abbucket=0 宝贝链接
seller_info Mix {“level”: 99, “shop_type”: “B”, “user_num_id”: “2217148345”, “cid”: 0, “delivery_score”: “”, “item_score”: “”, “score_p”: “”} 卖家信息
六、请求示例:(CURL、PHP 、PHPsdk 、Java 、C# 、Python…)

python

# 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://api-gw.onebound.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="
headers = {
    "Accept-Encoding": "gzip",
    "Connection": "close"
}
if __name__ == "__main__":
    r = requests.get(url, headers=headers)
    json_obj = r.json()
    print(json_obj)

响应示例

{
	"page": "1",
	"page_no": "1",
	"real_total_results": "2223909",
	"total_results": "2223909",
	"page_size": "10",
	"pagecount": "100",
	"item": [
		{
			"title": "白色吊带背心女内搭性感修身莫代尔黑色裹胸短款露脐抹胸打底衫",
			"pic_url": "https://img.alicdn.com/bao/uploaded/i1/2200551933325/O1CN01G7Bk0r1aQtQBJokoK_!!0-item_pic.jpg",
			"promotion_price": "34.0",
			"price": "34.0",
			"sales": "2000+",
			"num_iid": "588547619452",
			"seller_nick": "蝶如雪旗舰店",
			"area": "江苏 泰州",
			"seller_id": "2200551933325",
			"detail_url": "https://detail.tmall.com/item.htm?id=588547619452&skuId=4012030025243&spm=a1z60.7754815.item.0"
		},
		{
			"title": "2件吊带背心女内搭打底外穿无袖百搭莫代尔春夏季黑白色吊带上衣",
			"pic_url": "https://img.alicdn.com/bao/uploaded/i1/667221374/O1CN01SIzTad1M1KrJcMceR_!!0-item_pic.jpg",
			"promotion_price": "39.0",
			"price": "39.0",
			"sales": "1000+",
			"num_iid": "564905521941",
			"seller_nick": "莫代尔官方旗舰店",
			"area": "上海",
			"seller_id": "667221374",
			"detail_url": "https://detail.tmall.com/item.htm?id=564905521941&skuId=0&spm=a1z60.7754815.item.1"
		},
		{
			"title": "大码胖mm无钢圈运动内衣女防震跑步聚拢裹胸网红爆款背心文胸美背",
			"pic_url": "https://img.alicdn.com/bao/uploaded/i2/4145171888/O1CN01jeNuTb1PokGm74cfE_!!0-item_pic.jpg",
			"promotion_price": "38.0",
			"price": "38.0",
			"sales": "100+",
			"num_iid": "586827288475",
			"seller_nick": "狄蓝瑟旗舰店",
			"area": "广东 汕头",
			"seller_id": "4145171888",
			"detail_url": "https://detail.tmall.com/item.htm?id=586827288475&skuId=4158697742497&spm=a1z60.7754815.item.2"
		},
		{
			"title": "南极人吊带背心女士夏季纯棉薄款白色修身上衣内搭百搭潮打底衫女",
			"pic_url": "https://img.alicdn.com/bao/uploaded/i4/921087833/O1CN01W38MWh27jYujEWJYd_!!0-item_pic.jpg",
			"promotion_price": "39.9",
			"price": "39.9",
			"sales": "200+",
			"num_iid": "595493699016",
			"seller_nick": "南极人乐客专卖店",
			"area": "山东 烟台",
			"seller_id": "921087833",
			"detail_url": "https://detail.tmall.com/item.htm?id=595493699016&skuId=4299100871404&spm=a1z60.7754815.item.3"
		},
		{
			"title": "2021年新款春秋高腰直筒牛仔裤女宽松显瘦哈伦老爹裤子百搭九分裤",
			"pic_url": "https://img.alicdn.com/bao/uploaded/i1/2994829445/O1CN01f2Y2uI2JdrQO4qNiI_!!0-item_pic.jpg",
			"promotion_price": "79.0",
			"price": "79.0",
			"sales": "100+",
			"num_iid": "591598499229",
			"seller_nick": "正茉旗舰店",
			"area": "广东 东莞",
			"seller_id": "2994829445",
			"detail_url": "https://detail.tmall.com/item.htm?id=591598499229&skuId=4482736601261&spm=a1z60.7754815.item.4"
		},
		{
			"title": "美背小吊带背心女内搭网红爆款带胸垫白色u型外穿打底夏卡卡内衣",
			"pic_url": "https://img.alicdn.com/bao/uploaded/i1/2206440954960/O1CN01IYwVYe1mVj4PunJQ3_!!0-item_pic.jpg",
			"promotion_price": "39.9",
			"price": "39.9",
			"sales": "100+",
			"num_iid": "603920150873",
			"seller_nick": "般舒旗舰店",
			"area": "山东 青岛",
			"seller_id": "2206440954960",
			"detail_url": "https://detail.tmall.com/item.htm?id=603920150873&skuId=0&spm=a1z60.7754815.item.5"
		},
		{
			"title": "南极人吊带背心女士夏季薄款无痕外穿上衣莫代尔内搭打底衫内衣服",
			"pic_url": "https://img.alicdn.com/bao/uploaded/i2/921087833/O1CN0146QYtE27jYuiivmiE_!!0-item_pic.jpg",
			"promotion_price": "49.9",
			"price": "49.9",
			"sales": "100+",
			"num_iid": "595294400309",
			"seller_nick": "南极人乐客专卖店",
			"area": "山东 烟台",
			"seller_id": "921087833",
			"detail_url": "https://detail.tmall.com/item.htm?id=595294400309&skuId=4657775150889&spm=a1z60.7754815.item.6"
		},
		{
			"title": "刘涛雪纺吊带背心女网红爆款西装内搭外穿小衫打底显瘦性感上衣夏",
			"pic_url": "https://img.alicdn.com/bao/uploaded/i1/3272298247/O1CN01mEjmcf2AnAxDlBllG_!!3272298247-0-lubanu-s.jpg",
			"promotion_price": "49.0",
			"price": "49.0",
			"sales": "600+",
			"num_iid": "592045748254",
			"seller_nick": "凯袖旗舰店",
			"area": "上海",
			"seller_id": "3272298247",
			"detail_url": "https://detail.tmall.com/item.htm?id=592045748254&skuId=4076557172911&spm=a1z60.7754815.item.7"
		},
		{
			"title": "美背内衣女学生少女裹胸抹胸聚拢运动瑜伽吊带背心无钢圈文胸外穿",
			"pic_url": "https://img.alicdn.com/bao/uploaded/i1/3921451270/O1CN019HzAP31LFhbNWnb1g_!!3921451270-0-lubanu-s.jpg",
			"promotion_price": "12.9",
			"price": "12.9",
			"sales": "5",
			"num_iid": "617244976556",
			"seller_nick": "运绯旗舰店",
			"area": "广东 广州",
			"seller_id": "3921451270",
			"detail_url": "https://detail.tmall.com/item.htm?id=617244976556&skuId=4527146362707&spm=a1z60.7754815.item.8"
		},
		{
			"title": "新款美背吊带网红爆款小背心蕾丝防走光裹胸少女抹胸内衣女 聚拢",
			"pic_url": "https://img.alicdn.com/bao/uploaded/i2/3921451270/O1CN01JJqJcc1LFhbkgOjRM_!!0-item_pic.jpg",
			"promotion_price": "13.9",
			"price": "13.9",
			"sales": "1000+",
			"num_iid": "620389154627",
			"seller_nick": "运绯旗舰店",
			"area": "广东 广州",
			"seller_id": "3921451270",
			"detail_url": "https://detail.tmall.com/item.htm?id=620389154627&skuId=4380971580436&spm=a1z60.7754815.item.9"
		}
	],
	"data_from": "tianmiao",
	"error": "",
	"reason": "",
	"error_code": "0000",
	"cache": 0,
	"api_info": "today:12 max:10000",
	"execution_time": 1.71,
	"server_time": "Beijing/2021-08-08 09:54:30",
	"client_ip": "106.6.39.122",
	"call_args": [],
	"api_type": "taobao",
	"translate_language": "zh-CN",
	"translate_engine": "google_cn",
	"server_memory": "5.55MB",
	"request_id": "gw-4.610f395565254"
}

API 工具
API SDK调用示例
APISDK下载
API测试工具

如何开通API测试,*点击立即开通*

你可能感兴趣的:(淘宝/天猫平台API接口,关键词搜索天猫商品接口,关键词搜索淘宝商品接口,item_search,淘宝爬虫接口,关键词搜索商品接口)