Xiaohongshu API

Read notes, author profiles, and threaded comments using keywords and post URLs to organize topic research and user feedback.

Use note URLs for details and comments; comment collection requires valid secure tokens retained from recent search results.

Platform availability

24h health
99%
Healthy

Last 30 days

Available capabilities

Each Xiaohongshu action, what it does, its price and its health over the last 24 hours. Open an action for its parameters, response fields and code samples.

CapabilityWhat it doesPer 1,00024-hour health
SearchsearchFind Xiaohongshu notes on a topic, 20 per page, with title, body excerpt, like, save, comment and share counts, author and publish time.$5.56 per 1,000 requestsHealthy · health 100%
ProfilesprofileLook up a Xiaohongshu account's nickname, Xiaohongshu ID, bio, IP location, verification and exact follower, following, post, like and save counts.$5.56 per 1,000 requestsHealthy · health 100%
Posts by useruser_postsList the notes a Xiaohongshu creator has published, 20 per page, pinned notes first and the rest newest to oldest, with excerpt, counts and video links.$5.56 per 1,000 requestsNormal
Note detailsnoteRead one Xiaohongshu note in full: body, every image in order, topics, mentioned users, engagement counts, IP location and coordinates when the images carry them.$5.56 per 1,000 requestsHealthy · health 100%
Video detailsvideoFetch the playback link and duration for one Xiaohongshu video note from the same URL that note accepts.$5.56 per 1,000 requestsNormal
CommentscommentsPull top-level comments on a Xiaohongshu note, 15 per page, with text, likes, IP location, commenter, reply count and author or AI-account flags.$5.56 per 1,000 requestsHealthy · health 96%
Comments from multiple URLscomments_batchCollect comments from 1 to 20 Xiaohongshu notes in one call, each row tagged with its note_id and note_url so threads stay separate.$5.56 per 1,000 requestsHealthy · health 90%
Comment repliessub_commentsRead the replies under one comment on a Xiaohongshu note, 10 per page, with text, likes, IP location and who each reply answers.$5.56 per 1,000 requestsNormal
User searchsearch_usersFind Xiaohongshu creators and brand accounts by keyword, 20 per page, with nickname, Xiaohongshu ID, follower count and verification type.$5.56 per 1,000 requestsNormal
HashtaghashtagBrowse the notes on one Xiaohongshu topic page, newest or most popular first, with full text, all images, engagement counts and video details.$5.56 per 1,000 requestsNormal
TrendingtrendingSee a sample of the notes Xiaohongshu is recommending right now, up to 30, with title, author, image and video flag.$5.56 per 1,000 requestsAvailable · health 76%

Open a capability for its parameters, response fields, code samples and trial.

What does each Xiaohongshu action accept?

Each answer below pairs one callable action with its real inputs. Parameter meanings and allowed values are action-specific; a familiar name does not carry the same meaning across every platform.

Official sources are linked only to clarify the platform term beside them. They do not imply platform authorization or endorsement, and they do not add official-site features to the EveryInfra API contract.

ActionRequiredOptionalDeliveryLimitPer 1,000Response fields
search

Search

Find Xiaohongshu notes on a topic, 20 per page, with title, body excerpt, like, save, comment and share counts, author and publish time. Narrow by content type, sort and date range, and send next_page_token back as page_token for the next page; search text is an excerpt, not the full note.

keywordcontent_type, date_range, page_token, sortSync deliveryEach call returns one page of up to 20 rows; for the next page, pass the response's top-level next_page_token as page_token. limit is accepted and has no effect.$5.56 per 1,000 requestsid · url · title · text · like_count · collect_count · comment_count · share_count · posted_at · image_url · author_name · author_id · avatar_url · author_url · is_video · next_page_token · video_url · duration_sec · duration_seconds · platform · poi_id · poi_name · images · is_goods_note · author_is_verified
profile

Profiles

Look up a Xiaohongshu account's nickname, Xiaohongshu ID, bio, IP location, verification and exact follower, following, post, like and save counts. Pass the ID from a /user/profile/ link, the link itself or a commenter's author_id; counts that are not shown come back null, not zero.

user_id—Sync delivery—$5.56 per 1,000 requestsuser_id · nickname · red_id · url · bio · follower_count · following_count · like_collect_count · post_count · gender · ip_location · avatar_url · is_verified · tags · like_count · collect_count · real_name_info · verification_type · verification_text · location · platform
user_posts

Posts by user

