What the API needs
Note detail and comment endpoints accept the complete public note URL. A usable input has an HTTPS Xiaohongshu host, a note path, and the xsec_token query parameter copied with that note.
https://www.xiaohongshu.com/explore/NOTE_ID
?xsec_token=CURRENT_TOKEN
&xsec_source=pc_search
The token cannot be invented, moved to another note, or reconstructed from the note ID.
Copy one current note URL
- Open a public note from a visible Xiaohongshu card.
- Wait until the note page finishes opening.
- Copy the complete browser address, including its query parameters.
- Run it through the local URL helper before calling the detail endpoint.
Collect several current URLs
The URL Helper also provides a bookmarklet that scans visible note-card links and copies up to 10 deduplicated URLs as JSON for /note/batch_detail_from_url. It reads link addresses only and sends no data.
Recover when a token expires
Do not repeatedly retry an expired link. Open or share the public note again, copy the newly generated complete URL, validate it, and retry with that new URL. For temporary 503 responses, keep the same input and honor Retry-After.
/note/parse_url validates structure but does not prove that upstream note access will still succeed. A valid shape and a current upstream token are separate conditions.
Keep credentials separate
The note URL may be pasted into the local helper, but the RapidAPI key belongs only in server-side environment variables. Do not put the key into a web page, mobile application, public repository, or support message.
Share this workflow
For a compact version suitable for a development team, read the DEV tutorial.