Healthy Available Limited Mostly unavailable No data
Healthy
Loading health status...
24h trend
30d trend
Retrieves comments for a Xiaohongshu (RedNote) note with cursor pagination and normal, latest, or like-count sorting. Use it to support feedback review, discussion analysis, and comment moderation workflows.
curl --max-time 120 -X GET 'https://api.justoneapi.com/api/xiaohongshu/get-note-comment/v2?token=YOUR_API_KEY¬eId=VALUE'
text
I want to use the "Note Comments (V2)" API from JustOneAPI.Base URL: https://api.justoneapi.com.API Path: /api/xiaohongshu/get-note-comment/v2?token=YOUR_API_KEY¬eId=VALUEAPI Endpoint: BASE_URL + /api/xiaohongshu/get-note-comment/v2?token=YOUR_API_KEY¬eId=VALUEHTTP Method: GETAuthentication: Append the "token" query parameter to the URL.OpenAPI Definition: https://docs.justoneapi.com/openapi/xiaohongshu-rednote/note-comments-v2-en.jsonParameters:- token (query): Access token for this API service. (Required)- noteId (query): A Xiaohongshu note ID or an explore URL containing /explore/. (Required)- lastCursor (query): Pagination cursor from the previous page (use the cursor value returned by the last response).- sort (query): Sort strategy for the result set.Available Values:- `normal`: Normal- `latest`: Latest- `like_count`: Like CountReturn 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 Exceeded4. 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 requestsBASE_URL = "https://api.justoneapi.com" # Provided by OpenAPI serversurl = BASE_URL + "/api/xiaohongshu/get-note-comment/v2?token=YOUR_API_KEY¬eId=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")
Fields returned when the response contains a page of Xiaohongshu note comments.
Field
Type
Description
comments
array
Top-level comments on the returned page.
user_id
string
The Xiaohongshu user ID of the note author.
comment_count
integer
The overall comment count reported by Xiaohongshu for the note.
comment_count_l1
integer
The reported count of top-level comments across the note's pages.
has_more
boolean
Whether the response reports another page of top-level comments.
cursor
string
The top-level comment continuation cursor. When available, pass it unchanged as lastCursor for the same note and sort. It can be empty or absent at the end.
page_context
string
Opaque page context returned by Xiaohongshu.
current_sort_strategy
string
The sort strategy code reported with the response. Its value can differ from the requested sort value.
all_sort_strategies
array
Sort options reported with this page, when returned.
all_sort_strategies[]
object
A sort option reported with this page.
all_sort_strategies[].type
string
The sort option code reported by Xiaohongshu.
all_sort_strategies[].optional_name
string
The primary display label for the sort option.
all_sort_strategies[].suffix_name
string
The supplementary display label for the sort option.
Comment content7 fields
data.comments[]
A top-level comment on the note.
Field
Type
Description
id
string
The unique Xiaohongshu comment ID.
note_id
string
The ID of the note associated with this comment.
content
string
The comment text returned by Xiaohongshu.
time
integer
The comment creation time as a Unix timestamp in seconds.
ip_location
string
The IP location label shown for the comment, when returned.
status
integer
The status code returned for the comment.
comment_type
integer
The platform comment type code.
Comment author9 fields
data.comments[].user
The author of this top-level comment.
Field
Type
Description
userid
string
The Xiaohongshu user ID of this account.
red_id
string
The visible Xiaohongshu account ID, which can be empty.
nickname
string
The display name of this account.
images
string
The profile avatar URL returned for this account.
current_user
string
The platform current-user indicator, returned as a string.
ai_agent
boolean
Whether the platform marks this account as an AI agent.
level
object
Level information returned for this account.
level.image
string
The image returned for the account level.
additional_tags
object
Additional account tag metadata, which can be empty.
Engagement and status11 fields
data.comments[]
Field
Type
Description
like_count
integer
The number of likes reported for the comment.
liked
boolean
Whether the platform marks this comment as liked in the response context.
downvoted
boolean
Whether the platform marks this comment as downvoted in the response context.
collected
boolean
Whether the platform marks this comment as saved in the response context.
hidden
boolean
Whether the platform marks this comment as hidden.
show_type
string
The display type code returned for the comment.
score
integer
The platform-reported comment score.
track_id
string
The trace identifier attached to the comment by Xiaohongshu.
translation_strategy
integer
The platform code for comment translation behavior.
share_strategy
integer
The platform code for comment sharing behavior.
friend_liked_msg
string
The platform message about likes by friends, which can be empty.
Images, topics, and mentions39 fields
data.comments[]
Field
Type
Description
at_users
array
Accounts mentioned in the comment.
at_users[]
object
An account mentioned in the comment.
at_users[].userid
string
The Xiaohongshu user ID of the mentioned account.
at_users[].nickname
string
The display name of the mentioned account.
at_users[].ai_agent
boolean
Whether the platform marks the mentioned account as an AI agent.
at_users[].level
object
Level information for the mentioned account.
at_users[].level.image
string
The image returned for the mentioned account's level.
hash_tags
array
Hashtags associated with the comment, when returned.
hash_tags[]
object
A hashtag associated with the comment.
hash_tags[].name
string
The display name of the hashtag.
hash_tags[].link
string
The link associated with the hashtag.
hash_tags[].type
string
The platform hashtag type code.
hash_tags[].disable_jump
boolean
Whether the platform disables navigation from the hashtag.
show_tags
array
Display tags returned for the comment. The array can be empty.
show_tags_v2
array
Structured display tags returned for the comment.
show_tags_v2[]
object
A structured display tag.
show_tags_v2[].type
string
The platform type code for the tag.
show_tags_v2[].text
string
The display text for the tag.
show_tags_v2[].style_id
string
The display style identifier for the tag.
show_tags_v2[].pos
string
The display position code for the tag.
biz_label
object
Business and rich-text markers for the comment.
biz_label.product_review
boolean
Whether the platform marks this item as a product review.
biz_label.group_invite
string
Group invitation metadata returned as a string.
biz_label.rich_text
string
Rich-text metadata returned as a string.
pictures
array
Image or sticker attachments, when returned.
pictures[]
object
An image or sticker attachment to the comment.
pictures[].file_id
string
The platform file ID of the attachment.
pictures[].url
string
The attachment image URL returned for display.
pictures[].origin_url
string
The original attachment image URL returned by the platform.
pictures[].width
integer
The width value returned for the attachment image.
pictures[].height
integer
The height value returned for the attachment image.
pictures[].box_w
integer
The display box width value returned for the attachment.
pictures[].box_h
integer
The display box height value returned for the attachment.
pictures[].meme_package
object
Metadata for a sticker or meme associated with the attachment.
pictures[].meme_package.meme_id
string
The ID of the sticker or meme, when returned.
pictures[].meme_package.image_url
string
The sticker or meme image URL, when returned.
pictures[].meme_package.width
integer
The width value returned for the sticker or meme.
pictures[].meme_package.height
integer
The height value returned for the sticker or meme.
media_source_type
integer
The platform media source type code for the comment attachment.
Reply list and pagination3 fields
data.comments[]
Field
Type
Description
sub_comment_count
integer
The number of replies reported for this top-level comment.
sub_comment_cursor
string
Optional reply pagination context for this top-level comment. The reply endpoint supplies its own continuation cursor.
sub_comments
array
Replies embedded in the comment page. The list can be partial or empty even when sub_comment_count is positive.
Reply author9 fields
data.comments[].sub_comments[].user
The author of the embedded reply.
Field
Type
Description
userid
string
The Xiaohongshu user ID of this account.
red_id
string
The visible Xiaohongshu account ID, which can be empty.
nickname
string
The display name of this account.
images
string
The profile avatar URL returned for this account.
current_user
string
The platform current-user indicator, returned as a string.
ai_agent
boolean
Whether the platform marks this account as an AI agent.
level
object
Level information returned for this account.
level.image
string
The image returned for the account level.
additional_tags
object
Additional account tag metadata, which can be empty.
Replied-to comment12 fields
data.comments[].sub_comments[].target_comment
Information about the comment that this reply addresses.
Field
Type
Description
id
string
The ID of the addressed comment.
status
integer
The status code returned for the addressed comment.
user
object
The author of the addressed comment.
user.userid
string
The Xiaohongshu user ID of this account.
user.red_id
string
The visible Xiaohongshu account ID, which can be empty.
user.nickname
string
The display name of this account.
user.images
string
The profile avatar URL returned for this account.
user.current_user
string
The platform current-user indicator, returned as a string.
user.ai_agent
boolean
Whether the platform marks this account as an AI agent.
user.level
object
Level information returned for this account.
user.level.image
string
The image returned for the account level.
user.additional_tags
object
Additional account tag metadata, which can be empty.
Reply content and status29 fields
data.comments[].sub_comments[]
A reply embedded under a top-level comment.
Field
Type
Description
id
string
The Xiaohongshu ID of the reply.
note_id
string
The ID of the note associated with this reply.
content
string
The reply text returned by Xiaohongshu.
time
integer
The reply creation time as a Unix timestamp in seconds.
ip_location
string
The IP location label shown for the reply, when returned.
like_count
integer
The number of likes reported for the reply.
liked
boolean
Whether the platform marks the reply as liked in the response context.
downvoted
boolean
Whether the platform marks the reply as downvoted in the response context.
collected
boolean
Whether the platform marks the reply as saved in the response context.
hidden
boolean
Whether the platform marks the reply as hidden.
status
integer
The status code returned for the reply.
comment_type
integer
The platform reply type code.
show_type
string
The display type code returned for the reply.
score
integer
The platform-reported reply score.
translation_strategy
integer
The platform code for reply translation behavior.
share_strategy
integer
The platform code for reply sharing behavior.
friend_liked_msg
string
The platform message about likes by friends, which can be empty.
at_users
array
Accounts mentioned in the reply. The array can be empty.
show_tags
array
Display tags returned for the reply. The array can be empty.
show_tags_v2
array
Structured display tags returned for the reply.
show_tags_v2[]
object
A structured display tag.
show_tags_v2[].type
string
The platform type code for the tag.
show_tags_v2[].text
string
The display text for the tag.
show_tags_v2[].style_id
string
The display style identifier for the tag.
show_tags_v2[].pos
string
The display position code for the tag.
biz_label
object
Business and rich-text markers for the reply.
biz_label.product_review
boolean
Whether the platform marks this item as a product review.
Xiaohongshu (RedNote) Note Comments API (V2)
Retrieves comments for a Xiaohongshu (RedNote) note with cursor pagination and normal, latest, or like-count sorting. Use it to support feedback review, discussion analysis, and comment moderation workflows.
Highlights
Guidance
We recommend using the
latestsort by default. If comments cannot be retrieved for some notes withlatest, try again usingnormal.Parameters
tokenstringnoteIdstringlastCursorstringsortstringlatestAvailable Values:
-
normal: Normal-
latest: Latest-
like_count: Like CountCode Samples
Response Fields
Key fields in a successful response (
code = 0).Comment list and pagination13 fields
dataFields returned when the response contains a page of Xiaohongshu note comments.
commentsarrayuser_idstringcomment_countintegercomment_count_l1integerhas_morebooleancursorstringpage_contextstringcurrent_sort_strategystringall_sort_strategiesarrayall_sort_strategies[]objectall_sort_strategies[].typestringall_sort_strategies[].optional_namestringall_sort_strategies[].suffix_namestringComment content7 fields
data.comments[]A top-level comment on the note.
idstringnote_idstringcontentstringtimeintegerip_locationstringstatusintegercomment_typeintegerComment author9 fields
data.comments[].userThe author of this top-level comment.
useridstringred_idstringnicknamestringimagesstringcurrent_userstringai_agentbooleanlevelobjectlevel.imagestringadditional_tagsobjectEngagement and status11 fields
data.comments[]like_countintegerlikedbooleandownvotedbooleancollectedbooleanhiddenbooleanshow_typestringscoreintegertrack_idstringtranslation_strategyintegershare_strategyintegerfriend_liked_msgstringImages, topics, and mentions39 fields
data.comments[]at_usersarrayat_users[]objectat_users[].useridstringat_users[].nicknamestringat_users[].ai_agentbooleanat_users[].levelobjectat_users[].level.imagestringhash_tagsarrayhash_tags[]objecthash_tags[].namestringhash_tags[].linkstringhash_tags[].typestringhash_tags[].disable_jumpbooleanshow_tagsarrayshow_tags_v2arrayshow_tags_v2[]objectshow_tags_v2[].typestringshow_tags_v2[].textstringshow_tags_v2[].style_idstringshow_tags_v2[].posstringbiz_labelobjectbiz_label.product_reviewbooleanbiz_label.group_invitestringbiz_label.rich_textstringpicturesarraypictures[]objectpictures[].file_idstringpictures[].urlstringpictures[].origin_urlstringpictures[].widthintegerpictures[].heightintegerpictures[].box_wintegerpictures[].box_hintegerpictures[].meme_packageobjectpictures[].meme_package.meme_idstringpictures[].meme_package.image_urlstringpictures[].meme_package.widthintegerpictures[].meme_package.heightintegermedia_source_typeintegerReply list and pagination3 fields
data.comments[]sub_comment_countintegersub_comment_cursorstringsub_commentsarrayReply author9 fields
data.comments[].sub_comments[].userThe author of the embedded reply.
useridstringred_idstringnicknamestringimagesstringcurrent_userstringai_agentbooleanlevelobjectlevel.imagestringadditional_tagsobjectReplied-to comment12 fields
data.comments[].sub_comments[].target_commentInformation about the comment that this reply addresses.
idstringstatusintegeruserobjectuser.useridstringuser.red_idstringuser.nicknamestringuser.imagesstringuser.current_userstringuser.ai_agentbooleanuser.levelobjectuser.level.imagestringuser.additional_tagsobjectReply content and status29 fields
data.comments[].sub_comments[]A reply embedded under a top-level comment.
idstringnote_idstringcontentstringtimeintegerip_locationstringlike_countintegerlikedbooleandownvotedbooleancollectedbooleanhiddenbooleanstatusintegercomment_typeintegershow_typestringscoreintegertranslation_strategyintegershare_strategyintegerfriend_liked_msgstringat_usersarrayshow_tagsarrayshow_tags_v2arrayshow_tags_v2[]objectshow_tags_v2[].typestringshow_tags_v2[].textstringshow_tags_v2[].style_idstringshow_tags_v2[].posstringbiz_labelobjectbiz_label.product_reviewbooleanbiz_label.group_invitestringbiz_label.rich_textstringResponse Example