获取用户信息
POST
/api/xhs/user_detail:::highlight red 📌
小红书接口在原有的字段基础上外套response_status
、response_body
、response_headers
,分别对应小红书返回的响应码
,响应体
,响应头
,其中response_body
内容字段与原有的保持一致。
:::
请求参数
Header 参数
Cookie
string
可选
如接口返回失败请携带你自己的小红书cookie
Body 参数application/json
user_id
string
必需
用户ID(与分享链接必填一项)
share_text
string
必需
分享链接(与ID必填一项)
proxy
可选
代理(http或socks5)
Any of
为空使用程序默认代理
示例
{
"user_id": "",
"share_text": "https://www.xiaohongshu.com/user/profile/638d73a1000000001f0165ef?xhsshare=CopyLink&appuid=647478850000000012036771&apptime=1698893766"
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
code
integer
MoreAPI响应码
msg
string
必需
path
string
必需
data
object
MoreAPI返回内容
response_status
integer
小红书响应码
response_body
object
小红书响应体
response_headers
object
小红书响应头
示例
{
"code": 200,
"msg": "success",
"path": "/api/xhs/user_detail",
"data": {
"response_status": 200,
"response_body": {
"code": 0,
"success": true,
"msg": "成功",
"data": {
"tags": [
{
"icon": "http://ci.xiaohongshu.com/icons/user/gender-female-v1.png",
"name": "巨蟹座",
"tagType": "info"
},
{
"name": "香港城市大学",
"tagType": "college"
}
],
"tab_public": {
"collectionNote": {
"count": 0,
"display": false,
"lock": false
},
"collectionBoard": {
"display": false,
"lock": false,
"count": 0
},
"collection": false
},
"extra_info": {
"fstatus": "none",
"blockType": "DEFAULT"
},
"result": {
"success": true,
"code": 0,
"message": "success"
},
"basic_info": {
"desc": "171|51 喜欢漂亮的衣服\n24🇭🇰留学| entj 分享日常|好物\n📮644010845@qq.com",
"imageb": "https://sns-avatar-qc.xhscdn.com/avatar/644290e61300c5cf9d360740.jpg?imageView2/2/w/540/format/webp",
"nickname": "喜欢草莓的CC",
"images": "https://sns-avatar-qc.xhscdn.com/avatar/644290e61300c5cf9d360740.jpg?imageView2/2/w/360/format/webp",
"red_id": "5329579021",
"gender": 1,
"ip_location": "中国香港"
},
"interactions": [
{
"name": "关注",
"count": "74",
"type": "follows"
},
{
"type": "fans",
"name": "粉丝",
"count": "2879"
},
{
"count": "6964",
"type": "interaction",
"name": "获赞与收藏"
}
]
}
},
"response_headers": {
"date": "Mon, 09 Sep 2024 13:07:45 GMT",
"content-type": "application/json; charset=utf-8",
"alt-svc": "h3=\":443\"; ma=2592000, h3-29=\":443\"; ma=2592000, h3-27=\":443\"; ma=2592000, h3-Q050=\":443\"; ma=2592000, h3-Q046=\":443\"; ma=2592000, h3-Q043=\":443\"; ma=2592000, h3-Q039=\":443\"; ma=2592000, quic=\":443\"; ma=2592000; v=\"39,43,46\"",
"transfer-encoding": "chunked",
"connection": "keep-alive",
"server": "nginx",
"access-control-allow-credentials": "true",
"access-control-allow-origin": "https://www.xiaohongshu.com",
"cat-msg-id": "karen-gateway-snsdefault-0a0ff5d3.42553-479410-3196349",
"request-id": "e5280998ba9444c2b9e6d27a8fc6433d",
"x-kong-sign": "0",
"xhs-request-time": "0.175",
"content-encoding": "gzip",
"xhs-real-ip": "42.94.76.59"
}
}
}
最后修改时间: 1 个月前