Xiaohongshu Search API
API health
- 24h health
- 100%
- 24h average time
- 4.27 s
- Healthy / normal
- Available
- Limited
- Mostly down
Last 24 hours
Last 30 days
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.
Xiaohongshu Search looks up notes by keyword and returns one page of note cards: title, a short excerpt of the body, like and save counts, the author and the publish time. Video notes also carry the play link in video_url and the length in duration_sec, and cards tagged with a place carry poi_name. It shows what people are posting about a topic right now and which notes draw the most engagement, which makes it a starting point for trend research, brand monitoring and finding creators to work with.
Narrow the page with sort (newest, most liked, most commented or most saved), date_range (the last 24 hours or 7 days) and content_type (image or video notes). Keep in mind that text in search results is an excerpt; pass the result's url to the Note details capability when you need the full body. A null like_count or collect_count means the value was not returned this time, not that it is zero.
Price $5.56 per 1,000 requests ($0.005556 per call). Failed calls and empty results are not charged. Synchronous. For slow jobs add "mode": "async" to the body, take the job_id and poll.
AI prompt
Paste this into your AI assistant. It already holds this endpoint's parameters, response fields and an example request, so the assistant can ask what you need and then write the scraper.
Please help me write a data collection script with the EveryInfra Xiaohongshu Search endpoint (xiaohongshu/search).
Endpoint contract:
- Request: POST https://api.everyinfra.com/api/v1/social with the header Authorization: Bearer <API key>. Read the key from the EVERYINFRA_API_KEY environment variable and never hard-code it.
- In the request body, set platform to xiaohongshu and action to search, and put the parameters inside params.
- Required parameters:
- keyword: 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.
- Optional parameters:
- content_type: Filters returned notes by content type, such as image/text or video. Use the allowed values listed for the current action. (allowed: all / image / video)
- date_range: 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: last_24_hours / last_7_days)
- page_token: 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.
- sort: 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: most_collected / most_commented / most_liked / newest / relevance)
- Returns a list of records. Main fields of each record: id, url (The record's link on Xiaohongshu), title, text (Note body or comment text), like_count (Like count), collect_count (Save count), comment_count, share_count, posted_at, image_url, author_name, author_id (The author's user ID); 24 fields in total, full list at https://api.everyinfra.com/api/v1/social/catalog?platform=xiaohongshu.
- Example request body:
{
"platform": "xiaohongshu",
"action": "search",
"params": {
"keyword": "小户型收纳"
}
}
- Price: $5.56 per 1,000 requests; failed and empty results are not charged.
- For dozens or hundreds of targets, add "mode": "async" to the body: you get a job_id at once and poll GET https://api.everyinfra.com/api/v1/jobs/{job_id} for the result.
- On 422, fix the request using the suggested parameter names and allowed values in the error; on 429 or 503, wait for Retry-After and try again.
Before writing code, ask me which targets I need, how many, which fields, and what output format I want; then confirm the plan and the rough cost with me.Request parameters
| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
Authorization | header | string | Yes | - | Bearer followed by your API key. Create it in the console; never put it in a URL or a code repository. |
platform | body | string | Yes | xiaohongshu | Platform identifier, fixed value. |
action | body | string | Yes | search | Capability identifier, fixed value. |
keyword | body.params | Not declared | Yes | - | 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_type | body.params | enum | No | - | Filters returned notes by content type, such as image/text or video. Use the allowed values listed for the current action.Allowed valuesallimagevideo |
date_range | body.params | enum | No | - | 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 valueslast_24_hourslast_7_days |
page_token | body.params | Not declared | No | - | 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. |
sort | body.params | enum | No | - | 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 valuesmost_collectedmost_commentedmost_likednewestrelevance |
Code samples
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
-H "Authorization: Bearer $EVERYINFRA_API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{
"platform": "xiaohongshu",
"action": "search",
"params": {
"keyword": "小户型收纳"
}
}'[OpenAPI definition (JSON)]Samples read the key from the EVERYINFRA_API_KEY environment variable; copied code never contains your key.
Response example
Captured October 15, 2026 at 15:15 (UTC) by calling this API with the parameters in the code sample above. results and count are that call's real response with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2. id, billing and quota differ on every call, so only their shape is shown.
{
"id": "req_…",
"platform": "xiaohongshu",
"action": "search",
"results": [
{
"id": "6a55fff400000000110058c3",
"url": "https://www.xiaohongshu.com/explore/6a55fff400000000110058c3?xsec_token=YBwgl4W48szr36c1jFWrf2WWLLGDKYfA5rrXQivgGAj1A%3D",
"title": "抽屉乱救星!亚克力薄抽治愈收纳焦虑|附教程",
"text": "我发现这种又薄、还自带分隔的亚克力薄抽,简直就是为收纳小工具小零件而生的。今天就来分享详细的改造教程,评论区等你们交作业",
"like_count": 10388,
"collect_count": 19173,
"comment_count": 257,
"share_count": 2323,
"posted_at": "2026-07-14T09:23:00+00:00",
"image_url": "https://sns-na-i6.xhscdn.com/1040g2sg322jlesv1mse043d8j25m1nmqtti8mog?imageView2/2/w/608/format/heif/q/56|imageMogr2/strip&redImage/frame/0/enhance/4&ap=5&sc=SRH_PRV&sign=b642658d19400d337f2d5296494687c7&t=6ad0ee01",
"author_name": "(已隐去)",
"author_id": "(已隐去)",
"avatar_url": "https://sns-avatar-qc.xhscdn.com/(已隐去)",
"author_url": "https://www.xiaohongshu.com/(已隐去)",
"is_video": true,
"next_page_token": "n1.p2",
"video_url": "http://sns-video-v6.xhscdn.com/stream/79/110/258/01ea55fdf56356a44f0370019f5ff0eb8f_258.mp4?sign=734255c44c5f43e96d8b4a12707707a8&t=6ad58b41",
"duration_sec": 124,
"platform": "xiaohongshu"
},
{
"id": "6ac221730000000015002ebb",
"url": "https://www.xiaohongshu.com/explore/6ac221730000000015002ebb?xsec_token=YBPVyCh77T_2_QF6CFfJ2TiJ8GngzcLJj_Iho466OzP5o%3D",
"title": "鬼才🔥3平开放式小厨房超实用设计!",
"text": "#家的1%幸福效应 #howto装扮我的家 #适己化装修 #小户型也有完美厨房 #开放式厨房 #利用厨房空间",
"like_count": 38783,
"collect_count": 30796,
"comment_count": 1021,
"share_count": 6986,
"posted_at": "2026-10-04T09:50:43+00:00",
"image_url": "https://sns-na-i6.xhscdn.com/1040g008325t8oj9j4q005pl7le7nc96up4p8rk8?imageView2/2/w/608/format/heif/q/56|imageMogr2/strip&redImage/frame/0/enhance/4&ap=5&sc=SRH_PRV&sign=ee3e432a917938b82ba55751f30a860e&t=6ad0ee01",
"author_name": "(已隐去)",
"author_id": "(已隐去)",
"avatar_url": "https://sns-avatar-qc.xhscdn.com/(已隐去)",
"author_url": "https://www.xiaohongshu.com/(已隐去)",
"is_video": true,
"next_page_token": "n1.p2",
"video_url": "http://sns-video-v6.xhscdn.com/stream/1/110/258/01eac221721521f001037001a106536b1a_258.mp4?sign=e98d44d7b6f666dc2c4e841655d8c578&t=6ad58b41",
"duration_sec": 189,
"platform": "xiaohongshu",
"poi_id": "42303030413832584538"
}
],
"next_page_token": …,
"pagination": { … },
"count": 20,
"billing": {
"charged": …,
"charged_usd": …,
"balance_after_usd": …,
…
},
"quota": { … }
}Response fields
Business data is in results. The table lists the fields a record can contain; values the platform does not show are never made up.
| Field | Meaning |
|---|---|
id | The record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms. |
url | The record's link on Xiaohongshu. Links from search, note, profile and hashtag usually carry an access token, so they open in a signed-out browser (the token expires; call again for a fresh link). Note links from user_posts carry no token and need one to open in a browser: call note with the note ID to get a link that opens. Profile links from search_users carry no token either; call profile with the user_id for one that opens. |
title | Title. null when the platform has no titles (for example text-only posts). |
text | Note body or comment text. note and hashtag return the full body; search and user_posts may return a truncated excerpt (up to about 60 and 100 characters respectively). Call note with the note ID for the full text. |
like_count | Like count. On note and comment results, the likes on that item; on profile, the total likes the account's notes have received. null means not public or not returned this time, not zero. |
collect_count | Save count. On note results, how many times that note was saved; on profile, the total saves across the account's notes. null means not public or not returned this time, not zero. |
comment_count | Comments. null means not disclosed, not 0. |
share_count | Shares. null means not disclosed, not 0. |
posted_at | Publish time in ISO 8601, UTC (for example 2026-08-07T12:34:56+00:00). Non-standard strings from the platform are passed through as is, so parse defensively. null means the platform does not disclose it. |
image_url | Image link. Capabilities with several images may return an image_urls array. |
author_name | Author's display name. |
author_id | The author's user ID. Pass it to profile or user_posts. Note results carry the 24-character ID from profile URLs; comment results (comments, comments_batch, sub_comments) usually carry a different 29-character form. The two forms of one person do not match, so convert them with the user_id that profile returns before de-duplicating across batches. |
avatar_url | Avatar image link. Some platforms return sized CDN links that can expire. |
author_url | The author's profile link. It carries no access token, so a signed-out browser cannot open it; the url that profile returns for the author_id opens directly. |
is_video | Whether the note is a video note. The play URL is NOT part of the note detail response (since 2026-10-14): call the separate video action with the same note URL to fetch it; each call is billed per call. |
next_page_token | Page token (search, comments, sub_comments, user_posts, search_users, hashtag): pass it back unchanged as page_token, with the other parameters the same, to fetch the next page. |
video_url | Video playback link (MP4), signed and expiring; download promptly if you need to keep it. null for image notes or when not returned. It appears on search/user_posts rows and in the separate video action; the note detail does not carry it (since 2026-10-14) — call the video action with the same note URL when you need the play link. |
duration_sec | Video length in seconds. null for image notes or when it was not returned this time. |
duration_seconds | Duration in seconds. null for content that is not video or audio. |
platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |
poi_id | ID of the place tagged on the search result card (search); absent when no place is tagged. |
poi_name | Name of the place tagged on the search result card (search). |
images | Image links. On note, hashtag, search and user_posts, every image of the note in order. On comment results (comments, comments_batch, sub_comments), the images attached to the comment, stickers included; an empty array means none. null means this item was not returned this time. |
is_goods_note | Whether the note is a shoppable note that carries product links (search, user_posts). |
author_is_verified | Keeps the platform's own meaning |
FAQ
Why is the note text cut short?
Search results carry the excerpt Xiaohongshu shows on its result cards, usually a few dozen characters. For the full body and every image, call Note details with the url from the result row; that link already carries the access token the note page needs.
How do I get the next page?
Pass the top-level next_page_token from the response back as page_token and keep every other parameter the same. Leaving out page_token starts from the first page. Each page is one call, and a call that returns no rows is not charged.
Where do I get the video for a video note?
Take video_url from the search row. It is an MP4 play link that is signed and expires, so download the file promptly if you need to keep it; duration_sec gives its length, and image notes leave both null. Note details does not return the play link, so if you only have a note link, call Video details with it.
Errors and billing
- 401
- Missing or invalid key. Authentication runs before parameter checks, so unauthenticated requests never see the parameter schema.
- 422
- Wrong parameter name or value. The error lists the parameters and allowed values this capability accepts and the closest match; it happens before any charge.
- 402
- Insufficient balance. Top up first.
- 429
- The account's per-minute request limit was reached (all of its API keys count together; a key's own lower limit applies first). Wait for Retry-After and try again; a rate package in the console raises the limit.
- 503
- Could not complete right now. Any charge for the call goes back to your balance automatically, and the billing receipt in the response states the actual outcome, including when it is not yet known. Do not resend blindly.
- 200 empty
- The request completed without data and is not charged (billing.reason = empty_result_refunded).
Official references
Used only to check objects and terms. They do not imply authorization or endorsement of EveryInfra by the platform.
- 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 2026-09-04