Skip to content

小红书 API - 笔记详情 (V3)

此接口已过期

此接口已过时,可能会在未来的版本中被移除。请尽快迁移到新版本。

prod-global
GET
/api/xiaohongshu/get-note-detail/v3

获取小红书笔记的详细数据,包括完整的笔记描述、互动指标(点赞、评论、收藏、分享)以及媒体信息。

响应中包含图片和视频的媒体下载链接。

典型使用场景:

  • 使用完整笔记文本进行内容分析与审核
  • 为创作者、营销活动和竞争对手进行互动追踪
  • 收集媒体资源(图片/视频)用于下游处理或归档
  • 构建用于分析、报告和自动化的数据集

请求参数

参数名位置类型必填说明
tokenquerystring此 API 服务的访问令牌。
noteIdquerystring小红书笔记唯一标识符。

代码示例

💡 环境说明

默认示例使用 https://api.justoneapi.com (prod-global)。中国大陆地区建议替换为 http://47.117.133.51:30015 (prod-cn) 以获得更好的访问体验。详见 环境选择

bash
# 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
curl -X GET "https://api.justoneapi.com/api/xiaohongshu/get-note-detail/v3?token=YOUR_API_KEY&noteId=VALUE"
text
我想使用 Just One API 提供的“笔记详情 (V3)”接口。
接口地址: https://api.justoneapi.com/api/xiaohongshu/get-note-detail/v3
HTTP 方法: GET
身份验证: 在 URL 后添加查询参数“?token=您的API密钥”。
OpenAPI 定义: https://docs.justoneapi.com/openapi/xiaohongshu-apis/note-details-v3-zh.json

请求参数说明:
- token (query): 此 API 服务的访问令牌。 (必填)
- noteId (query): 小红书笔记唯一标识符。 (必填)

返回格式: JSON

响应处理与错误码:
1. 需通过返回体中的 "code" 字段判断业务结果(code 为 0 表示成功)。
2. 超时建议:建议将请求超时时间设置为至少 60 秒。
3. 业务码说明:
   - 0: 成功
   - 100: Token 无效或已失效
   - 301: 采集失败,请重试
   - 302: 超出速率限制
   - 303: 超出每日配额
   - 400: 参数错误
   - 500: 内部服务器错误
   - 600: 权限不足
   - 601: 余额不足

请帮我用我擅长的编程语言写一个脚本来调用这个接口,并处理返回结果。
python
# 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
import requests

url = "https://api.justoneapi.com/api/xiaohongshu/get-note-detail/v3?token=YOUR_API_KEY&noteId=VALUE"
response = requests.get(url)
print(response.json())
js
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
const response = await fetch("https://api.justoneapi.com/api/xiaohongshu/get-note-detail/v3?token=YOUR_API_KEY&noteId=VALUE", {
  method: "GET"
});
const data = await response.json();
console.log(data);
java
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 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-note-detail/v3?token=YOUR_API_KEY&noteId=VALUE"))
            .method("GET", HttpRequest.BodyPublishers.noBody())
            .build();

        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}
go
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 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-note-detail/v3?token=YOUR_API_KEY&noteId=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
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.justoneapi.com/api/xiaohongshu/get-note-detail/v3?token=YOUR_API_KEY&noteId=VALUE");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
curl_close($ch);
echo $response;

响应结果