List the notes a Xiaohongshu creator has published, 20 per page, pinned notes first and the rest newest to oldest, with excerpt, counts and video links. Use page_token for more; links here carry no access token and text is an excerpt, so call note for a browser-ready link and the full body.

user_idpage_tokenSync deliveryEach call returns one page of up to 20 rows; for the next page, pass the response's top-level next_page_token as page_token. limit is accepted and has no effect.$5.56 per 1,000 requestsid · url · title · text · like_count · collect_count · comment_count · share_count · posted_at · image_url · author_name · author_id · avatar_url · author_url · is_video · next_page_token · video_url · duration_sec · duration_seconds · platform · images · is_goods_note · is_pinned · ip_location
note

Note details

Read one Xiaohongshu note in full: body, every image in order, topics, mentioned users, engagement counts, IP location and coordinates when the images carry them. Pass the complete note link with xsec_token intact; the video play link and the comments need separate video and comments calls.

url—Sync delivery—$5.56 per 1,000 requestsid · url · title · text · like_count · collect_count · comment_count · share_count · posted_at · ip_location · author_name · author_id · is_video · avatar_url · author_url · platform · images · tags · topics · mentioned_users · lat · lng · has_goods · author_red_id · author_is_verified · language
video

Video details

Fetch the playback link and duration for one Xiaohongshu video note from the same URL that note accepts. The signed link expires, so download it soon; image notes come back empty and are refunded.

url—Sync delivery—$5.56 per 1,000 requestsid · url · video_url · duration_sec · duration_seconds · platform
comments

Comments

Pull top-level comments on a Xiaohongshu note, 15 per page, with text, likes, IP location, commenter, reply count and author or AI-account flags. Order them with sort, page with page_token, and read the replies themselves through sub_comments.

urlpage_token, sortSync deliveryEach call returns one page of up to 15 rows; for the next page, pass the response's top-level next_page_token as page_token. limit is accepted and has no effect.$5.56 per 1,000 requestsid · text · like_count · posted_at · ip_location · author_name · author_id · sub_comment_count · note_id · note_url · next_page_token · images · is_author · author_avatar_url · author_red_id · author_is_ai_agent · mentioned_users · platform
comments_batch

Comments from multiple URLs

Collect comments from 1 to 20 Xiaohongshu notes in one call, each row tagged with its note_id and note_url so threads stay separate. Every link needs a valid note ID and xsec_token; a note that fails is reported as missed rather than as having zero comments.

urlssortSync deliveryEach call returns one page of up to 15 comments for each note, with no next_page_token; to read further, page one note at a time with comments. limit is accepted and has no effect.$5.56 per 1,000 requestsid · text · like_count · posted_at · ip_location · author_name · author_id · sub_comment_count · note_id · note_url · next_page_token · images · is_author · author_avatar_url · author_red_id · author_is_ai_agent · mentioned_users · platform
sub_comments

Comment replies

Read the replies under one comment on a Xiaohongshu note, 10 per page, with text, likes, IP location and who each reply answers. Pass the note link with a comment_id from the comments results, and use reply_to_id to rebuild the thread.

url, comment_idpage_tokenSync deliveryEach call returns one page of up to 10 rows; for the next page, pass the response's top-level next_page_token as page_token. limit is accepted and has no effect.$5.56 per 1,000 requestsid · text · like_count · posted_at · ip_location · author_name · author_id · reply_to_id · reply_to_author_name · reply_to_author_id · next_page_token · images · is_author · author_avatar_url · author_red_id · author_is_ai_agent · mentioned_users · platform
search_users

User search

Find Xiaohongshu creators and brand accounts by keyword, 20 per page, with nickname, Xiaohongshu ID, follower count and verification type. Filter by follower_range or user_type; follower counts approximate the rounded list figures, so call profile for exact numbers.

keywordfollower_range, page_token, user_typeSync deliveryEach call returns one page of up to 20 rows; for the next page, pass the response's top-level next_page_token as page_token. limit is accepted and has no effect.$5.56 per 1,000 requestsuser_id · nickname · red_id · avatar_url · url · follower_count · is_verified · verification_type · next_page_token · platform
hashtag

Hashtag

Browse the notes on one Xiaohongshu topic page, newest or most popular first, with full text, all images, engagement counts and video details. Pass a 24-character topic_id or topic link; pages hold up to 20 notes, and only a missing next_page_token marks the end.

topic_idpage_token, sortSync deliveryEach call returns one page of up to 20 rows. The number of rows varies from page to page, so a short page is not the end. For the next page, pass the response's top-level next_page_token as page_token; stop when there is none. limit is accepted and has no effect.$5.56 per 1,000 requestsid · url · title · text · like_count · collect_count · comment_count · share_count · posted_at · image_url · author_name · author_id · avatar_url · author_url · is_video · next_page_token · video_url · duration_sec · duration_seconds · platform · images
trending

