Skip to content

Xiaohongshu (RedNote) Note Comments API (V4)

GET
/api/xiaohongshu/get-note-comment/v4
API health status
Healthy Available Limited Mostly unavailable No data
Loading health status...

Get Xiaohongshu (RedNote) note Comments data, including comment text, author profiles, and interaction data, for sentiment analysis and community monitoring.

Parameters

NameInTypeRequiredDefaultDescription
tokenquerystringYes-Access token for this API service.
noteIdquerystringYes-Unique note identifier on Xiaohongshu.

Code Samples

bash
curl -X GET "https://api.justoneapi.com/api/xiaohongshu/get-note-comment/v4?token=YOUR_API_KEY&noteId=VALUE"
text
I want to use the "Note Comments (V4)" API from Just One API.
API Endpoint: https://api.justoneapi.com/api/xiaohongshu/get-note-comment/v4
HTTP Method: GET
Authentication: Append "?token=YOUR_API_KEY" to the URL.
OpenAPI Definition: https://docs.justoneapi.com/openapi/xiaohongshu-rednote/note-comments-v4-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-comment/v4?token=YOUR_API_KEY&noteId=VALUE"
response = requests.get(url)
print(response.json())
js
const response = await fetch("https://api.justoneapi.com/api/xiaohongshu/get-note-comment/v4?token=YOUR_API_KEY&noteId=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-comment/v4?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
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	client := &http.Client{}
	url := "https://api.justoneapi.com/api/xiaohongshu/get-note-comment/v4?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
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.justoneapi.com/api/xiaohongshu/get-note-comment/v4?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;

Responses

json
{
  "code": 0,
  "data": {
    "comments": [
      {
        "id": "65c5944c000000001100b84a",
        "track_id": "interaction-service.local",
        "show_tags_v2": [],
        "time": 1707447372,
        "downvoted": false,
        "content": "拉稀没[捂脸R]",
        "at_users": [],
        "score": 0,
        "status": 0,
        "sub_comments": [],
        "show_type": "common",
        "biz_label": {
          "product_review": false,
          "group_invite": "unknown",
          "rich_text": "unknown"
        },
        "translation_strategy": 10,
        "like_count": 1,
        "liked": false,
        "hidden": false,
        "collected": false,
        "share_strategy": 0,
        "show_tags": [],
        "comment_type": 0,
        "friend_liked_msg": "",
        "note_id": "65bf5360000000002c03f684",
        "sub_comment_count": 0,
        "user": {
          "userid": "a53c5dfd23210947ff7cf8d054aac",
          "nickname": "起个名好迷茫",
          "images": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo31r72vt3kga705oc94lak0hnamgue3a8?imageView2/2/w/120/format/jpg",
          "red_id": "8723021558",
          "level": {
            "image": ""
          },
          "additional_tags": {},
          "ai_agent": false,
          "current_user": "false"
        }
      },
      {
        "note_id": "65bf5360000000002c03f684",
        "hidden": false,
        "status": 0,
        "id": "65c4f627000000000803040c",
        "like_count": 60,
        "liked": false,
        "sub_comment_count": 4,
        "sub_comments": [],
        "user": {
          "ai_agent": false,
          "current_user": "false",
          "userid": "a262a8089266416cd4224fd1e820a",
          "nickname": "Stint on",
          "images": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo31re9tolo006g5o387h4gbut7pb65p68?imageView2/2/w/120/format/jpg",
          "red_id": "0905211z",
          "level": {
            "image": ""
          },
          "additional_tags": {}
        },
        "show_tags": [],
        "show_type": "common",
        "at_users": [],
        "downvoted": false,
        "translation_strategy": 10,
        "show_tags_v2": [],
        "biz_label": {
          "product_review": false,
          "group_invite": "unknown",
          "rich_text": "unknown"
        },
        "collected": false,
        "share_strategy": 0,
        "track_id": "interaction-service.local",
        "score": 0,
        "time": 1707406888,
        "comment_type": 0,
        "friend_liked_msg": "",
        "content": "15年巴萨中国行,梅西也是没上,转身去日本就上了。他不是第一次干这事,只是有些人忘了,汶川地震的时候C罗带头捐款100万欧元和球衣拍卖所得,梅西却说地震和足球无关,第二年日本地震,他带头捐300万欧元,3月还来杭州之行……[弱R](看到这个评论就想复制转发,让更多人知道,怪生气的[生气R])"
      },
      {
        "content": "我一直觉得梅西不喜欢中国,不知道是不是我的错觉[doge]",
        "track_id": "interaction-service.local",
        "at_users": [],
        "score": 0,
        "status": 0,
        "sub_comment_count": 0,
        "time": 1707403143,
        "user": {
          "current_user": "false",
          "userid": "a6d0c1469bb3f228b631f29f40bd1",
          "nickname": "狗蛋儿~",
          "images": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo30n92k81qlg004alfk410uoi0hh61pb0?imageView2/2/w/120/format/jpg",
          "red_id": "Lucky_6668",
          "level": {
            "image": ""
          },
          "additional_tags": {},
          "ai_agent": false
        },
        "show_tags_v2": [],
        "biz_label": {
          "product_review": false,
          "group_invite": "unknown",
          "rich_text": "unknown"
        },
        "collected": false,
        "share_strategy": 0,
        "id": "65c4e78700000000110106a1",
        "note_id": "65bf5360000000002c03f684",
        "liked": false,
        "sub_comments": [],
        "show_type": "common",
        "comment_type": 0,
        "friend_liked_msg": "",
        "downvoted": false,
        "like_count": 6,
        "hidden": false,
        "show_tags": [],
        "translation_strategy": 10
      },
      {
        "like_count": 11,
        "liked": false,
        "hidden": false,
        "show_tags": [],
        "show_type": "common",
        "downvoted": false,
        "share_strategy": 0,
        "id": "65c4d68000000000100393ed",
        "content": "",
        "at_users": [],
        "score": 0,
        "sub_comments": [],
        "time": 1707398785,
        "track_id": "interaction-service.local",
        "status": 0,
        "sub_comment_count": 1,
        "comment_type": 2,
        "friend_liked_msg": "",
        "media_source_type": 0,
        "biz_label": {
          "product_review": false,
          "group_invite": "unknown",
          "rich_text": "unknown"
        },
        "collected": false,
        "note_id": "65bf5360000000002c03f684",
        "user": {
          "additional_tags": {},
          "ai_agent": false,
          "current_user": "false",
          "userid": "a32f7f9a0e25924f6247d0a7ba030",
          "nickname": "大侠",
          "images": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo31sk0bld6m2605omcmu70vlpq1ti9lfo?imageView2/2/w/120/format/jpg",
          "red_id": "6222843747",
          "level": {
            "image": ""
          }
        },
        "pictures": [
          {
            "height": 674,
            "url": "https://sns-i10.rednotecdn.com/comment/1040g2h030uttdo1gl46g5omcmu70vlpqs12tcho?imageView2/2/w/360/format/heif/q/46&ap=4&sc=CMT_PRV&sign=9e4730f83196083baaa9ab2b95238b74&t=69aed261&src=A",
            "origin_url": "https://sns-i10.rednotecdn.com/comment/1040g2h030uttdo1gl46g5omcmu70vlpqs12tcho?imageView2/2/w/1280/format/heif/q/45&ap=4&sc=CMT_DTL&sign=9e4730f83196083baaa9ab2b95238b74&t=69aed261&src=A",
            "box_w": 120,
            "box_h": 160,
            "file_id": "",
            "width": 460
          }
        ],
        "show_tags_v2": [],
        "translation_strategy": 10
      },
      {
        "hidden": false,
        "show_tags": [],
        "pictures": [
          {
            "box_h": 160,
            "file_id": "",
            "width": 589,
            "height": 912,
            "url": "https://sns-i10.rednotecdn.com/comment/1040g2h030utt33e6lg4g5omcmu70vlpqo7b4llg?imageView2/2/w/360/format/heif/q/46&ap=4&sc=CMT_PRV&sign=6bfe6f4a225ca15fac2ccb79899b1ded&t=69aed261&src=A",
            "origin_url": "https://sns-i10.rednotecdn.com/comment/1040g2h030utt33e6lg4g5omcmu70vlpqo7b4llg?imageView2/2/w/1280/format/heif/q/45&ap=4&sc=CMT_DTL&sign=6bfe6f4a225ca15fac2ccb79899b1ded&t=69aed261&src=A",
            "box_w": 120
          }
        ],
        "track_id": "interaction-service.local",
        "show_tags_v2": [],
        "sub_comments": [],
        "comment_type": 2,
        "id": "65c4d51a00000000110091b4",
        "note_id": "65bf5360000000002c03f684",
        "content": "",
        "score": 0,
        "status": 0,
        "downvoted": false,
        "collected": false,
        "share_strategy": 0,
        "at_users": [],
        "sub_comment_count": 1,
        "show_type": "common",
        "friend_liked_msg": "",
        "biz_label": {
          "product_review": false,
          "group_invite": "unknown",
          "rich_text": "unknown"
        },
        "translation_strategy": 10,
        "like_count": 7,
        "liked": false,
        "time": 1707398427,
        "user": {
          "level": {
            "image": ""
          },
          "additional_tags": {},
          "ai_agent": false,
          "current_user": "false",
          "userid": "a32f7f9a0e25924f6247d0a7ba030",
          "nickname": "大侠",
          "images": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo31sk0bld6m2605omcmu70vlpq1ti9lfo?imageView2/2/w/120/format/jpg",
          "red_id": "6222843747"
        },
        "media_source_type": 0
      },
      {
        "liked": false,
        "hidden": false,
        "score": 0,
        "track_id": "interaction-service.local",
        "show_tags_v2": [],
        "biz_label": {
          "rich_text": "unknown",
          "product_review": false,
          "group_invite": "unknown"
        },
        "translation_strategy": 10,
        "id": "65c4c1ad000000000803082c",
        "like_count": 16,
        "status": 0,
        "user": {
          "red_id": "264681498",
          "level": {
            "image": ""
          },
          "additional_tags": {},
          "ai_agent": false,
          "current_user": "false",
          "userid": "a4323bced184def6cd1cb2cd2d9ee",
          "nickname": "街溜子的一天",
          "images": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo31nd7raq14u6g4a1kst4quirrpj8b19g?imageView2/2/w/120/format/jpg"
        },
        "time": 1707393453,
        "show_tags": [],
        "show_type": "common",
        "downvoted": false,
        "content": "梅西是用自己的职业生涯做了一个错误的决定,",
        "at_users": [],
        "sub_comment_count": 3,
        "sub_comments": [],
        "collected": false,
        "note_id": "65bf5360000000002c03f684",
        "comment_type": 0,
        "friend_liked_msg": "",
        "share_strategy": 0
      },
      {
        "show_tags_v2": [],
        "downvoted": false,
        "share_strategy": 0,
        "id": "65c4b20a000000000800b8ad",
        "content": "对付这样的人 就是不提他  不理他  让他退钱💰  赔代理费   国家禁止他来中国",
        "like_count": 5,
        "status": 0,
        "comment_type": 0,
        "sub_comment_count": 0,
        "show_tags": [],
        "collected": false,
        "at_users": [],
        "liked": false,
        "biz_label": {
          "rich_text": "unknown",
          "product_review": false,
          "group_invite": "unknown"
        },
        "user": {
          "ai_agent": false,
          "current_user": "false",
          "userid": "afa1e04b3ce57811852fba412d497",
          "nickname": "牛暴包",
          "images": "https://sns-avatar-qc.xhscdn.com/avatar/5b9c6add69fcbb000166e3d5.jpg?imageView2/2/w/120/format/jpg",
          "red_id": "416533180",
          "level": {
            "image": ""
          },
          "additional_tags": {}
        },
        "show_type": "common",
        "track_id": "interaction-service.local",
        "note_id": "65bf5360000000002c03f684",
        "hidden": false,
        "score": 0,
        "sub_comments": [],
        "time": 1707389450,
        "friend_liked_msg": "",
        "translation_strategy": 10
      },
      {
        "sub_comments": [],
        "time": 1707387672,
        "track_id": "interaction-service.local",
        "id": "65c4ab1800000000110083e7",
        "note_id": "65bf5360000000002c03f684",
        "content": "呦西呦西",
        "liked": false,
        "status": 0,
        "biz_label": {
          "group_invite": "unknown",
          "rich_text": "unknown",
          "product_review": false
        },
        "translation_strategy": 10,
        "collected": false,
        "like_count": 0,
        "hidden": false,
        "score": 0,
        "sub_comment_count": 0,
        "downvoted": false,
        "user": {
          "images": "https://sns-avatar-qc.xhscdn.com/avatar/620f3ac7980a4aa39ec6caf9.jpg?imageView2/2/w/120/format/jpg",
          "red_id": "238469326",
          "level": {
            "image": ""
          },
          "additional_tags": {},
          "ai_agent": false,
          "current_user": "false",
          "userid": "af5744dd843327b4745823910988c",
          "nickname": "Sui3ied"
        },
        "show_tags": [],
        "comment_type": 0,
        "show_tags_v2": [],
        "share_strategy": 0,
        "at_users": [],
        "show_type": "common",
        "friend_liked_msg": ""
      },
      {
        "comment_type": 0,
        "friend_liked_msg": "",
        "hidden": false,
        "status": 0,
        "show_type": "common",
        "show_tags_v2": [],
        "biz_label": {
          "rich_text": "unknown",
          "product_review": false,
          "group_invite": "unknown"
        },
        "translation_strategy": 10,
        "downvoted": false,
        "at_users": [],
        "sub_comments": [],
        "time": 1707382507,
        "track_id": "interaction-service.local",
        "collected": false,
        "note_id": "65bf5360000000002c03f684",
        "score": 0,
        "show_tags": [],
        "liked": false,
        "sub_comment_count": 2,
        "user": {
          "level": {
            "image": ""
          },
          "additional_tags": {},
          "ai_agent": false,
          "current_user": "false",
          "userid": "a3f109520f013700700b062a9b83c",
          "nickname": "MingD",
          "images": "https://sns-avatar-qc.xhscdn.com/avatar/5fbf34ce0000000001005c2c.jpg?imageView2/2/w/120/format/jpg",
          "red_id": "1036087863"
        },
        "share_strategy": 0,
        "id": "65c496eb000000001100ab45",
        "content": "哈哈哈哈梅桑,故乡的樱花🌸开了..",
        "like_count": 48
      },
      {
        "hidden": false,
        "score": 0,
        "sub_comments": [],
        "show_tags": [],
        "friend_liked_msg": "",
        "show_tags_v2": [],
        "like_count": 3,
        "liked": false,
        "biz_label": {
          "product_review": false,
          "group_invite": "unknown",
          "rich_text": "unknown"
        },
        "collected": false,
        "share_strategy": 0,
        "content": "真爱梅西就要为梅西着想",
        "status": 0,
        "id": "65c485070000000008014f80",
        "note_id": "65bf5360000000002c03f684",
        "time": 1707377927,
        "user": {
          "userid": "a44acbc3d509676dc1bc67531503d",
          "nickname": "禾悦晓院",
          "images": "https://sns-avatar-qc.xhscdn.com/avatar/7121a416be8e543266fd62c1cc9d575e.jpg?imageView2/2/w/120/format/jpg",
          "red_id": "785553734",
          "level": {
            "image": ""
          },
          "additional_tags": {},
          "ai_agent": false,
          "current_user": "false"
        },
        "show_type": "common",
        "comment_type": 0,
        "track_id": "interaction-service.local",
        "translation_strategy": 10,
        "at_users": [],
        "sub_comment_count": 4,
        "downvoted": false
      }
    ],
    "has_more": true,
    "cursor": "{\"cursor\":\"65c485070000000008014f80\",\"index\":2,\"pageArea\":\"UNFOLDED\"}",
    "all_sort_strategies": [],
    "current_sort_strategy": "latest_v2",
    "user_id": "61e0f15300000000210253a5",
    "comment_count": 944,
    "comment_count_l1": 801
  }
}

💡 Note: For list data, the example shows only 1-2 items for simplicity. The actual count depends on the API response.