Xiaohongshu Posts by user API

POST

API health

24h health
Normal
24h average time
—
  • Healthy / normal
  • Available
  • Limited
  • Mostly down
Normal

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.

Xiaohongshu Posts by user lists the notes one account has published, given its user_id: title, a body excerpt, cover image, like, save, comment and share counts, and the publish time, plus a playback link and length for video notes. Use it to see what a creator has been posting and which formats perform, when you shortlist creators, watch competitor accounts or check an account before a campaign.

user_id is the ID after /user/profile/ in the profile link; the full profile URL or an author_id from comment or search results also works, but a nickname does not. text here is an excerpt and url carries no access token, so call Note details with the note ID for the full body and a link that opens in a browser. video_url is signed and expires, so download what you need to keep.

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 Posts by user endpoint (xiaohongshu/user_posts).

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 user_posts, and put the parameters inside params.
- Required parameters:
  - user_id: 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.
- Optional parameters:
  - 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.
- 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); 23 fields in total, full list at https://api.everyinfra.com/api/v1/social/catalog?platform=xiaohongshu.
- Example request body:
{
  "platform": "xiaohongshu",
  "action": "user_posts",
  "params": {
    "user_id": "5bec178863f51f0001859bd9"
  }
}
- 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.
actionbodystringYesuser_postsCapability identifier, fixed value.
user_idbody.paramsNot declaredYes-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_tokenbody.paramsNot declaredNo-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.

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": "user_posts",
  "params": {
    "user_id": "5bec178863f51f0001859bd9"
  }
}'

[OpenAPI definition (JSON)]Samples read the key from the EVERYINFRA_API_KEY environment variable; copied code never contains your key.

Response example

Field preview

There is no real sample for these example parameters yet: this shows the response shape and fields from the contract, with … as placeholders. It is not the result of a real call.

json
{
  "id": "req_…",
  "platform": "xiaohongshu",
  "action": "user_posts",
  "results": [
    {
      "id": …,
      "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": …
    }
  ],
  "next_page_token": …,
  "pagination": { … },
  "count": …,
  "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.
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).
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_pinnedWhether the note is pinned to the top of the author's profile (user_posts). Pinned notes come first, so leave them out when you analyze by publish date.
ip_locationIP location (province or country) that Xiaohongshu displays; not entered by the user. Only some user_posts rows carry it.

FAQ

Where do I find the user_id?

Open the creator's profile: the ID is the string after /user/profile/ in the link. You can also pass the full profile URL, or an author_id from comment or search results. Nicknames cannot identify an account.

Why don't the note links open in a browser?

Note links from this capability carry no access token, so a signed-out browser cannot open them. Call Note details with the note ID to get a url that opens, along with the full body of the note.

How do I read every note from an account?

Each call returns one page. Pass the top-level next_page_token from the response back as page_token to get the next page, until the response has no next_page_token. Every page is a separate call, so plan for accounts with long histories.

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).