Trending

See a sample of the notes Xiaohongshu is recommending right now, up to 30, with title, author, image and video flag. The selection changes on every load, and list position neither explains the algorithm nor builds a history.

—Sync deliveryCatalog values: defaultLimit=20, maxLimit=30. A limit can control pages or per-parent expansion for some actions, so it is not always a final row count.$5.56 per 1,000 requestsid · url · title · author_name · is_video · image_url · platform

What do the Xiaohongshu search parameters mean?

Find Xiaohongshu notes on a topic, 20 per page, with title, body excerpt, like, save, comment and share counts, author and publish time. Narrow by content type, sort and date range, and send next_page_token back as page_token for the next page; search text is an excerpt, not the full note.

Full API reference: parameters, code samples, response example and health →
keywordRequired
Specifies the query string used to search Xiaohongshu note content (e.g., "sensitive skin sunscreen") in the search action. Searches note text, not user IDs.
content_typeOptional
Filters returned notes by content type, such as image/text or video. Use the allowed values listed for the current action.
Allowed values:allimagevideo
Xiaohongshu: Image-Text and Video Note Entry Points — Xiaohongshu public deeplink documentation separately lists image-text notes, video notes, and note comment pages. This reference only cites distinctions between content types; app redirect parameters in the documentation cannot be passed directly to this endpoint. · Checked
date_rangeOptional
Filters notes by publish time: last_24_hours (the past 24 hours) or last_7_days (the past 7 days); omit it for no limit. Keep the same value while paging.
Allowed values:last_24_hourslast_7_days
page_tokenOptional
Pagination cursor for the comments, sub_comments, search, user_posts, search_users and hashtag actions: pass back the next_page_token value from a row of the previous response to fetch the next page; omit it to start from the first page. Each page is one call, billed per request.
sortOptional
Sets the order of note lists in the search action: relevance, newest, most_liked, most_commented or most_collected. Use only the allowed values listed for the action.
Allowed values:most_collectedmost_commentedmost_likednewestrelevance

What do the Xiaohongshu profile parameters mean?

Look up a Xiaohongshu account's nickname, Xiaohongshu ID, bio, IP location, verification and exact follower, following, post, like and save counts. Pass the ID from a /user/profile/ link, the link itself or a commenter's author_id; counts that are not shown come back null, not zero.

Full API reference: parameters, code samples, response example and health →
user_idRequired
Specifies the Xiaohongshu user ID (the identifier following /user/profile/ in the URL) or full profile URL for the profile and user_posts actions. The author_id returned by the comment actions also works. Used to fetch profile details or published notes; does not accept username display names.

What do the Xiaohongshu user_posts parameters mean?

List the notes a Xiaohongshu creator has published, 20 per page, pinned notes first and the rest newest to oldest, with excerpt, counts and video links. Use page_token for more; links here carry no access token and text is an excerpt, so call note for a browser-ready link and the full body.

Full API reference: parameters, code samples, response example and health →
user_idRequired
Specifies the Xiaohongshu user ID (the identifier following /user/profile/ in the URL) or full profile URL for the profile and user_posts actions. The author_id returned by the comment actions also works. Used to fetch profile details or published notes; does not accept username display names.
page_tokenOptional
Pagination cursor for the comments, sub_comments, search, user_posts, search_users and hashtag actions: pass back the next_page_token value from a row of the previous response to fetch the next page; omit it to start from the first page. Each page is one call, billed per request.

What do the Xiaohongshu note parameters mean?

Read one Xiaohongshu note in full: body, every image in order, topics, mentioned users, engagement counts, IP location and coordinates when the images carry them. Pass the complete note link with xsec_token intact; the video play link and the comments need separate video and comments calls.

Full API reference: parameters, code samples, response example and health →
urlRequired
Specifies the full Xiaohongshu note URL, formatted as /explore/<note_id> or /discovery/item/<note_id>. Use recent search URLs that retain query parameters like xsec_token. The sub_comments action requires both this url and a valid comment_id.

What do the Xiaohongshu video parameters mean?

Fetch the playback link and duration for one Xiaohongshu video note from the same URL that note accepts. The signed link expires, so download it soon; image notes come back empty and are refunded.

