What is xsec_token on Xiaohongshu and why do note links break without it?

xsec_token is a short-lived token Xiaohongshu (RedNote) appends to note URLs. Open a note with only its ID, or with an expired token, and the web page usually answers as if the note were deleted. The fix is to pass the full link, including the token, or a share link that redirects to it. XTikAPI reads Xiaohongshu with 16 endpoints from $0.02 a call. A failed call is not charged, and a verified account gets $0.5 of trial balance.

Updated 2026-11-18

What breaks

Scraper documentation describes the same pattern: a bare note ID, or a share link stripped of its token, often lands on a 404 page, and a wrong or expired token shows the same "not found" page as a deleted note, so the two cases are hard to tell apart.

The usual cause in code is a URL rebuilt from the note ID, or a query string dropped somewhere along the way.

Reading a note without managing tokens

xiaohongshu.notes.detail and xiaohongshu.videos.detail take either a note id or the share text or link the app gives you in url. You do not fetch or refresh xsec_token yourself. Comments work the same way through xiaohongshu.comments.list.

Why XTikAPI

  • One API key for Xiaohongshu and every other supported platform, with the same JSON shape: data holds the result, meta says what was billed.
  • A failed call or a timeout is not charged; the response says charged: false.
  • X-Max-Price caps what one call may cost, and the same Idempotency-Key within 24 hours is never billed twice.
  • Prepaid balance, no subscription. Balance never expires, and unused top-up money can be refunded within 14 days.

Endpoints

More about Xiaohongshu

Sources