Xiaohongshu (RedNote) Note Details API (V1)
API health status
Healthy Available Limited Mostly unavailable No data
Loading health status...
Get Xiaohongshu (RedNote) note Details data, including media and engagement metrics, for content analysis, archiving, and campaign research.
Parameters
| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
token | query | string | Yes | - | Access token for this API service. |
noteId | query | string | Yes | - | Unique note identifier on Xiaohongshu. |
Code Samples
bash
curl -X GET "https://api.justoneapi.com/api/xiaohongshu/get-note-detail/v1?token=YOUR_API_KEY¬eId=VALUE"text
I want to use the "Note Details (V1)" API from Just One API.
API Endpoint: https://api.justoneapi.com/api/xiaohongshu/get-note-detail/v1
HTTP Method: GET
Authentication: Append "?token=YOUR_API_KEY" to the URL.
OpenAPI Definition: https://docs.justoneapi.com/openapi/xiaohongshu-rednote/note-details-v1-en.json
Parameters:
- token (query): Access token for this API service. (Required)
- noteId (query): Unique note 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
import requests
url = "https://api.justoneapi.com/api/xiaohongshu/get-note-detail/v1?token=YOUR_API_KEY¬eId=VALUE"
response = requests.get(url)
print(response.json())js
const response = await fetch("https://api.justoneapi.com/api/xiaohongshu/get-note-detail/v1?token=YOUR_API_KEY¬eId=VALUE", {
method: "GET"
});
const data = await response.json();
console.log(data);java
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-note-detail/v1?token=YOUR_API_KEY¬eId=VALUE"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}go
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
client := &http.Client{}
url := "https://api.justoneapi.com/api/xiaohongshu/get-note-detail/v1?token=YOUR_API_KEY¬eId=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
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.justoneapi.com/api/xiaohongshu/get-note-detail/v1?token=YOUR_API_KEY¬eId=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": [
{
"user": {
"name": "风草",
"image": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo31fipps8cg66g5n684dak6j4mlhbrfio?imageView2/2/w/120/format/jpg",
"followed": false,
"nickname": "风草",
"red_official_verify_type": 0,
"show_red_official_verify_icon": false,
"red_official_verified": false,
"id": "5cc823550000000010034c96",
"fstatus": "none",
"level": {
"image": ""
},
"userid": "5cc823550000000010034c96",
"track_duration": 0,
"red_id": "518955047"
},
"note_list": [
{
"ip_location": "浙江",
"hash_tag": [
{
"record_count": 0,
"record_unit": "",
"name": "我是春节主理人",
"link": "xhsdiscover://rn/sns-discover/topic/immersive?id=696a7c8301b4000000000001&page_source=note_feed.click_new_big",
"record_emoji": "",
"current_score": 0,
"bizId": "",
"tag_hint": "",
"id": "696a7c83000000001b01014c",
"type": "topic"
},
{
"id": "696f9b5e000000001c0013e2",
"name": "咔嚓一张新年照",
"type": "topic",
"record_emoji": "",
"link": "xhsdiscover://rn/sns-discover/topic/immersive?id=696f9b5e01c0000000000005&page_source=note_feed.click_new_big",
"record_count": 0,
"record_unit": "",
"current_score": 0,
"bizId": "",
"tag_hint": ""
},
{
"id": "5c2372ac000000000a03c2b9",
"record_emoji": "",
"tag_hint": "",
"record_count": 0,
"record_unit": "",
"current_score": 0,
"bizId": "",
"name": "新年写真",
"type": "topic",
"link": "xhsdiscover://rn/sns-discover/topic/normal?id=5c2372ac7a9eab0001d89a13&page_source=note_feed.click_new_big"
},
{
"current_score": 0,
"bizId": "",
"id": "5bf8bd51e9a6d80001ba932c",
"type": "topic",
"link": "xhsdiscover://rn/sns-discover/topic/normal?id=5bf8bd519baeea0001ac42d8&page_source=note_feed.click_new_big",
"record_emoji": "",
"record_unit": "",
"name": "国风",
"record_count": 0,
"tag_hint": ""
},
{
"name": "拍照姿势不重样",
"type": "topic",
"link": "xhsdiscover://rn/sns-discover/topic/normal?id=5ad5d3e0ec9d136f795dc910&page_source=note_feed.click_new_big",
"record_count": 0,
"record_unit": "",
"current_score": 0,
"tag_hint": "",
"id": "5ad5d27781f6d13b516564e9",
"bizId": "",
"record_emoji": ""
}
],
"user": {
"followed": false,
"red_id": "518955047",
"nickname": "风草",
"red_official_verify_type": 0,
"show_red_official_verify_icon": false,
"userid": "5cc823550000000010034c96",
"level": {
"image": ""
},
"id": "5cc823550000000010034c96",
"image": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo31fipps8cg66g5n684dak6j4mlhbrfio?imageView2/2/w/120/format/jpg",
"red_official_verified": false,
"track_duration": 0,
"fstatus": "none",
"name": "风草"
},
"comments_count": 84,
"head_tags": [],
"liked_users": [],
"foot_tags": [],
"media_save_config": {
"disable_watermark": false,
"disable_weibo_cover": false,
"disable_save": false
},
"biz_map": {},
"images_list": [
{
"original": "https://sns-i10.rednotecdn.com/1040g00831sd37bs2lk405n684dak6j4m6ekoci0?imageView2/2/w/5000/h/5000/format/heif/q/56&redImage/frame/0&ap=1&sc=V_ORG&sign=f84261bfe2427b601718db89f70ebb59&t=69aede95&src=A",
"longitude": 0,
"latitude": 0,
"scale_to_large": 4,
"url": "https://sns-i10.rednotecdn.com/1040g00831sd37bs2lk405n684dak6j4m6ekoci0?imageView2/2/w/576/format/heif/q/58|imageMogr2/strip&redImage/frame/0/enhance/4&ap=1&sc=V_PRV&sign=f84261bfe2427b601718db89f70ebb59&t=69aede95&src=A",
"width": 1080,
"index": 0,
"trace_id": "1040g00831sd37bs2lk405n684dak6j4m6ekoci0",
"text_intention": 0,
"fileid": "1040g00831sd37bs2lk405n684dak6j4m6ekoci0",
"url_multi_level": {
"low": "https://sns-i10.rednotecdn.com/1040g00831sd37bs2lk405n684dak6j4m6ekoci0?imageView2/2/w/576/format/heif/q/75|imageMogr2/strip&redImage/frame/0/enhance/4&ap=1&sc=V_PRV&sign=f84261bfe2427b601718db89f70ebb59&t=69aede95&src=A",
"medium": "https://sns-i10.rednotecdn.com/1040g00831sd37bs2lk405n684dak6j4m6ekoci0?imageView2/2/w/576/format/heif/q/75|imageMogr2/strip&redImage/frame/0/enhance/4&ap=1&sc=V_PRV&sign=f84261bfe2427b601718db89f70ebb59&t=69aede95&src=A",
"high": "https://sns-i10.rednotecdn.com/1040g00831sd37bs2lk405n684dak6j4m6ekoci0?imageView2/2/w/576/format/heif/q/75|imageMogr2/strip&redImage/frame/0/enhance/4&ap=1&sc=V_PRV&sign=f84261bfe2427b601718db89f70ebb59&t=69aede95&src=A"
},
"need_load_original_image": true,
"origin_img": {
"height": 1920,
"size": 0,
"width": 1080
},
"height": 1920
}
],
"time": 1770696804,
"mini_program_info": {
"user_name": "gh_52be748ce5b7",
"path": "pages/main/home/index?redirect_path=%2Fpages%2Fmain%2Fnote%2Findex%3Fxsec_source%3Dapp_share%26id%3D698ab064000000001503876d%26type%3Dvideo%26xsec_token%3DCBTVMpyskaCdfD88YIySqnm4XGnFXFQGsDjD_OI1aB3GE%3D",
"title": "@风草 发了一篇笔记,快点来看吧!",
"desc": "和@小羊崽吃了吗 在杭州街拍新年写真,也是第一次尝试这种国潮拍法,拍得特别开心!拍照动作可参考哦!#我是春节主理人",
"webpage_url": "https://www.xiaohongshu.com/discovery/item/698ab064000000001503876d?xsec_source=app_share",
"thumb": "http://sns-img-hw.xhscdn.com/1040g00831sd37bs2lk405n684dak6j4m6ekoci0?imageView2/2/w/540/format/jpg/q/75",
"share_title": "@风草 发了一篇笔记,快点来看吧!"
},
"enable_brand_lottery": false,
"topics": [
{
"business_type": 0,
"id": "696a7c83000000001b01014c",
"name": "我是春节主理人",
"image": "http://ci.xiaohongshu.com/fd75707a-37f8-45ad-b7a7-0feaf36e9cad@r_120w_120h.jpg",
"link": "xhsdiscover://topic/v2/696a7c8301b4000000000001?page_source=note_feed.click_new_big",
"activity_online": false,
"style": 0,
"discuss_num": 0
}
],
"collected_count": 247,
"shared_count": 149,
"enable_fls_related_cards": false,
"privacy": {
"type": 0,
"show_tips": false,
"nick_names": ""
},
"use_water_color": false,
"widgets_groups": [
[
"guos_test",
"note_next_step",
"second_jump_bar",
"cooperate_binds",
"note_collection",
"rec_next_infos",
"image_stickers",
"image_filters",
"product_review",
"related_search",
"cooperate_comment_component",
"image_goods_cards",
"ads_goods_cards",
"ads_comment_component",
"goods_card_v2",
"image_template",
"buyable_goods_card_v2",
"ads_engage_bar",
"challenge_card",
"cooperate_engage_bar",
"guide_post",
"pgy_comment_component",
"pgy_engage_bar",
"bar_below_image",
"aigc_collection",
"co_produce",
"widgets_ndb",
"next_note_guide",
"pgy_bbc_exp",
"async_group",
"super_activity",
"widgets_enhance",
"music_player",
"soundtrack_player"
],
[
"guos_test",
"vote_stickers",
"bullet_comment_lead",
"note_search_box",
"interact_pk",
"interact_vote",
"guide_heuristic",
"share_to_msg",
"follow_guide",
"note_share_prompt_v1",
"sync_group",
"group_share",
"share_guide_bubble",
"widgets_share",
"guide_navigator"
]
],
"note_text_press_options": [
{
"key": "copy",
"extra": ""
}
],
"liked": false,
"long_press_share_info": {
"content": "",
"title": "",
"is_star": false,
"block_private_msg": false,
"show_wechat_tag": false,
"function_entries": [
{
"type": "image_download"
}
],
"guide_audited": false
},
"goods_info": {},
"content_trans_info": {
"strategy": 10
},
"qq_mini_program_info": {
"desc": "和@小羊崽吃了吗 在杭州街拍新年写真,也是第一次尝试这种国潮拍法,拍得特别开心!拍照动作可参考哦!#我是春节主理人",
"webpage_url": "https://www.xiaohongshu.com/discovery/item/698ab064000000001503876d?xsec_source=app_share",
"thumb": "http://sns-img-hw.xhscdn.com/1040g00831sd37bs2lk405n684dak6j4m6ekoci0?imageView2/2/w/540/format/jpg/q/75",
"share_title": "@风草 发了一篇超赞的笔记,快点来看!",
"user_name": "gh_66c53d495417",
"path": "pages/main/note/index?xsec_source=app_share&id=698ab064000000001503876d&type=video",
"title": "@风草 发了一篇超赞的笔记,快点来看!"
},
"feedback_info": {
"dislike_status": 0
},
"sticky": false,
"red_envelope_note": false,
"enable_co_produce": false,
"last_update_time": 0,
"share_info": {
"link": "https://www.xiaohongshu.com/discovery/item/698ab064000000001503876d?share_from_user_hidden=true&xsec_source=app_share&type=video&author_share=1",
"title": "国潮才是永恒审美!新年写真我太想进步了",
"is_star": false,
"block_private_msg": false,
"function_entries": [
{
"type": "generate_image"
},
{
"type": "copy_link"
},
{
"type": "heat_for_author"
},
{
"type": "video_speed"
},
{
"type": "dislike"
},
{
"type": "report"
},
{
"type": "video_feedback"
}
],
"wechat_share_desc": "@风草 的笔记\n149人分享",
"content": "和@小羊崽吃了吗 在杭州街拍新年写真,也是第一次尝试这种国潮拍法,拍得特别开心!拍照动作可参考哦!#我是春节主理人",
"image": "http://sns-img-hw.xhscdn.com/1040g00831sd37bs2lk405n684dak6j4m6ekoci0?imageView2/2/w/360/format/jpg/q/75",
"show_wechat_tag": false,
"guide_audited": true
},
"need_product_review": false,
"has_co_produce": false,
"function_switch": [
{
"type": "video_download",
"enable": false,
"reason": "作者已关闭下载权限,无法保存"
}
],
"liked_count": 689,
"desc": "和@小羊崽吃了吗 在杭州街拍新年写真,也是第一次尝试这种国潮拍法,拍得特别开心!拍照动作可参考哦!#我是春节主理人[话题]# #咔嚓一张新年照[话题]# #新年写真[话题]# #国风[话题]# #拍照姿势不重样[话题]#",
"view_count": 0,
"need_next_step": false,
"type": "video",
"seeded": false,
"widgets_context": "{\"video\":true,\"origin_video_key\":\"\",\"flags\":{\"sound_track\":true},\"author_id\":\"5cc823550000000010034c96\",\"author_name\":\"风草\",\"note_sound_info\":{\"sound_id\":\"1146600070351388223\",\"name\":\"风草的原声\",\"desc\":\"@风草创作的原声\",\"duration\":46250,\"url\":\"http://sns-v10.rednotecdn.com/audio/1/02e98ab06689295a010370039c45c11f80_0.wav\",\"use_count\":1,\"subtitle\":\"风草的原声\",\"sound_bg_music_type\":3,\"cover\":\"https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTLfIDOibG8vpB5NLWeXWBJj9SfDCw19v4SGQGNOEA2s3A6vnYicl9jvpa4pmGb8uwoicIALSk5yiaLHDA/132\",\"creator\":\"5cc823550000000010034c96\"},\"q_task_id\":\"\",\"video_rec_bar_info\":\"\"}",
"api_upgrade": -1,
"native_voice_info": {
"name": "风草的原声",
"desc": "@风草创作的原声",
"duration": 46250,
"url": "http://sns-v10.rednotecdn.com/audio/1/02e98ab06689295a010370039c45c11f80_0.wav",
"subtitle": "风草的原声",
"sound_bg_music_type": 3,
"sound_id": "1146600070351388223",
"md5sum": "1f045bc1a69f1c19ed373ec5452d3da5",
"use_count": 1,
"cover": "https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTLfIDOibG8vpB5NLWeXWBJj9SfDCw19v4SGQGNOEA2s3A6vnYicl9jvpa4pmGb8uwoicIALSk5yiaLHDA/132",
"optimize_exp_in_use_count": 0
},
"id": "698ab064000000001503876d",
"ats": [
{
"name": "小羊崽吃了吗",
"nickname": "小羊崽吃了吗",
"show_red_official_verify_icon": false,
"red_official_verified": false,
"level": {
"image": ""
},
"id": "5b100874f7e8b932e02cfc6d",
"followed": false,
"red_official_verify_type": 0,
"track_duration": 0
}
],
"in_censor": false,
"has_related_goods": false,
"cooperate_binds": [],
"title": "国潮才是永恒审美!新年写真我太想进步了",
"collected": false,
"seeded_count": 0,
"share_code_flag": 0,
"countdown": 0,
"model_type": "note",
"comment_prompt_config": {
"placeholder_short": "说点什么...",
"placeholder_long": "爱评论的人运气都不差",
"forbidden_cmt_type": 0
},
"enable_fls_bridge_cards": false,
"may_have_red_packet": false,
"has_music": false,
"text_language_code": "zh"
}
],
"comment_list": [],
"track_id": "",
"model_type": "note"
}
]
}💡 Note: For list data, the example shows only 1-2 items for simplicity. The actual count depends on the API response.
