# What is xsec_token on Xiaohongshu?

xsec_token is an access token Xiaohongshu (RedNote) puts on note and profile links, usually beside xsec_source. With DataXAPI you do not handle it: the note endpoints take the bare note ID, and every search result's url already carries its token. DataXAPI reads Xiaohongshu (RedNote) with 21 endpoints, from $0.0200 a call; a failed call is not charged.

## What it is and where you see it

It is a query parameter on a note's web link and on a profile link: `https://www.xiaohongshu.com/explore/0123456789abcdef01234567?xsec_token=ABx1y2z3&xsec_source=pc_search` (a made-up example). The 24 characters in the path are the note ID; the token and `xsec_source` follow it.

Xiaohongshu has published nothing on what the token is for. As public open-source tools describe it, a note link should carry it, and it is a token that comes with search results; one such project's issue reports a note that failed to load with the message 访问链接异常 (abnormal access link).

## What DataXAPI does with it

`xiaohongshu.notes.search` writes each result's `url` the way the app shares a note, `/discovery/item/<id>` with its `xsec_token`, so the link opens for a person. DataXAPI has recorded a token on every result of a page.

The note, comment and profile endpoints take the 24-character ID as `id`, or a link pasted as it is as `url`, with or without the token: the ID is read from the link's path, and the token says nothing about which note it is.

## Endpoints

- [Xiaohongshu note search](https://dataxapi.com/apis/xiaohongshu/notes/search/) ($0.0200 / a call): Search Xiaohongshu notes by terms: title, text, author, engagement counts, images, and a link that opens.
- [Xiaohongshu note detail](https://dataxapi.com/apis/xiaohongshu/notes/get/) ($0.0200 / a call): Get one Xiaohongshu note by ID or link: title, text, author, engagement counts, images.
- [Xiaohongshu note comments](https://dataxapi.com/apis/xiaohongshu/notes/comments/list/) ($0.0200 / a call): Get a page of top-level comments on a Xiaohongshu note by ID or link, newest first: text, commenter, likes, reply count, time posted.
- [Xiaohongshu user profile](https://dataxapi.com/apis/xiaohongshu/users/get/) ($0.0200 / a call): Get a Xiaohongshu account by user ID or profile link: name, handle, bio, follower, following and note counts, verification.

## How-to guides

- [How to search and export Xiaohongshu (RedNote) notes by keyword](https://dataxapi.com/guides/xiaohongshu-search-export-notes/)

## Sources

What this page says of other services is from their own pages and documents, read on 2026-10-29. Prices and features change: check the source before you decide.

- [MediaCrawler (open-source project): Xiaohongshu settings](https://github.com/NanmiCoder/MediaCrawler/blob/main/config/xhs_config.py#L26-L36)
- [MediaCrawler (open-source project): note detail request](https://github.com/NanmiCoder/MediaCrawler/blob/main/media_platform/xhs/client.py#L331-L356)
- [MediaCrawler (open-source project): issue 382](https://github.com/NanmiCoder/MediaCrawler/issues/382)

## More about Xiaohongshu (RedNote)

- [Xiaohongshu (RedNote) API](https://dataxapi.com/apis/xiaohongshu/)
- [How do I export Xiaohongshu (RedNote) data?](https://dataxapi.com/answers/export-xiaohongshu-data/)
- [Can ChatGPT read Xiaohongshu (RedNote)?](https://dataxapi.com/answers/can-chatgpt-read-xiaohongshu/)
- [What is a Xiaohongshu note ID, and what is an xhslink link?](https://dataxapi.com/answers/xiaohongshu-note-id-and-xhslink/)
- [What is CPE on Xiaohongshu PGY and on Douyin Xingtu?](https://dataxapi.com/answers/xiaohongshu-pgy-cpe-vs-xingtu-cpe/)
- [What is Xiaohongshu PGY?](https://dataxapi.com/answers/what-is-xiaohongshu-pgy/)
- [How to get Xiaohongshu (RedNote) note comments in bulk](https://dataxapi.com/guides/xiaohongshu-note-comments/)
- [How to look up Xiaohongshu (RedNote) PGY creator rates and audience](https://dataxapi.com/guides/xiaohongshu-pgy-creator-rates/)
- [How to get a keyword's search index and related keywords on Xiaohongshu PGY](https://dataxapi.com/guides/xiaohongshu-pgy-keywords/)

---

Catalog revision 5c3194deef3264cc. [HTML version](https://dataxapi.com/answers/xiaohongshu-xsec-token/)
