cursorstring
Pagination cursor, leave empty for first request, pass last note_id from previous page for next page
https://api.sandbase.ai/v1/api/xiaohongshu/app-v2/user-faved-notesReturns a paginated list of notes favorited by a specified Xiaohongshu (RED) user. Supports querying by user ID or profile share link, with cursor-based pagination.
[
{
"data": {
"code": 0,
"data": {
"fallback": false,
"has_more": false,
"need_clean": false,
"notes": []
},
"debug_id": "d464f235",
"debug_info": "gAAAAABqvfBdoLFjxv0cHdzupzatA2RbAAAK7CIBFQeMTFKT6LYY3FWhWOnXsmYg0nXiesrL0F2jIb0vMI5G8U-vrVHWcVFfHXf_6KH5sZXmA93oBJfZ3OF-exiqsbKkT8REm3DJrhTjtUlU0EWguH2yR_Vlyjc3NL5Ql1db6z5lDMA3uaMZHVQg8vtb3CxYw0FXQiinTTbGdn5VJ0bccmh4ekU_WmbcYaas9Vn4PTi0iYLGSBsgFVq-BbrfDeNjDnQJkltGEcXUkqcJCxOT6Csm_5GNHWDC0j2uBAgqTctKXh9rl14MBR0lEqbQr3o9_NwLELS81amtZnGFIkkzk1bGJ85CSmyaZzN3eOdEzRZh8z9qkwt6Hofta7_4GZn8PWaMgoAGJWsSX9ZNNsw28gSry8uxWE-7u30sHjkriKDENJJ56PPIEhp3rTceY1zseTUOaLAQBGFF",
"msg": "成功",
"success": true
}
}
]選擇一個範例,將其輸入與結果載入 playground。
Returns a page of notes that a Xiaohongshu (RED) user has favorited. Each note includes its title, text, images, engagement counts, author, and video details when the note is a video. Pass either user_id or a profile share link in share_text.
xsec_token values of favorited notes, then fetch full details for each one.likes and collected_count across a user's favorites to see which kinds of posts draw saves.curl -X POST "https://api.sandbase.ai/v1/api/xiaohongshu/app-v2/user-faved-notes" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"user_id": "5a8cf39111be10466d285d6b", "share_text": "https://xhslink.com/a/EZ4M9TwMA6c3"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
cursor | string | No | Pagination cursor, leave empty for first request, pass last note_id from previous page for next page |
share_text | string | No | Xiaohongshu sharing link (support APP and Web sharing link) |
user_id | string | No | User ID, e.g. "5a8cf39111be10466d285d6b" |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"code": 0,
"data": {
"cursor": "6adc6b9e0000000025023fcf",
"fallback": false,
"has_more": true,
"need_clean": true,
"notes": [
{
"advanced_widgets_groups": {
"groups": [
{
"fetch_types": [
"guos_test"
],
"mode": 1
}
]
},
"ats": [],
"collected_count": 43,
"comments_count": 123,
"create_time": 1793533275,
"cursor_score": "6ae7255b000000001e014133",
"desc": "🍚\n姐姐提议的居家万圣小聚\n5分钟搞定老农民妆造\n懒人友好🧑🤝🧑哈哈哈哈\n\t\n#万圣节拍照[话题]#",
"display_title": "当你的万圣节任务是cos一些出其不意的",
"id": "6ae7255b000000001e014133",
"images_list": [
{
"fileid": "notes_pre_post/1040g3k83271dhedgma205o562cn0962uf1ik58g",
"height": 1799,
"index": 0,
"latitude": 0,
"longitude": 0,
"original": "https://sns-i11.rednotecdn.com/notes_pre_post/1040g3k83271dhedgma205o562cn0962uf…",
"trace_id": "notes_pre_post/1040g3k83271dhedgma205o562cn0962uf1ik58g",
"url": "https://sns-i11.rednotecdn.com/notes_pre_post/1040g3k83271dhedgma205o562cn0962uf…"
}
],
"infavs": false,
"inlikes": false
}
]
},
"debug_id": "8b6df836",
"debug_info": "gAAAAABq6ZFueMYwiAkZGc-YgvqgWFhh3Gwhnh28JadPeh-jnMCPe9lc5zapDVdpcg1o66eAT5nt0XvR…",
"msg": "成功",
"success": true
}
| Field | Meaning |
|---|---|
data.notes[] | The list of favorited notes on this page. |
data.notes[].id | The note ID. It matches cursor_score in these samples. |
data.notes[].title / data.notes[].display_title | The note title as shown to readers. |
data.notes[].desc | The note body text, including hashtags written as #tag[话题]#. |
data.notes[].type | The note format. Values seen are normal for image notes and video for video notes. |
data.notes[].likes / data.notes[].collected_count / data.notes[].comments_count / data.notes[].share_count | Counts of likes, saves, comments, and shares for the note. |
data.notes[].create_time / data.notes[].last_update_time | Unix timestamps in seconds for when the note was created and last edited. last_update_time is 0 when the note was never updated. |
data.notes[].user.user_id / data.notes[].user.nickname | The ID and display name of the author who posted the note, not the user whose favorites you requested. |
data.notes[].images_list[].url / data.notes[].images_list[].original | Image links for the note. url is a smaller version and original is the large version. |
data.notes[].xsec_token | A token attached to the note. Keep it with the note id for later note lookups. |
data.notes[].video_info_v2.capa.duration | Video length for video notes. Only video notes include video_info_v2. |
data.has_more / data.cursor | Whether another page exists, and the cursor value returned for paging. |
cursor empty on the first call. For the next page, pass the cursor value from the previous response, or the last note id as the parameter description says.data.has_more is true.user_id or share_text. The user_id is a 24-character hex string such as 5a8cf39111be10466d285d6b.$0.01 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
開始建置
具備統一驗證與用量追蹤的平台 API 端點。
curl -X POST "https://api.sandbase.ai/v1/api/xiaohongshu/app-v2/user-faved-notes" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"user_id": "5c668b3e0000000012021605",
"share_text": "https://xhslink.com/a/EZ4M9TwMA6c3"
}'請將您的 SandBase API 金鑰設定在伺服器環境中。請求使用 Bearer 驗證。
export SANDBASE_API_KEY="YOUR_API_KEY"請將金鑰保留在伺服器端,不要在瀏覽器程式碼中公開。
cursorstringPagination cursor, leave empty for first request, pass last note_id from previous page for next page
share_textstringXiaohongshu sharing link (support APP and Web sharing link)
user_idstringUser ID, e.g. "5a8cf39111be10466d285d6b"
這是此 API 的已儲存範例回應;檢視時不會發出即時請求。
[
{
"data": {
"code": 0,
"data": {
"fallback": false,
"has_more": false,
"need_clean": false,
"notes": []
},
"debug_id": "d464f235",
"debug_info": "gAAAAABqvfBdoLFjxv0cHdzupzatA2RbAAAK7CIBFQeMTFKT6LYY3FWhWOnXsmYg0nXiesrL0F2jIb0vMI5G8U-vrVHWcVFfHXf_6KH5sZXmA93oBJfZ3OF-exiqsbKkT8REm3DJrhTjtUlU0EWguH2yR_Vlyjc3NL5Ql1db6z5lDMA3uaMZHVQg8vtb3CxYw0FXQiinTTbGdn5VJ0bccmh4ekU_WmbcYaas9Vn4PTi0iYLGSBsgFVq-BbrfDeNjDnQJkltGEcXUkqcJCxOT6Csm_5GNHWDC0j2uBAgqTctKXh9rl14MBR0lEqbQr3o9_NwLELS81amtZnGFIkkzk1bGJ85CSmyaZzN3eOdEzRZh8z9qkwt6Hofta7_4GZn8PWaMgoAGJWsSX9ZNNsw28gSry8uxWE-7u30sHjkriKDENJJ56PPIEhp3rTceY1zseTUOaLAQBGFF",
"msg": "成功",
"success": true
}
}
]探索更多
| API | 價格 | 回應 |
|---|---|---|
Xiaohongshu | 每次呼叫 $0.01 | JSON |
Xiaohongshu | 每次呼叫 $0.01 | JSON |
Xiaohongshu | 每次呼叫 $0.01 | JSON |
Xiaohongshu | 每次呼叫 $0.01 | JSON |
Xiaohongshu | 每次呼叫 $0.01 | JSON |
Xiaohongshu | 每次呼叫 $0.01 | JSON |
問題
使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/xiaohongshu/app-v2/user-faved-notes。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。
每次 $0.01,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。
不需要任何參數。 選填:cursor (string), share_text (string) 和 user_id (string)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。
在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。
不需要。Xiaohongshu (RED) User Favorited Notes 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 Xiaohongshu API 存取權。