Full API reference: parameters, code samples, response example and health →
urlRequired
Specifies the full Xiaohongshu note URL, formatted as /explore/<note_id> or /discovery/item/<note_id>. Use recent search URLs that retain query parameters like xsec_token. The sub_comments action requires both this url and a valid comment_id.

What do the Xiaohongshu comments parameters mean?

Pull top-level comments on a Xiaohongshu note, 15 per page, with text, likes, IP location, commenter, reply count and author or AI-account flags. Order them with sort, page with page_token, and read the replies themselves through sub_comments.

Full API reference: parameters, code samples, response example and health →
urlRequired
Specifies the full Xiaohongshu note URL, formatted as /explore/<note_id> or /discovery/item/<note_id>. Use recent search URLs that retain query parameters like xsec_token. The sub_comments action requires both this url and a valid comment_id.
page_tokenOptional
Pagination cursor for the comments, sub_comments, search, user_posts, search_users and hashtag actions: pass back the next_page_token value from a row of the previous response to fetch the next page; omit it to start from the first page. Each page is one call, billed per request.
sortOptional
Comment order: default follows the platform's own order (the same as omitting it), newest puts the latest comments first, and most_liked puts the most-liked first. Keep the same value while paging; with a different value, the previous next_page_token no longer applies.
Allowed values:defaultmost_likednewest

What do the Xiaohongshu comments_batch parameters mean?

Collect comments from 1 to 20 Xiaohongshu notes in one call, each row tagged with its note_id and note_url so threads stay separate. Every link needs a valid note ID and xsec_token; a note that fails is reported as missed rather than as having zero comments.

Full API reference: parameters, code samples, response example and health →
urlsRequired
Specifies an array of 1 to 20 Xiaohongshu note URLs for the comments_batch action. Each URL must contain a valid note ID and an xsec_token. Billing is per target note; check partial or missed response fields if some notes fail rather than assuming zero comments exist.
sortOptional
Comment order for every note in the request: default follows the platform's own order (the same as omitting it), newest puts the latest comments first, and most_liked puts the most-liked first.
Allowed values:defaultmost_likednewest

What do the Xiaohongshu sub_comments parameters mean?

Read the replies under one comment on a Xiaohongshu note, 10 per page, with text, likes, IP location and who each reply answers. Pass the note link with a comment_id from the comments results, and use reply_to_id to rebuild the thread.

Full API reference: parameters, code samples, response example and health →
urlRequired
Specifies the full Xiaohongshu note URL, formatted as /explore/<note_id> or /discovery/item/<note_id>. Use recent search URLs that retain query parameters like xsec_token. The sub_comments action requires both this url and a valid comment_id.
comment_idRequired
Specifies the parent comment ID to retrieve sub-replies for in the sub_comments action. Obtain this ID from the comments response for the same note and pair it with the corresponding url. It is not a note ID or user ID.
page_tokenOptional
Pagination cursor for the comments, sub_comments, search, user_posts, search_users and hashtag actions: pass back the next_page_token value from a row of the previous response to fetch the next page; omit it to start from the first page. Each page is one call, billed per request.

What do the Xiaohongshu search_users parameters mean?

Find Xiaohongshu creators and brand accounts by keyword, 20 per page, with nickname, Xiaohongshu ID, follower count and verification type. Filter by follower_range or user_type; follower counts approximate the rounded list figures, so call profile for exact numbers.

Full API reference: parameters, code samples, response example and health →
keywordRequired
A keyword for finding accounts, such as coffee, a brand name or a topic. It returns users (creators and brand accounts), not notes.
follower_rangeOptional
Filters accounts in search_users by follower count: under_100, 100_to_1k, 1k_to_10k, 10k_to_100k or over_100k. Omit it for no limit.
Allowed values:100_to_1k10k_to_100k1k_to_10kover_100kunder_100
page_tokenOptional
Pagination cursor for the comments, sub_comments, search, user_posts, search_users and hashtag actions: pass back the next_page_token value from a row of the previous response to fetch the next page; omit it to start from the first page. Each page is one call, billed per request.
user_typeOptional
Filters accounts in search_users by type: general (regular user), verified_individual (verified person) or business (verified business). Omit it for no limit.
Allowed values:businessgeneralverified_individual

What do the Xiaohongshu hashtag parameters mean?

Browse the notes on one Xiaohongshu topic page, newest or most popular first, with full text, all images, engagement counts and video details. Pass a 24-character topic_id or topic link; pages hold up to 20 notes, and only a missing next_page_token marks the end.