json
{
  "code": 0,
  "data": [
    {
      "model_type": "note",
      "user": {
        "fstatus": "none",
        "name": "搞笑女的肉体改造日记",
        "red_official_verify_type": 0,
        "show_red_official_verify_icon": false,
        "userid": "62642c06000000001000bb40",
        "track_duration": 0,
        "red_official_verified": false,
        "level": {
          "image": ""
        },
        "id": "62642c06000000001000bb40",
        "image": "https://sns-avatar-qc.xhscdn.com/avatar/cd255d0e201935e0d852bd371f18c198.jpg?imageView2/2/w/120/format/jpg",
        "followed": false,
        "red_id": "2947938100",
        "nickname": "搞笑女的肉体改造日记"
      },
      "note_list": [
        {
          "foot_tags": [],
          "ats": [
            {
              "red_official_verified": false,
              "name": "甜润徽派",
              "nickname": "甜润徽派",
              "show_red_official_verify_icon": false,
              "track_duration": 0,
              "level": {
                "image": ""
              },
              "id": "687f08f3000000001b0238e8",
              "followed": false,
              "red_official_verify_type": 0
            }
          ],
          "in_censor": false,
          "cooperate_binds": [],
          "long_press_share_info": {
            "guide_audited": false,
            "content": "",
            "title": "",
            "is_star": false,
            "block_private_msg": false,
            "show_wechat_tag": false,
            "function_entries": [
              {
                "type": "image_download"
              }
            ]
          },
          "privacy": {
            "type": 0,
            "show_tips": false,
            "nick_names": ""
          },
          "co_produce_link": "xhsdiscover://post_new_note?source=%7B%22type%22%3A%22together_post%22%2C%22extraInfo%22%3A%7B%22subType%22%3A%22together_post_halfspace%22%2C%22track_id%22%3A%2269aed373000000001a02a6d8%22%7D%7D&page=%7B%22page_type%22%3A%22image_co_produce_album%22%7D",
          "time": 1773065075,
          "liked_count": 13,
          "comments_count": 2,
          "title": "我家的家常菜隐藏黑马,好吃到封神",
          "desc": "真正的黑马,从来都藏在烟火气里🍚\n没有 fancy 摆盘,不用复杂技巧\n但每一道家常菜都入味、下饭、超治愈\n十几年如一日的稳定发挥\n亲爱的妈妈把平凡三餐做得热气腾腾\n这才是生活里最靠谱的实力派黑马✨\n#骐骥驰聘马跃新春[话题]# #不惧挑战一马当先[话题]#@甜润徽派",
          "liked_users": [],
          "use_water_color": false,
          "mini_program_info": {
            "title": "@搞笑女的肉体改造日记 发了一篇笔记,快点来看吧!",
            "desc": "真正的黑马,从来都藏在烟火气里🍚 没有 fancy 摆盘,不用复杂技巧 但每一道家常菜都入味、下饭、超治愈 十几年如一日",
            "webpage_url": "https://www.xiaohongshu.com/discovery/item/69aed373000000001a02a6d8?xsec_source=app_share",
            "thumb": "http://sns-img-qc.xhscdn.com/1040g2sg31tgde2g468e05oj45g341eq00siuu1o?imageView2/2/w/540/format/jpg/q/75",
            "share_title": "@搞笑女的肉体改造日记 发了一篇笔记,快点来看吧!",
            "user_name": "gh_52be748ce5b7",
            "path": "pages/main/home/index?redirect_path=%2Fpages%2Fmain%2Fnote%2Findex%3Fxsec_source%3Dapp_share%26id%3D69aed373000000001a02a6d8%26type%3Dnormal%26xsec_token%3DCBoLE1Pw-2qFX6psnzQqq7bXl9LoNICSQivHqlOuSXXnI%3D"
          },
          "has_related_goods": false,
          "has_music": false,
          "widgets_context": "{\"origin_video_key\":\"\",\"flags\":{},\"author_id\":\"62642c06000000001000bb40\",\"author_name\":\"搞笑女的肉体改造日记\",\"q_task_id\":\"\",\"video_rec_bar_info\":\"\"}",
          "feedback_info": {
            "dislike_status": 0
          },
          "user": {
            "image": "https://sns-avatar-qc.xhscdn.com/avatar/cd255d0e201935e0d852bd371f18c198.jpg?imageView2/2/w/120/format/jpg",
            "followed": false,
            "nickname": "搞笑女的肉体改造日记",
            "red_official_verify_type": 0,
            "red_official_verified": false,
            "userid": "62642c06000000001000bb40",
            "track_duration": 0,
            "id": "62642c06000000001000bb40",
            "fstatus": "none",
            "red_id": "2947938100",
            "show_red_official_verify_icon": false,
            "level": {
              "image": ""
            },
            "name": "搞笑女的肉体改造日记"
          },
          "seeded_count": 0,
          "head_tags": [],
          "comment_prompt_config": {
            "placeholder_long": "留下你的想法吧",
            "forbidden_cmt_type": 0,
            "placeholder_short": "说点什么..."
          },
          "enable_brand_lottery": false,
          "countdown": 0,
          "text_language_code": "zh",
          "share_code_flag": 0,
          "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"
            ]
          ],
          "enable_co_produce": true,
          "collected_count": 1,
          "view_count": 0,
          "red_envelope_note": false,
          "id": "69aed373000000001a02a6d8",
          "hash_tag": [
            {
              "record_unit": "",
              "current_score": 0,
              "bizId": "",
              "tag_hint": "",
              "name": "骐骥驰聘马跃新春",
              "type": "topic",
              "record_emoji": "",
              "record_count": 0,
              "id": "69abd669000000000402bf80",
              "link": "xhsdiscover://rn/sns-discover/topic/normal?id=69abd669004a000000000002&page_source=note_feed.click_new_big"
            },
            {
              "name": "不惧挑战一马当先",
              "link": "xhsdiscover://rn/sns-discover/topic/normal?id=6964678801e0000000000001&page_source=note_feed.click_new_big",
              "record_emoji": "",
              "record_count": 0,
              "current_score": 0,
              "bizId": "",
              "id": "69646788000000001e003979",
              "type": "topic",
              "record_unit": "",
              "tag_hint": ""
            }
          ],
          "liked": false,
          "need_product_review": false,
          "function_switch": [
            {
              "type": "image_download",
              "enable": true
            }
          ],
          "type": "normal",
          "images_list": [
            {
              "latitude": 0,
              "live_photo": {
                "media": {
                  "video_id": "137833486798426118",
                  "video": {
                    "biz_name": 10,
                    "biz_id": "281948674885068504",
                    "duration": 3,
                    "md5": "",
                    "hdr_type": 0,
                    "drm_type": 0,
                    "stream_types": [
                      66
                    ],
                    "width": 1680,
                    "height": 1934,
                    "bound": [
                      {
                        "x": 0,
                        "y": 0,
                        "w": 1680,
                        "h": 1934
                      }
                    ],
                    "opaque1": {
                      "domestic": "0",
                      "livephoto_flag": "1",
                      "amend_mobile": "40",
                      "amend": "18"
                    }
                  },
                  "stream": {
                    "h264": [],
                    "h265": [
                      {
                        "stream_type": 66,
                        "stream_desc": "livephoto_r256_1080p_66_andr",
                        "default_stream": 1,
                        "format": "mp4",
                        "width": 1080,
                        "height": 1244,
                        "duration": 2021,
                        "size": 521172,
                        "volume": 0,
                        "avg_bitrate": 2063026,
                        "fps": 30,
                        "video_codec": "hevc",
                        "video_bitrate": 2011302,
                        "video_duration": 1999,
                        "audio_codec": "aac",
                        "audio_bitrate": 59223,
                        "audio_duration": 2020,
                        "audio_channels": 2,
                        "rotate": 0,
                        "master_url": "http://sns-v10.rednotecdn.com/stream/1/10/66/01e9aed372c61006010050019cd2ea4c8d_66.mp4",
                        "backup_urls": [
                          "http://sns-v8.rednotecdn.com/stream/1/10/66/01e9aed372c61006010050019cd2ea4c8d_66.mp4"
                        ],
                        "hdr_type": 0,
                        "vmaf": -1,
                        "psnr": 39.45899963378906,
                        "ssim": 0,
                        "weight": 66,
                        "quality_type": "FHD",
                        "token": "",
                        "sr": 0,
                        "opaque1": {
                          "didLoudnorm": "false",
                          "pcdn_supplier": "",
                          "amend": "0",
                          "has_soundtrack": "1",
                          "use_pcdn": "0",
                          "pcdn_302_flag": "false",
                          "device_score": "0"
                        }
                      }
                    ],
                    "h266": [],
                    "av1": []
                  },
                  "user_level": 0
                },
                "image": {
                  "first_frame": ""
                },
                "capa": {
                  "duration": 0,
                  "frame_ts": 0,
                  "is_user_select": false,
                  "is_upload": false,
                  "is_ai_tab": false
                },
                "consumer": {
                  "can_super_resolution": true
                }
              },
              "need_load_original_image": true,
              "origin_img": {
                "size": 0,
                "width": 1884,
                "height": 2168
              },
              "url_multi_level": {
                "low": "https://sns-i10.rednotecdn.com/1040g2sg31tgde2g468e05oj45g341eq00siuu1o?imageView2/2/w/1440/format/heif/q/75&redImage/frame/0&ap=1&sc=DETAIL&sign=30aad161aa2a5d30b0b7ec6a0f3f5a2f&t=69aedd8e&src=A",
                "medium": "https://sns-i10.rednotecdn.com/1040g2sg31tgde2g468e05oj45g341eq00siuu1o?imageView2/2/w/1440/format/heif/q/75&redImage/frame/0&ap=1&sc=DETAIL&sign=30aad161aa2a5d30b0b7ec6a0f3f5a2f&t=69aedd8e&src=A",
                "high": "https://sns-i10.rednotecdn.com/1040g2sg31tgde2g468e05oj45g341eq00siuu1o?imageView2/2/w/1440/format/heif/q/75&redImage/frame/0&ap=1&sc=DETAIL&sign=30aad161aa2a5d30b0b7ec6a0f3f5a2f&t=69aedd8e&src=A"
              },
              "longitude": 0,
              "height": 2168,
              "width": 1884,
              "original": "https://sns-i10.rednotecdn.com/1040g2sg31tgde2g468e05oj45g341eq00siuu1o?imageView2/2/w/5000/h/5000/format/heif/q/56&redImage/frame/0&ap=1&sc=ORIGINAL&sign=30aad161aa2a5d30b0b7ec6a0f3f5a2f&t=69aedd8e&src=A",
              "live_photo_file_id": "livephoto/1040g39031tgde2g75s705oj45g341eq030j8nb0",
              "fileid": "1040g2sg31tgde2g468e05oj45g341eq00siuu1o",
              "index": 0,
              "trace_id": "1040g2sg31tgde2g468e05oj45g341eq00siuu1o",
              "scale_to_large": 4,
              "text_intention": 0,
              "url": "https://sns-i10.rednotecdn.com/1040g2sg31tgde2g468e05oj45g341eq00siuu1o?imageView2/2/w/1440/format/heif/q/45&redImage/frame/0&ap=1&sc=DETAIL&sign=30aad161aa2a5d30b0b7ec6a0f3f5a2f&t=69aedd8e&src=A"
            }
          ],
          "last_update_time": 0,
          "share_info": {
            "block_private_msg": false,
            "function_entries": [
              {
                "type": "generate_image"
              },
              {
                "type": "copy_link"
              },
              {
                "type": "heat_for_author"
              },
              {
                "type": "dislike"
              },
              {
                "type": "report"
              }
            ],
            "guide_audited": true,
            "content": "真正的黑马,从来都藏在烟火气里🍚 没有 fancy 摆盘,不用复杂技巧 但每一道家常菜都入味、下饭、超治愈 十几年如一日",
            "link": "https://www.xiaohongshu.com/discovery/item/69aed373000000001a02a6d8?share_from_user_hidden=true&xsec_source=app_share&type=normal&author_share=1",
            "title": "我家的家常菜隐藏黑马,好吃到封神",
            "is_star": false,
            "image": "http://sns-img-qc.xhscdn.com/1040g2sg31tgde2g468e05oj45g341eq00siuu1o?imageView2/2/w/360/format/jpg/q/75",
            "show_wechat_tag": false,
            "wechat_share_desc": "真正的黑马,从来都藏在烟火气里🍚 没有 fancy 摆盘,不用复杂技巧 但每一道家常菜都入味、下饭、超治愈 十几年如一日"
          },
          "media_save_config": {
            "disable_save": false,
            "disable_watermark": false,
            "disable_weibo_cover": false
          },
          "ip_location": "安徽",
          "collected": false,
          "has_co_produce": false,
          "note_text_press_options": [
            {
              "extra": "",
              "key": "copy"
            }
          ],
          "qq_mini_program_info": {
            "user_name": "gh_66c53d495417",
            "path": "pages/main/note/index?xsec_source=app_share&id=69aed373000000001a02a6d8&type=normal",
            "title": "@搞笑女的肉体改造日记 发了一篇超赞的笔记,快点来看!",
            "desc": "真正的黑马,从来都藏在烟火气里🍚 没有 fancy 摆盘,不用复杂技巧 但每一道家常菜都入味、下饭、超治愈 十几年如一日",
            "webpage_url": "https://www.xiaohongshu.com/discovery/item/69aed373000000001a02a6d8?xsec_source=app_share",
            "thumb": "http://sns-img-qc.xhscdn.com/1040g2sg31tgde2g468e05oj45g341eq00siuu1o?imageView2/2/w/540/format/jpg/q/75",
            "share_title": "@搞笑女的肉体改造日记 发了一篇超赞的笔记,快点来看!"
          },
          "topics": [
            {
              "style": 0,
              "discuss_num": 0,
              "business_type": 0,
              "id": "69abd669000000000402bf80",
              "name": "骐骥驰聘马跃新春",
              "image": "http://ci.xiaohongshu.com/fd75707a-37f8-45ad-b7a7-0feaf36e9cad@r_120w_120h.jpg",
              "link": "xhsdiscover://topic/v2/69abd669004a000000000002?page_source=note_feed.click_new_big",
              "activity_online": false
            }
          ],
          "may_have_red_packet": false,
          "model_type": "note",
          "enable_fls_bridge_cards": false,
          "content_trans_info": {
            "strategy": 10
          },
          "seeded": false,
          "need_next_step": false,
          "goods_info": {},
          "sticky": false,
          "shared_count": 0,
          "api_upgrade": -1,
          "enable_fls_related_cards": false,
          "biz_map": {}
        }
      ],
      "comment_list": [],
      "track_id": ""
    }
  ]
}

💡 提示:为简化展示,列表类数据样例仅保留 1-2 条记录,实际返回条数以接口响应为准。