# What is a Xiaohongshu note ID, and what is an xhslink link?

A note ID is the 24 hexadecimal characters at the end of a note's link; a user ID has the same form. An xhslink.com link is the short link the app copies, which leads to a note's or a profile's full link once opened. DataXAPI reads Xiaohongshu (RedNote) with 21 endpoints, from $0.0200 a call; a failed call is not charged.

## Where you see them

A note's ID is the last part of `/explore/<id>` in the browser's address bar, or of `/discovery/item/<id>` in a link the website shares. A user's ID is the last part of `/user/profile/<id>`. Both look like `0123456789abcdef01234567` (made up): digits and the letters a to f.

The user ID is not the handle a profile shows (小红书号, the Xiaohongshu ID the user picks); DataXAPI returns the handle as `username`. Xiaohongshu has not documented either format; as public open-source tools describe it, a bare ID is 24 hexadecimal characters, and an xhslink.com link is read as a note link like the other two forms.

## Short links

What the app copies is a share text with `http://xhslink.com/<code>` in it. The code does not contain the note ID: only opening the link shows where it leads.

DataXAPI's `url` parameter takes it as it is, alone or in its share text: it opens the short link once, sees which note or profile it leads to, and reads the ID from there. Where it cannot be opened, paste the full link or the ID.

## Which endpoints take them

`xiaohongshu.notes.get` and `xiaohongshu.notes.comments.list` take a note ID as `id`, or a link as `url`. `xiaohongshu.users.get` and `xiaohongshu.users.notes.list` take a user ID as `id`, or a profile link as `url`. An ID from a search result goes into these unchanged.

## Endpoints

- [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.
- [Xiaohongshu user notes](https://dataxapi.com/apis/xiaohongshu/users/notes/list/) ($0.0200 / a call): Get a page of the notes a Xiaohongshu account posted, by user ID or profile link: title, text, engagement counts, images, whether pinned.

## How-to guides

- [How to get Xiaohongshu (RedNote) note comments in bulk](https://dataxapi.com/guides/xiaohongshu-note-comments/)

## 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): reading a note ID](https://github.com/NanmiCoder/MediaCrawler/blob/main/media_platform/xhs/help.py#L304-L337)
- [MediaCrawler (open-source project): link forms](https://github.com/NanmiCoder/MediaCrawler/blob/main/webui/src/lib/urlParser.ts#L14-L21)

## 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 xsec_token on Xiaohongshu?](https://dataxapi.com/answers/xiaohongshu-xsec-token/)
- [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 look up Xiaohongshu (RedNote) PGY creator rates and audience](https://dataxapi.com/guides/xiaohongshu-pgy-creator-rates/)
- [How to search and export Xiaohongshu (RedNote) notes by keyword](https://dataxapi.com/guides/xiaohongshu-search-export-notes/)
- [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-note-id-and-xhslink/)
