在深度剖析小红书(RED)笔记详情API的返回数据时,我们首先需要明确小红书的API并不是公开给所有开发者的,而是针对其合作伙伴或内部使用的。然而,为了理解一个类似API可能返回的数据结构,我们可以基于常见的RESTful API设计原则和社交媒体平台通常提供的数据字段来模拟一个可能的返回结构。
status
、code
和message
:用于表示API调用的整体状态。data
:包含实际笔记详情数据的字段。note_id
:笔记的唯一标识符。title
:笔记的标题。content
:笔记的内容,可能是HTML或富文本格式。images
:一个包含笔记中图片信息的数组。author
:包含笔记作者信息的对象。likes_count
、comments_count
、collection_count
和share_count
:分别表示点赞数、评论数、收藏数和分享数。publish_time
:笔记的发布时间。tags
:一个包含笔记标签的数组。location
:笔记的地理位置。view_count
:笔记的浏览量。is_liked
和is_collected
:表示当前用户是否已点赞或收藏该笔记(这些字段可能需要身份验证)。related_notes
:一个包含相关笔记数据的数组(可能需要额外的API调用)。
-
smallredbook.item_get
公共参数
请求地址: https://api-gw.onebound.cn/smallredbook/item_get
名称 类型 必须 描述 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=5eb1097ba091410953951d17
参数说明:num_iid:小红书商品ID
filter:note(搜索笔记/视频)
响应参数
Version: Date:
名称 | 类型 | 必须 | 示例值 | 描述 |
---|---|---|---|---|
num_iid | String | 0 | 1999629976 | 商品ID |
title | String | 0 | 2019新款女装短袖t恤女夏宽松韩版休闲上衣百搭蝙蝠衫五分袖体恤 | 商品标题 |
price | Float | 0 | 8.8 | 价格 |
minGroupPrice | String | 0 | ||
maxGroupPrice | String | 0 | ||
total_price | Float | 0 | ||
orginal_price | Float | 0 | 原价 | |
nick | String | 0 | 雅怡服饰1688 | 卖家昵称 |
num | Int | 0 | 233 | 库存 |
sales | Int | 0 | 76 | 销量 |
detail_url | String | 0 | http://yangkeduo.com/goods.html?goods_id=1999629976 | 宝贝链接 |
desc | String | 0 | 本店默认申通快递【还有百世汇通 中通快递 中通 韵达 邮政】。商家建议尺码仅供参考。如有其它问题请及时联系客服!喜欢的赶紧购买,质量保证,买的放心,穿的也开心! | 商品备注 |
item_imgs | Mix | 0 | [{"url": "//t00img.yangkeduo.com/t05img/images/2018-06-28/24bcb29df1195edaea840afd3e1bdaf9.jpeg?imageMogr2/strip%7CimageView2/2/w/1300/q/80"}] | 宝贝图片列表 |
pic_url | String | 0 | //t00img.yangkeduo.com/t05img/images/2018-06-28/24bcb29df1195edaea840afd3e1bdaf9.jpeg?imageMogr2/thumbnail/150x/quality/50 | 宝贝图片 |
props_name | String | 0 | 商品属性名 | |
prop_imgs | Mix | 0 | {"prop_img": [ {"properties": "0:0;1:1", "url": "//t00img.yangkeduo.com/t10img/images/2018-06-28/5c8f783ab2c4fea0ffea8fac73d8b2c2.jpeg"}]} | 商品属性图片列表 |
props | Mix | 0 | 商品详情 | |
skus | Mix | 0 | {"sku": [{"price": "16.56", "total_price": null, "orginal_price": "20.9", "properties": "0:0;1:1", "properties_name": "0:0:颜色:黑色;1:1:尺码:M【75-100斤】", "quantity": 221, "sku_id": 36410965966}] | 商品规格信息 |
props_list | Mix | 0 | { "0:0": "颜色:黑色","1:1": "尺码:M【75-100斤】"} | 商品属性 |
props_img | Mix | 0 | {"0:0;1:1": "//t00img.yangkeduo.com/t10img/images/2018-06-28/5c8f783ab2c4fea0ffea8fac73d8b2c2.jpeg"} | 属性图片 |
property_alias | String | 0 | 商品属性别名 | |
seller_info | Mix | 0 | {"nick": "雅怡服饰1688", "city": "", "level": null, "rate": null, "score": 4.27, "delivery_score": 4.37, "item_score": 4.38, "shop_type": "", "user_num_id": "", "sid": 99033, "shop_name": "雅怡服饰1688", "zhuy": "", "menu": [] } | 卖家信息 |
shop_item | Mix | 0 | [] | |
relate_items | Mix | 0 | [] |
响应示例
"city": null,
"desc": "这就是柱子哥的魅力",
"detail_url": "https://www.xiaohongshu.com/explore/649c46ab000000002702ad36",
"interact_info": {
"collected_count": "10+",
"comment_count": "5",
"liked_count": "10+"
},
"nick": "大猫娱乐",
"num_iid": "649c46ab000000002702ad36",
"pic_url": "http://sns-webpic-qc.xhscdn.com/202405201721/d5a7415a71ddf151a39bad851c0e5188/1000g0082nh5p4aujq06g5p40bv0joi4h5g0aai0!nd_dft_wgth_webp_3",
"tag_list": [
{
"id": "545c2716d6e4a924bf74ed49",
"name": "变形金刚",
"type": "topic"
}
],
"time": "2023.06.28 14:41:47",
"title": "变形金刚4",
"type": "video",
"uid": "64805fc1000000000f004891",
"video": "http://sns-video-hw.xhscdn.net/stream/110/259/01e49c46a63bcd39010377038902866376_259.mp4",
"error": "",
"reason": "",
"error_code": "0000",
"cache": 0,
"api_info": "today:43 max:10000 all[1124=43+82+999];expires:2030-10-30",
"execution_time": "0.94",
"server_time": "Beijing/2024-05-20 17:21:22",
"client_ip": "106.7.5.249",
"call_args": [],
"api_type": "smallredbook",
"translate_language": "zh-CN",
"translate_engine": "baidu",
"server_memory": "3.09MB",
"request_id": "gw-3.664b1611883ff",