获取用户信息
POST
/api/xhs/user_detail:::highlight red 📌
小红书接口在原有的字段基础上外套response_status
、response_body
、response_headers
,分别对应小红书返回的响应码
,响应体
,响应头
,其中response_body
内容字段与原有的保持一致。
:::
请求参数
Header 参数
Cookie
string
可选
如接口返回失败请携带你自己的小红书cookie
示例值:
abRequestId=5547defe-dd03-5933-82a8-71f703cdbbaf; xsecappid=xhs-pc-web; a1=1940199d8bd1x0mhq21qd2rxpb3uqe1vahyjea2h750000377559; webId=76df1516847d67c6ccf5a1ddb5e015ce; gid=yj48yjjd8f0jyj48yjjfYx0JDfyC86xAJyAfvxWJFCUDqV287Adyhd888qWW22j80fD8dDj8; acw_tc=0a4a3c6d17352010129873420efca2421b9ff210c004e9af035a37cab2ecf7; webBuild=4.51.1; web_session=040069b618adaa33946295ea41354bbd0f9bfd; unread={%22ub%22:%22675431340000000002017488%22%2C%22ue%22:%2267711141000000000b015544%22%2C%22uc%22:20}; websectiga=634d3ad75ffb42a2ade2c5e1705a73c845837578aeb31ba0e442d75c648da36a; sec_poison_id=9eaaf19b-6e4e-4e85-8b77-0e82cd4f0b9e
Body 参数application/json
user_id
string
必需
用户ID(与分享链接必填一项)
xsec_token
string
可选
用户xsec_token
share_text
string
可选
分享链接(与ID必填一项)
proxy
boolean
必需
代理(http或socks5)
示例
{
"user_id": "5e2a71980000000001003e69",
"xsec_token": "ABZlCtT95XjCOA_t-MSEtuw7EpHlC1zWNSBe4vJuPKbNo=",
"share_text": "https://www.xiaohongshu.com/user/profile/638d73a1000000001f0165ef?xhsshare=CopyLink&appuid=647478850000000012036771&apptime=1698893766",
"proxy": false
}
示例代码
返回响应
成功(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"
}
}
}
最后修改时间: 12 天前