Skip to content

Xiaohongshu (RedNote) User Notes API (V4) ​

GET
API health status
Healthy Available Limited Mostly unavailable No data
Loading health status...

Reads a user's published public Xiaohongshu (RedNote) notes by user ID or supported profile URL, with lastCursor pagination. This endpoint does not create, upload or publish notes.

Parameters ​

NameInTypeRequiredDefaultDescription
tokenquerystringYes-Access token for this API service.
userIdquerystringYes-A Xiaohongshu user ID or a profile URL containing /user/profile/.
lastCursorquerystringNo-Omit on the first request. For the next page, pass the last note's cursor value from the previous response.

Code Samples ​

bash
curl --max-time 120 -X GET 'https://api.justoneapi.com/api/xiaohongshu/get-user-note-list/v4?token=YOUR_API_KEY&userId=VALUE'
text
I want to use the "User Notes (V4)" API from JustOneAPI.
Base URL: https://api.justoneapi.com.
API Path: /api/xiaohongshu/get-user-note-list/v4?token=YOUR_API_KEY&userId=VALUE
API Endpoint: BASE_URL + /api/xiaohongshu/get-user-note-list/v4?token=YOUR_API_KEY&userId=VALUE
HTTP Method: GET
Authentication: Append the "token" query parameter to the URL.
OpenAPI Definition: https://docs.justoneapi.com/openapi/xiaohongshu-rednote/user-published-notes-v4-en.json

Parameters:
- token (query): Access token for this API service. (Required)
- userId (query): A Xiaohongshu user ID or a profile URL containing /user/profile/. (Required)
- lastCursor (query): Omit on the first request. For the next page, pass the last note's cursor value from the previous response.

Return format: safely handle JSON or text according to the actual Content-Type.

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 the request timeout to 120 seconds. If 120 seconds is too long for your use case, use at least 60 seconds, but a small number of requests may time out before receiving a result.
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
   - 602: Token Budget Exceeded
4. Code 601 means the shared account balance is insufficient. Code 602 means the current API token's own cumulative budget limit has been reached. Token budget limits do not transfer funds out of the shared account balance.

Please help me write a script in my preferred programming language to call this API and handle the response.
python
import requests

BASE_URL = "https://api.justoneapi.com"  # Provided by OpenAPI servers

url = BASE_URL + "/api/xiaohongshu/get-user-note-list/v4?token=YOUR_API_KEY&userId=VALUE"
response = requests.get(url, timeout=120)
print(response.status_code)
if response.content:
    content_type = response.headers.get("content-type", "").lower()
    if "json" in content_type:
        try:
            print(response.json())
        except ValueError:
            print(response.text)
    elif content_type.startswith("text/") or "xml" in content_type or content_type.split(";", 1)[0].strip() in {"application/javascript", "application/x-www-form-urlencoded", "application/graphql"}:
        print(response.text)
    else:
        with open("response.bin", "wb") as output:
            output.write(response.content)
        print(f"Saved {len(response.content)} bytes to response.bin")
js
const BASE_URL = "https://api.justoneapi.com"; // Provided by OpenAPI servers
const url = BASE_URL + "/api/xiaohongshu/get-user-note-list/v4?token=YOUR_API_KEY&userId=VALUE";

const response = await fetch(url, {
  method: "GET",
  signal: AbortSignal.timeout(120000)
});
console.log(response.status);
const responseBytes = await response.arrayBuffer();
if (responseBytes.byteLength) {
  const contentType = (response.headers.get("content-type") || "").toLowerCase();
  const mediaType = contentType.split(";", 1)[0].trim();
  const textual = contentType.startsWith("text/") || contentType.includes("json") || contentType.includes("xml") || ["application/javascript", "application/x-www-form-urlencoded", "application/graphql"].includes(mediaType);
  if (textual) {
    const responseText = new TextDecoder().decode(responseBytes);
    let data = responseText;
    if (contentType.includes("json")) {
      try { data = JSON.parse(responseText); } catch { /* Keep the raw body. */ }
    }
    console.log(data);
  } else {
    console.log(`Received ${responseBytes.byteLength} binary bytes`);
  }
}
java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;

