采集场景
淘宝天猫商品详情页中的评价,有多个分类:【全部评价】、【晒图】、【视频晒单】、【追评】、【好评】、【中评】、【差评】。其中【全部评价】默认展现,其他需点击后展现。本文以按【差评】筛选采集为例讲解。实例网址: https://item.taobao.com/item.htm?id=648721240607&ali_refid=a3_420432_1006:1102893592:N:ibTbvmj72amHtBXT57OxLrZd2Bx8JrEt:8b9ac4bd498d1c7b5f45ad3c83985c3f&ali_trackid=162_8b9ac4bd498d1c7b5f45ad3c83985c3f&spm=a230r.1.14.1#detail
采集字段
评论内容,评论日期,评论图片,买家昵称,评论属性,评论 ID,追评内容,追评图片,追评视频,视频地址,视频截图,卖家回复评论内容等页面上有的数据均可以采集。
采集结果
采集结果可导出为 Excel、CSV、HTML、数据库等多种格式。导出为 Excel 示例:
Taobao.item_review - 获得商品评论数据接口代码展示
1.请求方式:HTTP POST GET
2.公共参数:
名称 | 类型 | 必须 | 描述 |
---|---|---|---|
key | String | 是 | 调用key(必须以GET方式拼接在URL中) |
secret | String | 是 | 调用密钥 (复制v:Taobaoapi2014 ) |
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版本 (查看接口调用示例 ) |
3.请求参数:
请求参数:num_iid=600530677643&data=&page=1
参数说明:num_iid:淘宝商品ID
sort:排序 0:默认排序 ,1: 最新排序
4.请求代码示例,支持高并发请求(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-vx.Taobaoapi2014.cn/taobao/item_review/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=600530677643&data=&page=1"
headers = {
"Accept-Encoding": "gzip",
"Connection": "close"
}
if __name__ == "__main__":
r = requests.get(url, headers=headers)
json_obj = r.json()
print(json_obj)
5.响应参数
6.响应示例
Result Object:
---------------------------------------
{
"items": {
"totalpage": 1,
"total_results": "12",
"page_size": 12,
"page": "1",
"item": [
{
"rate_content": "此用户没有填写评价。",
"rate_date": "2022-08-28",
"pics": [],
"display_user_nick": "w**8",
"auction_sku": "尺码:37;颜色分类:黑色【内里:超细纤维】",
"add_feedback": "",
"add_feedback_images": [],
"create_time_interval": "8个月前",
"read_count": "0",
"rate_id": "1185790146502",
"reply": "感谢您选择了我们,您的满意是我们最大的心愿!品位细节,简注重服务,我们的时尚与众不同!期待您的再次光临~",
"comment_count": "0",
"like_count": [],
"user_star": "9",
"user_star_pic": "https://img.alicdn.com/imgextra/i3/O1CN01PIYxrZ22FGrmiDphN_!!6000000007090-2-tps-92-45.png"
},
{
"rate_content": "太漂亮了 本来买的时候犹豫很久很久很久 从来没有买过黄色的 觉得不好配衣服也觉得图片一般 犹豫了有一天终于下定决心去买一个试试 结果太太太太让我惊喜了 太漂亮了 很亮鞋子特别舒服 我买的大一点 也很舒服 还挺好配衣服的 后悔就买一双了 现在我家都是她家的鞋子了 绝对的YYDS",
"rate_date": "2022-08-23",
"pics": [],
"display_user_nick": "梦**1",
"auction_sku": "尺码:36;颜色分类:黄色【内里:超细纤维】",
"add_feedback": "",
"add_feedback_images": [],
"create_time_interval": "8个月前",
"read_count": "0",
"rate_id": "1184973493639",
"reply": "感谢您选择了我们,一直很担心您觉得我们做得不够好,怕您觉得我们的回复不够详细,又或者责怪我们的质检时不够仔细,但是在大部分时间里我们的团队真的已经尽了全力,希望您收到包裹的时候都能满意开心~",
"comment_count": "0",
"like_count": [],
"user_star": "8",
"user_star_pic": "https://img.alicdn.com/imgextra/i4/O1CN019QZnaG1U1LtUAPn6e_!!6000000002457-2-tps-92-45.png"
},
{
"rate_content": "鞋子很满意,3号客服棒棒哒,长毛绒也很暖和 ",
"rate_date": "2021-12-05",
"pics": [
"//img.alicdn.com/imgextra/i2/0/O1CN01DD4Zcv1IxGY6IPN73_!!0-rate.jpg",
"//img.alicdn.com/imgextra/i1/0/O1CN0189R9CP1IxGYCdWZyV_!!0-rate.jpg"
],
"display_user_nick": "挽**手",
"auction_sku": "尺码:39;颜色分类:黑色【内里:长毛绒】",
"add_feedback": "",
"add_feedback_images": [],
"create_time_interval": "1年前",
"read_count": "43",
"rate_id": "1158296533060",
"reply": "亲,感谢您对我们的支持!正式邀请您成为我们的vip会员;收到宝贝有什么问题,可即刻与我们联系,我们将竭尽全力为您解决!",
"comment_count": "0",
"like_count": [],
"user_star": "7",
"user_star_pic": "https://img.alicdn.com/imgextra/i4/O1CN01ZlCYMx1nbVriw6u0S_!!6000000005108-2-tps-92-45.png"
},
{
"rate_content": "面料材质:材质有一点点硬,版型不错,整体还凑合,对得起这个价格 ",
"rate_date": "2021-11-16",
"pics": [
"//img.alicdn.com/imgextra/i3/0/O1CN01TrfEtd2M3Ag2ClelC_!!0-rate.jpg"
],
"display_user_nick": "c**3",
"auction_sku": "尺码:39;颜色分类:黑色【内里:长毛绒】",
"add_feedback": "",
"add_feedback_images": [],
"create_time_interval": "1年前",
"read_count": "165",
"rate_id": "1155310540482",
"reply": "亲,感谢您对我们的支持!正式邀请您成为我们的vip会员;收到宝贝有什么问题,可即刻与我们联系,我们将竭尽全力为您解决!",
"comment_count": "0",
"like_count": [],
"user_star": "7",
"user_star_pic": "https://img.alicdn.com/imgextra/i4/O1CN01ZlCYMx1nbVriw6u0S_!!6000000005108-2-tps-92-45.png"
},
{
"rate_content": "买第二双了,鞋子很漂亮也挺舒服",
"rate_date": "2021-11-09",
"pics": [],
"display_user_nick": "t**1",
"auction_sku": "尺码:39;颜色分类:黄色【内里:超细纤维】",
"add_feedback": "",
"add_feedback_images": [],
"create_time_interval": "1年前",
"read_count": "1",
"rate_id": "1154131764289",
"reply": "感谢您选择了我们,一直很担心您觉得我们做得不够好,怕您觉得我们的回复不够详细,又或者责怪我们的质检时不够仔细,但是在大部分时间里我们的团队真的已经尽了全力,希望您收到包裹的时候都能满意开心~",
"comment_count": "0",
"like_count": [],
"user_star": "8",
"user_star_pic": "https://img.alicdn.com/imgextra/i4/O1CN019QZnaG1U1LtUAPn6e_!!6000000002457-2-tps-92-45.png"
},
{
"rate_content": "7号客服棒棒哒,鞋子很喜欢,已第三次购买 ",
"rate_date": "2021-10-31",
"pics": [
"//img.alicdn.com/imgextra/i3/0/O1CN01hPcYYn1EzJr4JSAzG_!!0-rate.jpg",
"//img.alicdn.com/imgextra/i1/0/O1CN01Fjvoou25NSkm50Bp2_!!0-rate.jpg",
"//img.alicdn.com/imgextra/i4/0/O1CN01mBc4V91txqplVs6o6_!!0-rate.jpg",
"//img.alicdn.com/imgextra/i3/0/O1CN01YFUXAj1Whbcfv3TRJ_!!0-rate.jpg"
],
"display_user_nick": "快**9",
"auction_sku": "尺码:39;颜色分类:黑色【内里:超细纤维】",
"add_feedback": "",
"add_feedback_images": [],
"create_time_interval": "1年前",
"read_count": "247",
"rate_id": "1153379805402",
"reply": "亲,感谢您对我们的支持!正式邀请您成为我们的vip会员;收到宝贝有什么问题,可即刻与我们联系,我们将竭尽全力为您解决!",
"comment_count": "0",
"like_count": [],
"user_star": "6",
"user_star_pic": "https://img.alicdn.com/imgextra/i3/O1CN01QZTjHW1F4oegDvuEX_!!6000000000434-2-tps-92-45.png"
},
{
"rate_content": "7号客服服务真好,鞋子质量很好,己第二次购买了 ",
"rate_date": "2021-10-27",
"pics": [
"//img.alicdn.com/imgextra/i1/0/O1CN01hMfUsj1yDexza4Eu1_!!0-rate.jpg",
"//img.alicdn.com/imgextra/i2/0/O1CN01BNKARZ1yDexwiXDKc_!!0-rate.jpg",
"//img.alicdn.com/imgextra/i4/0/O1CN01hDGyZC1yDexjAaZ4I_!!0-rate.jpg",
"//img.alicdn.com/imgextra/i4/0/O1CN01714Xvv1yDexu2mTEB_!!0-rate.jpg"
],
"display_user_nick": "快**9",
"auction_sku": "尺码:39;颜色分类:黑色【内里:超细纤维】",
"add_feedback": "",
"add_feedback_images": [],
"create_time_interval": "1年前",
"read_count": "292",
"rate_id": "1152900593524",
"reply": "谢谢您对我们的支持!因为有您,我们会更努力!分享,是一种生活;生活,是一种态度。您的态度,是我们最重视的关注;加入戈美其会员俱乐部,享受vip好礼",
"comment_count": "0",
"like_count": "1",
"user_star": "6",
"user_star_pic": "https://img.alicdn.com/imgextra/i3/O1CN01QZTjHW1F4oegDvuEX_!!6000000000434-2-tps-92-45.png"
},
{
"rate_content": "去年买过一双一样的,今年看了其他家,还是想复制一下上一双鞋子的快乐。鞋底很软,走路不累,超级百搭,爱了爱了。客服都很耐心,7号客服很棒哈哈~ ",
"rate_date": "2021-10-20",
"pics": [
"//img.alicdn.com/imgextra/i1/0/O1CN01N6n5JO24FqYC9k9mc_!!0-rate.jpg"
],
"display_user_nick": "随**0",
"auction_sku": "尺码:39;颜色分类:黑色【内里:超细纤维】",
"add_feedback": "",
"add_feedback_images": [],
"create_time_interval": "1年前",
"read_count": "299",
"rate_id": "1152874831149",
"reply": "亲,感谢您对我们的支持!正式邀请您成为我们的vip会员;收到宝贝有什么问题,可即刻与我们联系,我们将竭尽全力为您解决!",
"comment_count": "0",
"like_count": [],
"user_star": "7",
"user_star_pic": "https://img.alicdn.com/imgextra/i4/O1CN01ZlCYMx1nbVriw6u0S_!!6000000005108-2-tps-92-45.png"
},
{
"rate_content": "2号客服棒棒哒",
"rate_date": "2021-09-28",
"pics": [],
"display_user_nick": "可**2",
"auction_sku": "尺码:39;颜色分类:黑色【内里:超细纤维】",
"add_feedback": "",
"add_feedback_images": [],
"create_time_interval": "1年前",
"read_count": "2",
"rate_id": "1148841092349",
"reply": "谢谢您对我们的支持!因为有您,我们会更努力!分享,是一种生活;生活,是一种态度。您的态度,是我们最重视的关注;加入戈美其会员俱乐部,享受vip好礼",
"comment_count": "0",
"like_count": [],
"user_star": "9",
"user_star_pic": "https://img.alicdn.com/imgextra/i3/O1CN01PIYxrZ22FGrmiDphN_!!6000000007090-2-tps-92-45.png"
},
{
"rate_content": "此用户没有填写评价。",
"rate_date": "2021-09-15",
"pics": [],
"display_user_nick": "宝**0",
"auction_sku": "尺码:37;颜色分类:黑色【内里:超细纤维】",
"add_feedback": "",
"add_feedback_images": [],
"create_time_interval": "1年前",
"read_count": "0",
"rate_id": "1147688357921",
"reply": "谢谢您对我们的支持!因为有您,我们会更努力!分享,是一种生活;生活,是一种态度。您的态度,是我们最重视的关注;加入戈美其会员俱乐部,享受vip好礼",
"comment_count": "0",
"like_count": [],
"user_star": "8",
"user_star_pic": "https://img.alicdn.com/imgextra/i4/O1CN019QZnaG1U1LtUAPn6e_!!6000000002457-2-tps-92-45.png"
},
{
"rate_content": "7号客服棒棒哒 ",
"rate_date": "2021-09-13",
"pics": [],
"display_user_nick": "w**2",
"auction_sku": "尺码:37;颜色分类:黑色【内里:超细纤维】",
"add_feedback": "",
"add_feedback_images": [],
"create_time_interval": "1年前",
"read_count": "1",
"rate_id": "1147975534640",
"reply": "亲,感谢您对我们的支持!正式邀请您成为我们的vip会员;收到宝贝有什么问题,可即刻与我们联系,我们将竭尽全力为您解决!",
"comment_count": "0",
"like_count": [],
"user_star": "7",
"user_star_pic": "https://img.alicdn.com/imgextra/i4/O1CN01ZlCYMx1nbVriw6u0S_!!6000000005108-2-tps-92-45.png"
},
{
"rate_content": "不错 ",
"rate_date": "2021-09-13",
"pics": [],
"display_user_nick": "花**糖",
"auction_sku": "尺码:37;颜色分类:黑色【内里:超细纤维】",
"add_feedback": "",
"add_feedback_images": [],
"create_time_interval": "1年前",
"read_count": "0",
"rate_id": "1147394085601",
"reply": "亲,感谢您对我们的支持!正式邀请您成为我们的vip会员;收到宝贝有什么问题,可即刻与我们联系,我们将竭尽全力为您解决!",
"comment_count": "0",
"like_count": [],
"user_star": "8",
"user_star_pic": "https://img.alicdn.com/imgextra/i4/O1CN019QZnaG1U1LtUAPn6e_!!6000000002457-2-tps-92-45.png"
}
],
"data_from": "xdl"
},
"secache": "c8bde0fb0758d449f9b07cca295d4b61",
"secache_time": 1684401908,
"secache_date": "2023-05-18 17:25:08",
"translate_status": "",
"translate_time": 0,
"language": {
"default_lang": "cn",
"current_lang": "cn"
},
"error": "",
"reason": "",
"error_code": "0000",
"cache": 0,
"api_info": "today:108 max:10000 all[249=108+108+33];expires:2030-12-31",
"execution_time": "1.2",
"server_time": "Beijing/2023-05-18 17:25:08",
"client_ip": "106.60.33.123",
"call_args": {
"num_iid": "600530677643",
"page": "1"
},
"api_type": "taobao",
"translate_language": "zh-CN",
"translate_engine": "baidu",
"server_memory": "0.94MB",
"request_id": "gw-4.6465eef3a3f2c",
"last_id": "1747240888"
}