Xiaohongshu (RedNote) Note Search API (V2)
API health status
Healthy Available Limited Mostly unavailable No data
Loading health status...
Get Xiaohongshu (RedNote) note Search data, including snippets, authors, and media, for topic discovery.
Parameters
| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
token | query | string | Yes | - | Access token for this API service. |
keyword | query | string | Yes | - | Search keyword. |
page | query | integer | No | 1 | Page number for pagination. |
sort | query | string | No | general | Sort order for the result set. Available Values: - general: General- popularity_descending: Popularity Descending- time_descending: Time Descending- comment_descending: Comment Descending- collect_descending: Collect Descending |
noteType | query | string | No | _0 | Note type filter. Available Values: - _0: General- _1: Video- _2: Normal |
noteTime | query | string | No | - | Note publish time filter. Available Values: - 一天内: Within one day- 一周内: Within a week- 半年内: Within half a year |
Code Samples
bash
curl -X GET "https://api.justoneapi.com/api/xiaohongshu/search-note/v2?token=YOUR_API_KEY&keyword=VALUE"text
I want to use the "Note Search (V2)" API from Just One API.
API Endpoint: https://api.justoneapi.com/api/xiaohongshu/search-note/v2
HTTP Method: GET
Authentication: Append "?token=YOUR_API_KEY" to the URL.
OpenAPI Definition: https://docs.justoneapi.com/openapi/xiaohongshu-rednote/note-search-v2-en.json
Parameters:
- token (query): Access token for this API service. (Required)
- keyword (query): Search keyword. (Required)
- page (query): Page number for pagination.
- sort (query): Sort order for the result set.
Available Values:
- `general`: General
- `popularity_descending`: Popularity Descending
- `time_descending`: Time Descending
- `comment_descending`: Comment Descending
- `collect_descending`: Collect Descending
- noteType (query): Note type filter.
Available Values:
- `_0`: General
- `_1`: Video
- `_2`: Normal
- noteTime (query): Note publish time filter.
Available Values:
- `一天内`: Within one day
- `一周内`: Within a week
- `半年内`: Within half a year
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/search-note/v2?token=YOUR_API_KEY&keyword=VALUE"
response = requests.get(url)
print(response.json())js
const response = await fetch("https://api.justoneapi.com/api/xiaohongshu/search-note/v2?token=YOUR_API_KEY&keyword=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/search-note/v2?token=YOUR_API_KEY&keyword=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/search-note/v2?token=YOUR_API_KEY&keyword=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/search-note/v2?token=YOUR_API_KEY&keyword=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": {
"items": [
{
"model_type": "note",
"note": {
"extract_text_enabled": 0,
"nice_count": 0,
"update_time": 1772963261000,
"xsec_token": "YBtw6gvZIq7-ULy_Lt2R72ZheGwXy_ackAgZ_tUQf29go=",
"interaction_area": {
"text": "15",
"type": 1,
"status": false
},
"result_from": "",
"type": "normal",
"last_update_time": 0,
"geo_info": {
"distance": ""
},
"niced": false,
"liked_count": 15,
"corner_tag_info": [
{
"location": -1,
"type": "ubt_sig_token",
"icon": "",
"text": "RAEKW4jTGbEtq0o0SM0BLG9Bqwn5t0uW/U5en9Ay3eOLTeRj09CE7PPMHORYNYaqNzAHnF908P1/UXS1oKWOz0EDuSfTJgash8",
"text_en": "",
"style": 0
}
],
"collected": false,
"collected_count": 9,
"timestamp": 1772861202,
"user": {
"followed": false,
"red_official_verify_type": 0,
"track_duration": 0,
"show_red_official_verify_icon": false,
"red_official_verified": false,
"userid": "6276a4d10000000021026c1f",
"red_id": "1527435277",
"nickname": "郑州卖海信电视容声冰箱团购处",
"images": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo31gf10nru3s0g5ojmkj8ocr0v47fj5ro?imageView2/2/w/80/f..."
},
"has_music": false,
"desc": "#海信洗衣机 这是海信全家筒·棉花糖U7S,一款全球首创的6合1热泵洗护站,主打“衣鞋同净、分区健康洗护”。 核心亮点",
"tag_info": {
"title": "",
"type": ""
},
"cover_image_index": 0,
"advanced_widgets_groups": {
"groups": [
{
"mode": 1,
"fetch_types": [
"guos_test"
]
}
]
},
"id": "69abb712000000001600a32a",
"images_list": [
{
"need_load_original_image": false,
"fileid": "notes_uhdr/1040g3qg31tdcat495m005ojmkj8ocr0v9fjbf2g",
"height": 5712,
"width": 4284,
"url": "https://sns-na-i8-a.xhscdn.com/notes_uhdr/1040g3qg31tdcat495m005ojmkj8ocr0v9fjbf2g?imageView2/2/w/60...",
"url_size_large": "https://sns-na-i8-a.xhscdn.com/notes_uhdr/1040g3qg31tdcat495m005ojmkj8ocr0v9fjbf2g?imageView2/2/w/14...",
"original": "",
"trace_id": "notes_uhdr/1040g3qg31tdcat495m005ojmkj8ocr0v9fjbf2g"
}
],
"debug_info_str": "",
"widgets_context": "{\"flags\":{},\"author_id\":\"6276a4d10000000021026c1f\",\"author_name\":\"郑州卖海信电视容声冰箱团购处\"}",
"liked": false,
"shared_count": 14,
"comments_count": 25,
"note_attributes": []
}
}
],
"query_type": 0,
"query_intent": {
"goodsIntent": 3,
"search_ask_intent": true,
"low_supply_intent": false
},
"service_status": "{\"filter\":\"not_required\",\"note\":\"success\",\"onebox\":\"not_required\",\"cost\":{\"all\":700,\"zone\":\"rcsh1\"}}",
"strategy_info": {
"query_can_guide_to_feed": true,
"query_average_impression_count": 19
},
"dqa_authorized_user_by_shared": false,
"show_single_col": false,
"search_request_id": "ff0597830871a638",
"ai_mode_enable": false,
"cur_cut_number": 0,
"query_debug_info": {
"is_forbidden": false
},
"is_broad_query": true,
"search_pull_down_opt_exp": 1,
"request_dqa_instant": true,
"search_dqa_new_page_exp": 1,
"dqa_instant_sid": "mGb86N4g1J",
"can_cut": false,
"request_dqa": 0
}
}💡 Note: For list data, the example shows only 1-2 items for simplicity. The actual count depends on the API response.
