如何通过API实现淘宝商品评论数据抓取?item_review获取淘宝商品评论
前几天一个好朋友要我帮忙抓一下淘宝商品的评论数据,获取淘宝评论数据可以帮忙商家们做好市场调研,对自己的产品进行升级,从而更好地获取市场。我将详细爬取方法封装成API,以供方便调用。
item_review-获得淘宝商品评论
响应示例
"items": {
"total_results": 61,
"totalpage": 7,
"page_size": 10,
"page": "1",
"item": [
{
"rate_content": "拍照技术不行哈,实物更亮更好看呢 这个价格绝对值***我原来买的那条品质好很多价格还便宜一点 非常喜欢",
"rate_date": "2024-12-12 17:07:17",
"pics": [
"//img.alicdn.com/bao/uploaded/i1/O1CN01yD9UhX1pc5qxPL0zS_!!4611686018427386116-0-rate.jpg"
],
"display_user_nick": "t***0",
"auction_sku": "珍珠直径:7.5-8mm;项链长度:42cm;颜色分类:14K灯笼扣差价 单拍不发货",
"add_feedback": null,
"add_feedback_images": null,
"rate_id": 1257823192318,
"video": null
},
{
"rate_content": "实物偏粉,圆度可以,也没什么瑕疵 这个价格挺实惠",
"rate_date": "2024-12-12 13:13:07",
"pics": [
"//img.alicdn.com/bao/uploaded/i2/O1CN01BMsez61skkBIamZ4p_!!4611686018427384589-0-rate.jpg"
],
"display_user_nick": "洅***绅",
"auction_sku": "珍珠直径:7.5-8mm;项链长度:42cm;颜色分类:14K灯笼扣差价 单拍不发货",
"add_feedback": null,
"add_feedback_images": null,
"rate_id": 1258085590888,
"video": null
},
{
"rate_content": "珍珠的光泽度没的说,很亮,而且几乎没有瑕疵,已经推荐给朋友了,他们都说好看都要来买!",
"rate_date": "2024-12-12 20:48:39",
"pics": [],
"display_user_nick": "芮***兮",
"auction_sku": "珍珠直径:7.5-8mm;项链长度:40cm;颜色分类:白色",
"add_feedback": null,
"add_feedback_images": null,
"rate_id": 1257841400984,
"video": null
},
{
"rate_content": "第一次买珍珠,挺喜欢的,特别喜欢粉粉的珠光 以后有喜欢的款式还会光顾",
"rate_date": "2024-12-12 16:57:05",
"pics": [
"//img.alicdn.com/bao/uploaded/i4/O1CN01wUGBbs1hHT5hlD1I2_!!4611686018427384428-0-rate.jpg"
],
"display_user_nick": "吴***凡",
"auction_sku": "珍珠直径:7.5-8mm;项链长度:42cm;颜色分类:14K灯笼扣差价 单拍不发货",
"add_feedback": null,
"add_feedback_images": null,
"rate_id": 1257822052088,
"video": null
},
{
"rate_content": "已经是第二条了,这次这条也非常满意,无论珠光圆度都非常好,之前也买过同规格的天女级海水珍珠对比,光泽基本一样,所以一直信赖还珠堂这家店。这次还升级了18k金扣,非常赞!比之前的银扣好,之前的银扣久了变色。",
"rate_date": "2024-07-08 19:27:26",
"pics": [
"//img.alicdn.com/bao/uploaded/i1/O1CN01UPQOJY1dii8gOlmWb_!!0-rate.jpg",
"//img.alicdn.com/bao/uploaded/i1/O1CN01YXPuRK1dii8d8I4w0_!!0-rate.jpg",
"//img.alicdn.com/bao/uploaded/i1/O1CN01v0imQH1dii8fY8uJ8_!!0-rate.jpg"
],
"display_user_nick": "罗***区",
"auction_sku": "珍珠直径:4.1-4.5mm;项链长度:40cm;颜色分类:纯18K金扣+2cm延长链",
"add_feedback": null,
"add_feedback_images": null,
"rate_id": 1244087586179,
"video": null
},
{
"rate_content": "佩戴体验:好",
"rate_date": "2023-03-29 11:37:43",
"pics": [],
"display_user_nick": "t***7",
"auction_sku": "珍珠直径:6-6.5mm;项链长度:40cm;颜色分类:白色",
"add_feedback": null,
"add_feedback_images": null,
"rate_id": 1203319960388,
"video": null
},
{
"rate_content": "佩戴体验:很喜欢,珠子非常圆",
"rate_date": "2023-02-07 15:04:14",
"pics": [
"//img.alicdn.com/bao/uploaded/i3/O1CN010Q55ig26ATEBAqNJr_!!0-tbbala.jpg"
],
"display_user_nick": "t***8",
"auction_sku": "珍珠直径:7.5-8mm;项链长度:43cm;颜色分类:白色",
"add_feedback": "非常满意",
"add_feedback_images": [
"//img.alicdn.com/bao/uploaded/i1/O1CN01MfPLAT26ATE6IBpGN_!!0-tbbala.jpg"
],
"rate_id": 1199178116121,
"video": null
},
{
"rate_content": "这条海珠项链绝了,每颗都正圆,光泽度好,日常戴非常百搭。图一灯光,图二自然光,打算再入条大的。强烈推荐这家的珠链,价格美丽质量好!",
"rate_date": "2023-03-04 20:29:02",
"pics": [
"//img.alicdn.com/bao/uploaded/i4/O1CN01YZi7hi2BV9C1jgugY_!!0-tbbala.jpg",
"//img.alicdn.com/bao/uploaded/i3/O1CN01lAau632BV9C1jiagD_!!0-tbbala.jpg"
],
"display_user_nick": "花***0",
"auction_sku": "珍珠直径:4-4.5mm;项链长度:40cm;颜色分类:白色",
"add_feedback": "戴了好几天,每天都爱不释手,满意!",
"add_feedback_images": [],
"rate_id": 1202020447796,
"video": null
},
{
"rate_content": "真的好好看!!!",
"rate_date": "2023-03-01 10:21:03",
"pics": [],
"display_user_nick": "我***味",
"auction_sku": "珍珠直径:5.5-6mm;项链长度:40cm;颜色分类:白色",
"add_feedback": "这个真的好看 亮度可以!",
"add_feedback_images": [
"//img.alicdn.com/bao/uploaded/i1/O1CN01lKzPG91uVkF0pAZZ3_!!0-tbbala.jpg"
],
"rate_id": 1200775016522,
"video": null
},
{
"rate_content": "珍珠项链下午刚收到,就迫不及待打开看,仔细检查发现两颗有一点点瑕疵,不仔细检查根本看不出,整体很漂亮,服务好,物流还行,想买的朋友可以入手。好评!",
"rate_date": "2023-06-06 20:23:43",
"pics": [
"//img.alicdn.com/bao/uploaded/i1/O1CN015774qi1VZX9i1fn1C_!!0-rate.jpg"
],
"display_user_nick": "t***7",
"auction_sku": "珍珠直径:6-6.5mm;项链长度:43cm;颜色分类:白色",
"add_feedback": null,
"add_feedback_images": null,
"rate_id": 1209484748346,
"video": null
}
],
"_ddf": "cdy"
公共参数
名称 | 类型 | 必须 | 描述 |
---|---|---|---|
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版本 |
请求参数
请求参数:num_iid=600530677643&data=&page=1
参数说明:num_iid:淘宝商品ID
sort:排序 0:默认排序 ,1: 最新排序
响应参数
Version: Date:
名称 | 类型 | 必须 | 示例值 | 描述 |
---|---|---|---|---|
items | items[] | 0 | 商品评论数据 | |
total_results | Int | 0 | 227 | 评论总数 |
totalpage | Int | 0 | 23 | 总页数 |
page_size | Int | 0 | 10 | 接口返回数量 |
page | String | 0 | 1 | 页码 |
item | item[] | 0 | ||
rate_content | String | 0 | 外形美观,穿着也可以,只是鞋面材料有点过软,鞋面再硬点就更好穿了 | 内容 |
rate_date | Date | 0 | 2024-08-20 13:09:05 | 日期 |
pics | Mix | 0 | 图片 | |
display_user_nick | String | 0 | 花***4 | 买家昵称 |
auction_sku | String | 0 | 颜色分类:三色带 浅黄色(升级版)、39 (偏小一码) | 商品属性 |
add_feedback | String | 0 | 追评内容 | |
add_feedback_images | Mix | 0 | 追评图片 | |
video | String | 0 | 视频地址 |