Files
jackwener__opencli/docs/adapters/browser/xiaohongshu.md
ahahaha d0803857f1 feat(xiaohongshu): add note command and nested reply support for comments (#599)
* feat(xiaohongshu): add note command and nested reply support for comments

Add `xiaohongshu note` command to read full note content (title, author,
description, engagement metrics, tags) from public note pages.

Enhance `xiaohongshu comments` with `--with-replies` flag to extract
nested replies (楼中楼), including reply_to attribution and per-reply
like counts. Limit logic counts only top-level comments so replies
are included for free.

Extract shared `parseNoteId` into side-effect-free `note-helpers.ts`
to avoid cross-module command registration leakage.

Normalize non-numeric engagement placeholders ("赞"/"收藏"/"评论")
to "0" for zero-count notes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs(xiaohongshu): add note and comments --with-replies to adapter docs

Update xiaohongshu adapter documentation and README command table
to reflect the new note command and enhanced comments with nested
reply support.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs(xiaohongshu): fix download example to show both note-id and url

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(xiaohongshu): expand nested reply threads before scraping

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: jackwener <jakevingoo@gmail.com>
2026-03-30 23:29:30 +08:00

2.1 KiB

Xiaohongshu (小红书)

Mode: 🔐 Browser · Domain: xiaohongshu.com

Commands

Command Description
opencli xiaohongshu search Search notes by keyword (returns title, author, likes, URL)
opencli xiaohongshu note Read full note content (title, author, description, likes, collects, comments, tags)
opencli xiaohongshu comments Read comments from a note (--with-replies for nested 楼中楼 replies)
opencli xiaohongshu feed Home feed recommendations (via Pinia store interception)
opencli xiaohongshu notifications User notifications (mentions, likes, connections)
opencli xiaohongshu user Get public notes from a user profile
opencli xiaohongshu download Download images and videos from a note
opencli xiaohongshu publish Publish image-text notes (creator center UI automation)
opencli xiaohongshu creator-notes Creator's note list with per-note metrics
opencli xiaohongshu creator-note-detail Detailed analytics for a single creator note
opencli xiaohongshu creator-notes-summary Combined note list + detail analytics summary
opencli xiaohongshu creator-profile Creator account info (followers, growth level)
opencli xiaohongshu creator-stats Creator data overview (views, likes, collects, trends)

Usage Examples

# Search for notes
opencli xiaohongshu search 美食 --limit 10

# Read a note's full content (pass URL from search results to preserve xsec_token)
opencli xiaohongshu note "https://www.xiaohongshu.com/search_result/<id>?xsec_token=..."

# Read comments with nested replies (楼中楼)
opencli xiaohongshu comments "https://www.xiaohongshu.com/search_result/<id>?xsec_token=..." --with-replies --limit 20

# JSON output
opencli xiaohongshu search 旅行 -f json

# Other commands
opencli xiaohongshu feed
opencli xiaohongshu notifications
opencli xiaohongshu download <note-id or url>

Prerequisites