public class Main {
    public static void main(String[] args) throws Exception {
        final String BASE_URL = "https://api.justoneapi.com"; // Provided by OpenAPI servers
        final String url = BASE_URL + "/api/xiaohongshu/get-user-note-list/v4?token=YOUR_API_KEY&userId=VALUE";

        HttpClient client = HttpClient.newBuilder().connectTimeout(Duration.ofSeconds(120)).build();
        HttpRequest.Builder builder = HttpRequest.newBuilder()
            .uri(URI.create(url))
            .timeout(Duration.ofSeconds(120))
            .method("GET", HttpRequest.BodyPublishers.noBody());

        HttpRequest request = builder.build();

        HttpResponse<byte[]> response = client.send(request, HttpResponse.BodyHandlers.ofByteArray());
        System.out.println(response.statusCode());
        String contentType = response.headers().firstValue("content-type").orElse("").toLowerCase();
        String mediaType = contentType.split(";", 2)[0].trim();
        if (contentType.startsWith("text/") || contentType.contains("json") || contentType.contains("xml") || mediaType.equals("application/javascript") || mediaType.equals("application/x-www-form-urlencoded") || mediaType.equals("application/graphql")) {
            System.out.println(new String(response.body(), StandardCharsets.UTF_8));
        } else {
            Files.write(Path.of("response.bin"), response.body());
            System.out.println("Saved " + response.body().length + " bytes to response.bin");
        }
    }
}
go
package main

import (
	"fmt"
	"io"
	"os"
	"strings"
	"net/http"
	"time"
)

const BASE_URL = "https://api.justoneapi.com" // Provided by OpenAPI servers

func main() {
	client := &http.Client{Timeout: 120 * time.Second}
	url := BASE_URL + "/api/xiaohongshu/get-user-note-list/v4?token=YOUR_API_KEY&userId=VALUE"
	req, _ := http.NewRequest("GET", url, nil)
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	fmt.Println(resp.StatusCode)
	bodyBytes, _ := io.ReadAll(resp.Body)
	contentType := strings.ToLower(resp.Header.Get("Content-Type"))
	mediaType := strings.TrimSpace(strings.SplitN(contentType, ";", 2)[0])
	if strings.HasPrefix(contentType, "text/") || strings.Contains(contentType, "json") || strings.Contains(contentType, "xml") || mediaType == "application/javascript" || mediaType == "application/x-www-form-urlencoded" || mediaType == "application/graphql" {
		fmt.Println(string(bodyBytes))
	} else {
		os.WriteFile("response.bin", bodyBytes, 0600)
		fmt.Printf("Saved %d bytes to response.bin\n", len(bodyBytes))
	}
}
php
<?php
$BASE_URL = 'https://api.justoneapi.com'; // Provided by OpenAPI servers
$url = $BASE_URL . '/api/xiaohongshu/get-user-note-list/v4?token=YOUR_API_KEY&userId=VALUE';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
$contentType = strtolower((string) curl_getinfo($ch, CURLINFO_CONTENT_TYPE));
curl_close($ch);
echo $status . PHP_EOL;
$mediaType = trim(explode(';', $contentType, 2)[0]);
if (str_starts_with($contentType, 'text/') || str_contains($contentType, 'json') || str_contains($contentType, 'xml') || in_array($mediaType, ['application/javascript', 'application/x-www-form-urlencoded', 'application/graphql'], true)) {
    echo $response;
} else {
    file_put_contents('response.bin', $response);
    echo 'Saved ' . strlen($response) . ' bytes to response.bin' . PHP_EOL;
}

Response Fields ​

Key fields in a successful response (code = 0).

Note list and pagination4 fields

data

Published notes and pagination fields when the successful payload is an object.

FieldTypeDescription
has_morebooleanWhether more notes are available. Stop paginating when this is false.
cursorstringOptional page-level cursor. When has_more is true, pass the final note’s cursor as lastCursor.
notesarrayPublicly published notes returned for the requested profile. This list can be empty at the end of pagination.
tagsarrayPage-level tag list when returned. It may be empty.
Note information12 fields

