淘宝电商平台API接口

此淘宝API目前支持以下基本接口:

item_get获得淘宝商品详情

item_get_app获得淘宝app商品详情原数据

item_get_pro获得淘宝商品详情高级版

item_review获得淘宝商品评论

item_sku获取sku详细信息

item_fee获得淘宝商品快递费用

item_password获得淘口令真实url

cat_get获得淘宝分类详情

item_cat_get获得淘宝商品类目

item_list_weight批量获取商品信息

item_history_price获取商品历史价格信息

item_list_updown批量获得淘宝商品上下架时间

seller_info获得淘宝店铺详情

item_search按关键字搜索淘宝商品

item_search_pro高级关键字搜索淘宝商品

item_search_img按图搜索淘宝商品(拍立淘)

item_search_shop获得店铺的所有商品

item_search_seller搜索店铺列表

item_search_guang爱逛街

item_search_suggest获得搜索词推荐

item_search_jupage天天特价

item_search_coupon优惠券查询

item_search_samestyle搜索同款的商品

item_search_similar搜索相似的商品

item_search_neighbors邻家好货

item_recommend获取推荐商品列表

item_videolist按分类搜索淘宝直播接口

item_videolist_cat获取淘宝直播分类id接口

item_search_best天猫畅销榜

item_question_answer淘宝评论问答列表接口

upload_img上传图片到淘宝

img2text图片识别商品接口

brand_cat获取品牌分类列表

brand_cat_top获取分类推荐品牌列表

custom自定义API操作

buyer_cart_add添加到购物车

buyer_cart_remove删除购物车商品

buyer_cart_list获取购物车的商品列表

buyer_order_list获取购买到的商品订单列表

buyer_order_detail获取购买到的商品订单详情

buyer_order_express获取购买到的商品订单物流

buyer_address_list收货地址列表

buyer_address_add添加收货地址

buyer_info买家信息

seller_order_list获取卖出的商品订单列表

seller_cat_props商品分类属性

product_add卖家店铺添加宝贝

 item_get-获得淘宝商品详情

立即测试

淘宝电商平台API接口_第1张图片

请求参数

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

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

淘宝电商平台API接口_第2张图片

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

请求示例

Curl PHP PHPsdk JAVA C# 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_get/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=520813250866&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)

数据获取 

