POST

API health

24h health
99%
24h average time
3.84 s
  • Healthy / normal
  • Available
  • Limited
  • Mostly down
Healthy

Last 24 hours

Last 30 days

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

Send POST https://api.everyinfra.com/api/v1/social with platform set to xiaohongshu and action set to search. 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.

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, 7 days, month, six months or year; any_time for no limit) 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.

AI prompt

#
Please help me write a data collection script with the EveryInfra Xiaohongshu Search endpoint (xiaohongshu/search).

How the endpoint works:
- 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: any_time (no limit, the same as omitting it), last_24_hours (the past 24 hours), last_7_days (the past 7 days), last_30_days (the past month), last_6_months (the past six months) or last_1_… (allowed: any_time / last_1_year / last_24_hours / last_30_days / last_6_months / 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); 29 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

#
NameInTypeRequiredDefaultDescription
AuthorizationheaderstringYes-Bearer followed by your API key. Create it in the console; never put it in a URL or a code repository.
platformbodystringYesxiaohongshuPlatform identifier, fixed value.
actionbodystringYessearchCapability identifier, fixed value.
keywordbody.paramsstringYes-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_typebody.paramsstring (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_rangebody.paramsstring (enum)No-Filters notes by publish time: any_time (no limit, the same as omitting it), last_24_hours (the past 24 hours), last_7_days (the past 7 days), last_30_days (the past month), last_6_months (the past six months) or last_1_year (the past year). With last_30_days and last_1_year a page can hold fewer than 20 notes, and a page with none is not charged; add sort=newest for fuller pages. These two values work in synchronous calls only. Keep the same value while paging.Allowed valuesany_timelast_1_yearlast_24_hourslast_30_dayslast_6_monthslast_7_days
page_tokenbody.paramsstringNo-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.
sortbody.paramsstring (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

#
bash
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.
json
{  "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.

FieldMeaning
idThe record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms.
urlThe 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. Note links from pgy_content_square carry a token, except with keyword, where they carry none.
titleTitle. null when the platform has no titles (for example text-only posts).
textNote 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_countLike 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_countSave 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_countComments. null means not disclosed, not 0.
share_countShares. null means not disclosed, not 0.
posted_atPublish 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_urlImage link. Capabilities with several images may return an image_urls array.
author_nameAuthor's display name.
author_idThe 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_urlAvatar image link. Some platforms return sized CDN links that can expire.
author_urlThe 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_videoWhether 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_tokenPage 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_urlVideo 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_secVideo length in seconds. null for image notes or when it was not returned this time.
duration_secondsDuration in seconds. null for content that is not video or audio.
platformSource platform identifier, the same as platform in the request (for example xiaohongshu, tiktok).
poi_idID of the place tagged on the search result card (search); absent when no place is tagged.
poi_namePlace name: on search, the place tagged on the result card; on note_location, the part of the note's tagged place after the dot, such as a café branch. Absent when no place, or several places, are tagged.
imagesImage 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_noteWhether the note is a shoppable note that carries product links (search, user_posts).
is_cooperation_noteWhether the note is a paid brand collaboration (search, note); absent when this could not be determined.
author_is_verifiedKeeps the platform's own meaning
updated_atKeeps the platform's own meaning
author_red_idThe author's Xiaohongshu ID: on comment results (comments, comments_batch, sub_comments) the commenter's, on note the note author's.
video_widthKeeps the platform's own meaning
video_heightKeeps 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.
402
Insufficient balance. Top up first.
422
Invalid parameter name or value. Fix it using the suggestions in the error. No charge.
429
Per-minute request limit reached. Wait for Retry-After, then try again.
503
Could not complete. The held charge is returned to your balance. If the outcome is unknown, verify it before you retry.
200 empty
No data. No charge.

Errors

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

Our own visit stats are always on. Google Analytics loads only if you choose “Allow analytics”. Privacy policy