data.notes[]

One published note in the current page.

FieldTypeDescription
idstringXiaohongshu note ID.
cursorstringPer-note cursor. Use the cursor from the final note as lastCursor when has_more is true.
display_titlestringTitle supplied for display in the list.
titlestringNote title reported by Xiaohongshu.
descstringText or description returned for the note.
typestringNote type reported by Xiaohongshu. Observed values include normal for image notes and video for video notes.
stickybooleanWhether Xiaohongshu marks the note as pinned.
is_goods_notebooleanWhether Xiaohongshu identifies the note as a product note.
create_timeintegerNote creation time as a Unix timestamp in seconds.
last_update_timeintegerLast updated time as a Unix timestamp in seconds. It can be zero.
time_descstringDate display text returned for the note.
ip_locationstringRegion label returned for the note when available.
Engagement4 fields

data.notes[]

FieldTypeDescription
likesintegerLike count returned in the likes field.
comments_countintegerNumber of comments reported for the note.
collected_countintegerNumber of saves reported for the note.
share_countintegerNumber of shares reported for the note.
Author and mentions10 fields

data.notes[]

FieldTypeDescription
userobjectAuthor information returned with the note.
user.useridstringXiaohongshu account ID of the note author.
user.nicknamestringAuthor’s displayed nickname.
user.imagesstringAuthor’s avatar image URL.
user.red_official_verify_typeintegerOfficial verification category code reported for the author.
atsarrayAccounts mentioned in the note.
ats[]objectAn account mentioned in the note.
ats[].idstringXiaohongshu account ID of the mentioned user.
ats[].namestringName returned for the mentioned account.
ats[].nicknamestringNickname returned for the mentioned account.
Live Photos37 fields

data.notes[].images_list[].live_photo

Live Photo metadata returned for the image when available.

FieldTypeDescription
mediaobjectPlayback metadata supplied for the Live Photo.
media.video_idstringVideo ID reported for the Live Photo media.
media.videoobjectVideo metadata associated with the Live Photo.
media.video.widthintegerVideo width in pixels.
media.video.heightintegerVideo height in pixels.
media.video.durationintegerVideo duration reported in whole seconds.
media.video.drm_typeintegerRaw DRM category code reported for the video.
media.video.hdr_typeintegerRaw HDR category code reported for the video.
media.video.stream_typesarrayStream type codes reported for the video.
media.video.stream_types[]integerRaw stream type code reported for the video.
media.streamobjectStream variants grouped by the codec labels returned by Xiaohongshu.
media.stream.h264arrayH.264 streams returned for the Live Photo.
media.stream.h265arrayH.265 streams returned for the Live Photo.
media.stream.h265[]objectMetadata for one H.265 Live Photo stream.
media.stream.h265[].master_urlstringPrimary URL supplied for this stream.
media.stream.h265[].backup_urlsarrayAlternate URLs supplied for the stream.
media.stream.h265[].backup_urls[]stringAlternate stream URL.
media.stream.h265[].widthintegerStream width in pixels.
media.stream.h265[].heightintegerStream height in pixels.
media.stream.h265[].fpsintegerFrame rate reported for the video, in frames per second.
media.stream.h265[].formatstringMedia format reported for the stream.
media.stream.h265[].video_codecstringVideo codec reported for the stream.
media.stream.h265[].audio_codecstringAudio codec reported for the stream. It may be empty.
media.stream.h265[].audio_channelsintegerNumber of audio channels reported for the stream.
media.stream.h265[].avg_bitrateintegerAverage stream bitrate in bits per second.
media.stream.h265[].video_bitrateintegerBitrate reported for the video track, in bits per second.
media.stream.h265[].audio_bitrateintegerBitrate reported for the audio track, in bits per second.
media.stream.h265[].quality_typestringRaw quality label reported for the stream.
media.stream.h265[].stream_descstringDescription supplied by Xiaohongshu for the stream.
media.stream.h265[].durationintegerTotal stream duration in milliseconds.
media.stream.h265[].video_durationintegerDuration of the video track in milliseconds.
media.stream.h265[].audio_durationintegerDuration of the audio track in milliseconds. Zero can indicate that there is no audio track.
media.stream.h265[].sizeintegerStream file size in bytes.
media.stream.h266arrayH.266 stream list returned by Xiaohongshu. It may be empty.
media.stream.av1arrayAV1 stream list returned by Xiaohongshu. It may be empty.
consumerobjectPlayback options reported for the Live Photo.
consumer.can_super_resolutionbooleanWhether playback metadata reports support for super-resolution.
Images7 fields

