Xiaohongshu (RED) note monitoring: new notes, comments, creator performance
To monitor competitors on Xiaohongshu use xhs_note_search sorted by time for new notes, xhs_note_detail for body and engagement, xhs_note_comments for sentiment, and xhs_user_notes to follow one creator. ¥0.2 per call, failed calls are not charged.
Which endpoints to call
| Endpoint | Price | Calls | Subtotal | Purpose |
|---|---|---|---|---|
xhs_note_search | ¥0.2 | ×2 | ¥0.4 | Find notes by keyword (returns note_id) |
xhs_note_detail | ¥0.2 | ×1 | ¥0.2 | Body, images, engagement counts |
xhs_note_comments | ¥0.2 | ×3 | ¥0.6 | Top-level comments (cursor pagination) |
xhs_sub_comments | ¥0.2 | ×1 | ¥0.2 | Second-level replies for high-liked comments |
| per note (2 search + 1 detail + 3 comment + 1 replies = 7 calls) | ¥1.4 | per full run | ||
| 300 notes | ¥420 | 300 × ¥1.4 | ||
Working code skeleton
Runs as-is once you set TOKEN. Failed and empty calls are skipped, so they cost nothing.
import time, requests
TOKEN, API = "fw_xxx", "https://finewisdom.top/api"
def call(method, **kw):
r = requests.get(API, params={"token": TOKEN, "method": method, **kw}, timeout=60).json()
return r["data"] if r.get("status") == "success" else None
def paged(method, max_pages=3, **kw):
rows, cursor = [], None
for _ in range(max_pages):
q = dict(kw)
if cursor:
q["start"] = cursor # Xiaohongshu paginates by cursor, not page
d = call(method, **q)
if not d:
break
batch = d.get("comments") or d.get("list") or []
if not batch:
break
rows += batch
cursor = d.get("_next_offset") or d.get("cursor")
if not cursor:
break
time.sleep(1.1)
return rows
def monitor(keyword):
# for "new note" monitoring pass sort_type=<sort by time>; default is relevance
notes = call("xhs_note_search", keyword=keyword, page=1)
out = []
for n in (notes.get("list") or notes.get("items") or [])[:300]:
nid = n.get("note_id")
detail = call("xhs_note_detail", note_id=nid)
out.append({"note_id": nid, "title": (detail or {}).get("title"),
"liked": (detail or {}).get("liked_count"),
"comments": paged("xhs_note_comments", max_pages=3, note_id=nid)})
time.sleep(1.1)
return out
Gotchas worth knowing
sort_type/note_type/note_timeonxhs_note_searchare filters. For new-note monitoring setsort_typeto time-based ordering (default is relevance), otherwise you get the hottest old notes.- Comments paginate with the
startcursor (pass the value from the previous page), not withpage. - Replies require a top-level
comment_id. Only expand replies on high-liked comments or your call count explodes.
FAQ
Can I get historical notes?
Only what the platform currently exposes. Xiaohongshu caps pagination depth; for long-term trends you need to persist data daily.
How do I keep costs down?
Filter twice: drop low-engagement notes from the search result, then pull comments only for the top N. 300 notes fully enriched is about 2,100 calls; filtered down to 80 it is about 560.