Full API reference: parameters, code samples, response example and health →
topic_idRequired
The topic page ID for hashtag (24 characters), or a topic page link such as https://www.xiaohongshu.com/page/topics/<ID>, an app topic link or a Xiaohongshu short share link. The topics[].topic_id values returned by note work directly. It is not the ID of a note's tag object or the topic name.
page_tokenOptional
Pagination cursor for the comments, sub_comments, search, user_posts, search_users and hashtag actions: pass back the next_page_token value from a row of the previous response to fetch the next page; omit it to start from the first page. Each page is one call, billed per request.
sortOptional
Order of the topic's notes: newest puts the latest first (the same as omitting it) and popular puts the most popular first. Keep the same value while paging.
Allowed values:newestpopular

What do the Xiaohongshu trending parameters mean?

See a sample of the notes Xiaohongshu is recommending right now, up to 30, with title, author, image and video flag. The selection changes on every load, and list position neither explains the algorithm nor builds a history.

Full API reference: parameters, code samples, response example and health →

This action has no business parameters. Send only the platform and action identifiers.

How to use the Xiaohongshu API

  1. 01Read the public catalog and choose a platform action.
  2. 02Send the platform, action, and required parameters to POST /api/v1/social.
  3. 03Handle a synchronous result, or poll the returned job ID when the action runs asynchronously.
  4. 04Store the structured response fields needed by your application.
xiaohongshu_search.sh
curl -X POST https://api.everyinfra.com/api/v1/social \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"platform":"xiaohongshu","action":"search","params":{"keyword":"<keyword>"}}'

Xiaohongshu guides

Worked examples and methods built on these actions. Check the current actions, parameters and fields on this page first; an article's examples and limits do not replace the live catalog.

Build

Batch fetching Xiaohongshu comments: from note lists to verifiable results

Step-by-step integration of Xiaohongshu comments_batch: preparing complete note URLs, distinguishing URL count from comment count, identifying partial and missed results, deduplicating by note, and handling empty results, retries, and target billing.

Read the article →
Blog

Beyond Totals in Xiaohongshu Data Analysis: Using Exported Notes and Historical Snapshots

Parse cumulative vs. interval metrics, snapshot dates, bookmark deltas, deduplication, and missing samples from creator exports to avoid cross-temporal and cross-note distortion.

Read the article →
Build

Unified Data API Getting Started: From Capability Catalog to First Available Result

Access multi-platform data using platform, action, and params: read the capability catalog, complete minimal requests, handle asynchronous tasks, partial results, and billing, and establish traceable data records.

Read the article →

Xiaohongshu API questions

What can I retrieve with the Xiaohongshu API?

Set platform to xiaohongshu. The current catalog lists search, profiles, posts by user, note details, video details, and more. These action names identify different Xiaohongshu objects or views; they are not interchangeable search modes.

Does Xiaohongshu have an official API?

Xiaohongshu's official open platforms serve merchants, e-commerce software vendors, mini-program developers and content-sharing partners. Its e-commerce platform exposes product, order, after-sales and logistics data for stores that authorize an app; its published documentation does not describe an API for searching notes or reading other users' notes and comments.

Official sources: Xiaohongshu e-commerce open platform: API permission packages · Xiaohongshu e-commerce open platform · Checked

Do I need a Xiaohongshu developer account or API key?

No. Requests go through EveryInfra with an EveryInfra API key: sign up, create a key in the console and send it as Authorization: Bearer <API_KEY>. You do not register a Xiaohongshu developer app, apply for Xiaohongshu API access or sign in with a Xiaohongshu account, and the actions return public Xiaohongshu data only.

How much does the Xiaohongshu API cost per 1,000 requests?

$5.56 per 1,000 requests, depending on the action; each action's price is listed in the table on this page and in the public catalog. There is no subscription: you top up a USD balance and pay per call, and failed calls and empty results are not charged.

Which input starts a Xiaohongshu `search` request?

Specifies the query string used to search Xiaohongshu note content (e.g., "sensitive skin sunscreen") in the search action. Searches note text, not user IDs. Send it as keyword inside params.

Which fields can Xiaohongshu `search` return?

Its declared schema includes title, text, like_count, and collect_count. A declared field can still be absent from an individual record, and every other action has its own field list.

Does every Xiaohongshu action return immediately?

Actions labeled asynchronous return a job ID you poll. comments_batch runs synchronously only: it reads everything it returns (every target of a batch, or every SKU of a product) within the same call, and a request with "mode": "async" gets a 422 before anything is charged. Every other action can also run asynchronously: add "mode": "async" to the request body to receive a job ID immediately, useful for slow tasks or large limits. The current catalog contains sync delivery.