data.notes[].images_list[]

FieldTypeDescription
urlstringImage URL when populated. The large-size image URL can be present even when this field is empty.
originalstringOriginal-image URL field. It may be empty.
widthintegerImage width recorded in the metadata, in pixels.
heightintegerImage height recorded in the metadata, in pixels.
fileidstringPlatform file identifier for the image.
url_size_largestringURL supplied for the large-size image variant.
live_photo_file_idstringFile ID reported for the image’s Live Photo.
Video streams44 fields

data.notes[].video_info_v2.media.stream

Stream variants grouped by the codec labels returned by Xiaohongshu.

FieldTypeDescription
h264arrayH.264 streams returned for the video note.
h264[]objectMetadata for one H.264 video stream.
h264[].master_urlstringPrimary URL supplied for this stream.
h264[].backup_urlsarrayAlternate URLs supplied for the stream.
h264[].backup_urls[]stringAlternate stream URL.
h264[].widthintegerStream width in pixels.
h264[].heightintegerStream height in pixels.
h264[].fpsintegerFrame rate reported for the video, in frames per second.
h264[].formatstringMedia format reported for the stream.
h264[].video_codecstringVideo codec reported for the stream.
h264[].audio_codecstringAudio codec reported for the stream. It may be empty.
h264[].audio_channelsintegerNumber of audio channels reported for the stream.
h264[].avg_bitrateintegerAverage stream bitrate in bits per second.
h264[].video_bitrateintegerBitrate reported for the video track, in bits per second.
h264[].audio_bitrateintegerBitrate reported for the audio track, in bits per second.
h264[].quality_typestringRaw quality label reported for the stream.
h264[].stream_descstringDescription supplied by Xiaohongshu for the stream.
h264[].durationintegerTotal stream duration in milliseconds.
h264[].video_durationintegerDuration of the video track in milliseconds.
h264[].audio_durationintegerDuration of the audio track in milliseconds. Zero can indicate that there is no audio track.
h264[].sizeintegerStream file size in bytes.
h265arrayH.265 streams returned for the video note.
h265[]objectMetadata for one H.265 video stream.
h265[].master_urlstringPrimary URL supplied for this stream.
h265[].backup_urlsarrayAlternate URLs supplied for the stream.
h265[].backup_urls[]stringAlternate stream URL.
h265[].widthintegerStream width in pixels.
h265[].heightintegerStream height in pixels.
h265[].fpsintegerFrame rate reported for the video, in frames per second.
h265[].formatstringMedia format reported for the stream.
h265[].video_codecstringVideo codec reported for the stream.
h265[].audio_codecstringAudio codec reported for the stream. It may be empty.
h265[].audio_channelsintegerNumber of audio channels reported for the stream.
h265[].avg_bitrateintegerAverage stream bitrate in bits per second.
h265[].video_bitrateintegerBitrate reported for the video track, in bits per second.
h265[].audio_bitrateintegerBitrate reported for the audio track, in bits per second.
h265[].quality_typestringRaw quality label reported for the stream.
h265[].stream_descstringDescription supplied by Xiaohongshu for the stream.
h265[].durationintegerTotal stream duration in milliseconds.
h265[].video_durationintegerDuration of the video track in milliseconds.
h265[].audio_durationintegerDuration of the audio track in milliseconds. Zero can indicate that there is no audio track.
h265[].sizeintegerStream file size in bytes.
h266arrayH.266 stream list returned by Xiaohongshu. It may be empty.
av1arrayAV1 stream list returned by Xiaohongshu. It may be empty.
Audio16 fields

