Xiaohongshu APIs - User Profile (V3)
prod-global
GET
/api/xiaohongshu/get-user/v3
Retrieves Xiaohongshu user profile data, including user identifiers and profile metadata (e.g., nickname, avatar, bio), as well as public counters such as follower count and like count (when available).
Typical use cases:
- Identifying creators/KOLs and building creator lists
- Enriching user records for analytics and reporting
- Creator monitoring (profile and counter changes over time)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
token | query | string | Yes | Access token for this API service. |
userId | query | string | Yes | Unique user identifier on Xiaohongshu. |
Code Samples
💡 Environment Note
Default samples use https://api.justoneapi.com (prod-global). For users in Mainland China, it is recommended to replace it with http://47.117.133.51:30015 (prod-cn) for better performance. See Environment Guide.
bash
# Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
curl -X GET "https://api.justoneapi.com/api/xiaohongshu/get-user/v3?token=YOUR_API_KEY&userId=VALUE"text
I want to use the "User Profile (V3)" API from Just One API.
API Endpoint: https://api.justoneapi.com/api/xiaohongshu/get-user/v3
HTTP Method: GET
Authentication: Append "?token=YOUR_API_KEY" to the URL.
OpenAPI Definition: https://docs.justoneapi.com/openapi/xiaohongshu-apis/user-profile-v3-en.json
Parameters:
- token (query): Access token for this API service. (Required)
- userId (query): Unique user identifier on Xiaohongshu. (Required)
Return format: JSON
Response Handling & Error Codes:
1. Business results should be determined by the "code" field in the response body (code 0 means success).
2. Timeout Recommendation: Set request timeout to at least 60 seconds.
3. Business Code Reference:
- 0: Success
- 100: Invalid or Inactive Token
- 301: Collection Failed. Please Retry.
- 302: Rate Limit Exceeded
- 303: Daily Quota Exceeded
- 400: Invalid Parameters
- 500: Internal Server Error
- 600: Permission Denied
- 601: Insufficient Balance
Please help me write a script in my preferred programming language to call this API and handle the response.python
# Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
import requests
url = "https://api.justoneapi.com/api/xiaohongshu/get-user/v3?token=YOUR_API_KEY&userId=VALUE"
response = requests.get(url)
print(response.json())js
// Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
const response = await fetch("https://api.justoneapi.com/api/xiaohongshu/get-user/v3?token=YOUR_API_KEY&userId=VALUE", {
method: "GET"
});
const data = await response.json();
console.log(data);java
// Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.justoneapi.com/api/xiaohongshu/get-user/v3?token=YOUR_API_KEY&userId=VALUE"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}go
// Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
client := &http.Client{}
url := "https://api.justoneapi.com/api/xiaohongshu/get-user/v3?token=YOUR_API_KEY&userId=VALUE"
req, _ := http.NewRequest("GET", url, nil)
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}php
// Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.justoneapi.com/api/xiaohongshu/get-user/v3?token=YOUR_API_KEY&userId=VALUE");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
curl_close($ch);
echo $response;Responses
json
{
"code": 0,
"data": {
"liked": 65447,
"nickname": "是六金呀~",
"red_club_info": {
"red_club_url": "https://www.xiaohongshu.com/store/mc/landing",
"redclubscore": 0,
"red_club": false,
"red_club_level": 0
},
"show_extra_info_button": false,
"identity_label_migrated": false,
"hula_tabs": {
"all_show_tab_config": [
{
"tab_name": "笔记",
"tab_index_weight": 0,
"tab_id": "note"
}
],
"tab_id_selected": "note"
},
"collected": 15725,
"collected_tags_num": 0,
"collected_book_num": 0,
"desc_at_users": [
{
"id": "55e54f003397db29780ea7ba",
"nickname": "星星泡面"
}
],
"real_name_info": "",
"imageb": "https://sns-avatar-qc.xhscdn.com/avatar/63d36aae9a0594dbc226012e.jpg?imageView2/2/w/540/format/webp",
"images": "https://sns-avatar-qc.xhscdn.com/avatar/63d36aae9a0594dbc226012e.jpg?imageView2/2/w/360/format/webp",
"gender": 1,
"recommend_info_icon": "",
"red_official_verify_type": 0,
"ip_location": "广东",
"zhong_tong_bar_info": {
"conversions": []
},
"collected_brand_num": 0,
"remark_name": "",
"avatar_like_status": false,
"avatar_pendant": {
"current_user_pendant": false,
"current_user_pet": false
},
"follows": 29,
"nboards": 0,
"collected_poi_num": 0,
"userid": "5c2f338a000000000701e1c6",
"community_rule_url": "https://www.xiaohongshu.com/user/community-rule",
"seller_info": {
"tab_goods_api_version": 1,
"tab_code_names": [],
"is_tab_goods_first": true
},
"share_link": "https://www.xiaohongshu.com/user/profile/5c2f338a000000000701e1c6?xsec_token=YBwVNAUpVNP86CtEIG-rI9HfjY8EpMRxv24xns7CuwW80=&xsec_source=app_share",
"red_official_verify_content": "",
"is_recommend_level_illegal": false,
"identity_deeplink": "xhsdiscover://rn/app-settings/official/certification/details?type=2&user_id=5c2f338a000000000701e1c6&is_mcn=false",
"blocking": false,
"user_widget_switch": false,
"sec_account_deeplink": "xhsdiscover://rn/accounts/account-detail?targetId=5c2f338a000000000701e1c6&new_page_exp=1",
"desc": "162/110\nhi看@星星泡面 置顶",
"recommend_info": "",
"collected_movie_num": 0,
"result": {
"code": 0,
"message": "success",
"success": true
},
"ndiscovery": 270,
"red_official_verified": false,
"blocked": false,
"is_login_user_pro_account": false,
"banner_info": {
"image": "http://sns-avatar-qc.rednotecdn.com/user_banner/6499c049-b152-3c0e-8e55-1b9c463df303?imageView2/2/w/540/format/jpg&ap=28&sc=USR_BG&src=A",
"bg_color": "2e3943",
"like_status": false
},
"fans": 21263,
"red_id": "531915550",
"share_info": {
"title": "是六金呀~",
"content": "162/110\nhi看@星星泡面 置顶"
},
"interactions": [
{
"type": "follows",
"name": "关注",
"count": 29,
"is_private": true,
"toast": "该用户已设置关注列表不可见"
},
{
"is_private": true,
"toast": "该用户已设置粉丝列表不可见",
"type": "fans",
"name": "粉丝",
"count": 21263
},
{
"is_private": false,
"toast": "",
"type": "interaction",
"name": "获赞与收藏",
"count": 81172
}
],
"share_info_v2": {
"title": "@是六金呀~的个人主页",
"content": "粉丝: 2.1万\n获赞与收藏: 8.1万"
},
"user_role_type": 0,
"tags": [
{
"icon": "http://ci.xiaohongshu.com/icons/user/gender-female-v1.png",
"name": "28岁",
"tag_type": "info"
}
],
"location_jump": false,
"collected_notes_num": 0,
"collected_product_num": 0,
"note_num_stat": {
"posted": 270,
"liked": 65447,
"collected": 15725
},
"default_collection_tab": "note",
"level": {
"number": 0,
"image_link": ""
},
"location": "",
"tab_visible": {
"note": true,
"collect": false,
"like": false,
"seed": true
},
"red_official_verify_base_info": "",
"real_name_deep_target": 1,
"tab_public": {
"collection": false,
"collection_note": true,
"collection_board": true,
"seed": true
},
"fstatus": "none",
"user_desc_info": {
"desc": "162/110\nhi看@星星泡面 置顶",
"desc_at_users": [
{
"user_id": "55e54f003397db29780ea7ba",
"nickname": "星星泡面"
}
],
"desc_with_placeholder": "162/110\nhi看@星星泡面 置顶",
"desc_keywords_switch": true
}
}
}💡 Note: For list data, the example shows only 1-2 items for simplicity. The actual count depends on the API response.