Request address:
https://api-1.onebound.cn/taobao/item_get/?key=&
&num_iid=588678492485&is_promotion=1&cache=no&&lang=zh-CN&secret=
---------------------------------------
Result Object:
---------------------------------------
{
	"item": {
		"num_iid": "588678492485",
		"title": "【品牌旗舰】法国人头马CLUB优质香槟区干邑白兰地350ml进口洋酒",
		"desc_short": "",
		"price": "259",
		"total_price": 0,
		"suggestive_price": 0,
		"orginal_price": "799.00",
		"nick": "人头马官方旗舰店",
		"num": "102",
		"min_num": 0,
		"detail_url": "https://item.taobao.com/item.htm?id=588678492485",
		"pic_url": "//img.alicdn.com/imgextra/i4/1751752896/O1CN019X6Bga1XGPmbQrbm1_!!0-item_pic.jpg",
		"brand": "Remy Martin/人头马",
		"brandId": "3564346",
		"rootCatId": "50008141",
		"cid": "50510004",
		"crumbs": [],
		"created_time": "",
		"modified_time": "",
		"delist_time": "",
		"desc": "\n  

 

\n

", "desc_img": [ "http://assets.alicdn.com/kissy/1.0.0/build/imglazyload/spaceball.gif", "http://img.alicdn.com/imgextra/i2/1751752896/O1CN01K6pwgL1XGPltdvaQU_!!1751752896.jpg", "http://img.alicdn.com/imgextra/i2/1751752896/O1CN01mvnWAQ1XGPjJXXEGu_!!1751752896.jpg", "http://img.alicdn.com/imgextra/i1/1751752896/O1CN01NwxiBD1XGPjG4CfZk_!!1751752896.jpg", "http://img.alicdn.com/imgextra/i3/1751752896/O1CN01RA6xbu1XGPjG4D0ND_!!1751752896.jpg", "http://img.alicdn.com/imgextra/i3/1751752896/O1CN01Qw0DZE1XGPjIqs7kY_!!1751752896.jpg", "http://img.alicdn.com/imgextra/i1/1751752896/O1CN019Ihehn1XGPjGihA6G_!!1751752896.jpg", "http://img.alicdn.com/imgextra/i3/1751752896/O1CN01L2yKpJ1XGPjGihpfv_!!1751752896.jpg", "http://img.alicdn.com/imgextra/i2/1751752896/O1CN01I9oJXN1XGPjRF7U5K_!!1751752896.jpg", "http://img.alicdn.com/imgextra/i4/1751752896/O1CN01kqL67q1XGPjOkRC2K_!!1751752896.jpg", "http://img.alicdn.com/imgextra/i4/1751752896/O1CN015dQt1b1XGPjOkSjhk_!!1751752896.jpg", "http://img.alicdn.com/imgextra/i3/1751752896/O1CN01jS7lnd1XGPjQwe5c8_!!1751752896.jpg", "http://img.alicdn.com/imgextra/i3/1751752896/O1CN01N9DeOA1XGPjQzM3vz_!!1751752896.jpg", "http://img.alicdn.com/imgextra/i4/1751752896/O1CN01Ms0Q0L1XGPlF5v7ot_!!1751752896.jpg" ], "item_imgs": [ { "url": "//img.alicdn.com/imgextra/i4/1751752896/O1CN019X6Bga1XGPmbQrbm1_!!0-item_pic.jpg" }, { "url": "//img.alicdn.com/imgextra/i4/1751752896/O1CN01PtjrYO1XGPmZKwPzA_!!1751752896.jpg" }, { "url": "//img.alicdn.com/imgextra/i2/1751752896/O1CN011fQUkB1XGPk0Yq4rs_!!1751752896.jpg" }, { "url": "//img.alicdn.com/imgextra/i3/1751752896/O1CN01tqPV7w1XGPhmV81ML_!!1751752896.jpg" }, { "url": "//img.alicdn.com/imgextra/i1/1751752896/O1CN01VMYOuW1XGPbKlafUb_!!1751752896.png" } ], "item_weight": "", "item_size": "", "location": "天津", "post_fee": 0, "express_fee": null, "ems_fee": "", "shipping_to": "", "has_discount": "true", "video": [], "is_virtual": "", "sample_id": "", "is_promotion": "true", "props_name": "", "prop_imgs": { "prop_img": [] }, "property_alias": "", "props": [ { "name": "生产日期", "value": "2012年04月01日 至 2022年04月01日" }, { "name": "品牌", "value": "Remy Martin/人头马" }, { "name": "品名", "value": "CLUB优质干邑白兰地套装" }, { "name": "产地", "value": "法国" }, { "name": "净含量", "value": "350mL" }, { "name": "包装种类", "value": "瓶装" }, { "name": "包装方式", "value": "包装" }, { "name": "度数", "value": "40%Vol." }, { "name": "厂名", "value": "E. REMY MARTIN & Co" }, { "name": "厂址", "value": "法国" }, { "name": "厂家联系方式", "value": "021-64486111" }, { "name": "保质期", "value": "9999" } ], "total_sold": "7719", "skus": { "sku": [] }, "seller_id": "1751752896", "sales": 6000, "shop_id": "105719803", "props_list": [], "seller_info": { "nick": "人头马官方旗舰店", "item_score": "4.9 ", "score_p": "4.9 ", "delivery_score": "4.9 ", "shop_type": "B", "user_num_id": "1751752896", "sid": "105719803", "title": "人头马官方旗舰店", "zhuy": "https://shop105719803.taobao.com/", "shop_name": "人头马官方旗舰店" }, "tmall": true, "error": "", "warning": "", "url_log": [], "fav_count": "12898", "fans_count": "31.7万", "freight": "快递: 免运费", "props_imgs": { "prop_img": [] }, "_ddf": "xdl", "promo_type": null, "props_img": [], "format_check": "ok", "shop_item": [], "relate_items": [] }, "error": "", "secache": "13513f37fcaf37bc1a66cd1c071ed072", "secache_time": 1661152687, "secache_date": "2022-08-22 15:18:07", "translate_status": "", "translate_time": 0, "language": { "default_lang": "cn", "current_lang": "cn" }, "reason": "", "error_code": "0000", "cache": 0, "api_info": "today:141 max:10000 all[282=141+88+53];expires:2030-12-31", "execution_time": "1.58", "server_time": "Beijing/2022-08-22 15:18:07", "client_ip": "106.6.39.114", "call_args": { "num_iid": "588678492485", "is_promotion": "1" }, "api_type": "taobao", "translate_language": "zh-CN", "translate_engine": "google_new", "server_memory": "5.9MB", "request_id": "1.63032dadf3177", "last_id": "1167319009" }

你可能感兴趣的:(爬虫,API,淘宝API,servlet,json,爬虫,淘宝API接口)