data.notes[].video_info_v2.media

FieldTypeDescription
audio_streamobjectAudio streams grouped by codec when returned.
audio_stream.AACarrayAAC audio stream entries when returned.
audio_stream.AAC[]objectMetadata for one AAC audio stream.
audio_stream.AAC[].audio_codecstringAudio codec label.
audio_stream.AAC[].audio_channelsintegerNumber of channels in the audio stream.
audio_stream.AAC[].master_urlstringPrimary URL for the audio stream.
audio_stream.AAC[].backup_urlsarrayAlternative URLs for the audio stream.
audio_stream.AAC[].backup_urls[]stringAlternative stream URL.
audio_stream.AAC[].formatstringContainer format reported for the audio stream.
audio_stream.AAC[].audio_bitrateintegerBitrate reported for the audio track, in bits per second.
audio_stream.AAC[].audio_samplerateintegerAudio sample rate reported for the track.
audio_stream.AAC[].audio_durationintegerAudio track duration in milliseconds.
audio_stream.AAC[].sizeintegerAudio stream file size in bytes.
audio_infoobjectMetadata reported for available audio stream types.
audio_info.stream_typesarrayAudio stream type codes.
audio_info.stream_types[]integerA raw audio stream type code.
Subtitles18 fields

data.notes[].video_info_v2.media.video.subtitles

Subtitle tracks grouped by the language keys present in the response.

FieldTypeDescription
sourcearraySource-language subtitle tracks.
source[]objectOne subtitle track returned for the language.
source[].languagestringLanguage label returned for the subtitle track.
source[].urlstringURL of the subtitle track.
source[].formatintegerRaw subtitle format code.
source[].typeintegerRaw subtitle type code.
zh-CNarraySimplified Chinese subtitle tracks when available.
zh-CN[]objectOne subtitle track returned for the language.
zh-CN[].languagestringLanguage label returned for the subtitle track.
zh-CN[].urlstringURL of the subtitle track.
zh-CN[].formatintegerRaw subtitle format code.
zh-CN[].typeintegerRaw subtitle type code.
en-USarrayU.S. English subtitle tracks when available.
en-US[]objectOne subtitle track returned for the language.
en-US[].languagestringLanguage label returned for the subtitle track.
en-US[].urlstringURL of the subtitle track.
en-US[].formatintegerRaw subtitle format code.
en-US[].typeintegerRaw subtitle type code.
Video19 fields

data.notes[].video_info_v2

Media information returned for some video notes.

FieldTypeDescription
imageobjectImages associated with the video.
image.thumbnailstringVideo thumbnail URL, when available.
image.first_framestringURL for the first frame of the video, when available.
image.thumbnail_dimstringAdditional thumbnail URL supplied for the video.
mediaobjectVideo and playback stream metadata for the note.
media.videoobjectVideo metadata associated with the video note.
media.video.widthintegerVideo width in pixels.
media.video.heightintegerVideo height in pixels.
media.video.durationintegerVideo duration reported in whole seconds.
media.video.drm_typeintegerRaw DRM category code reported for the video.
media.video.hdr_typeintegerRaw HDR category code reported for the video.
media.video.stream_typesarrayStream type codes reported for the video.
media.video.stream_types[]integerRaw stream type code reported for the video.
media.video.md5stringMD5 value reported in the video metadata.
media.video_idstringVideo ID reported for this note’s media.
capaobjectAdditional metadata for the video.
capa.durationintegerVideo duration from this metadata, in seconds.
consumerobjectPlayback options reported for the video.
consumer.can_super_resolutionbooleanWhether playback metadata reports support for super-resolution.
Other fields2 fields
Field pathTypeDescription
data.notes[].images_listarrayImages associated with the note, which may include cover images for video notes.
data.notes[].images_list[]objectAn image associated with the note.

Response Example ​

Loading the response example...