POST

API health

24h health
4%
24h average time
27.73 s
  • Healthy / normal
  • Available
  • Limited
  • Mostly down
Mostly down

Last 24 hours

Last 30 days

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.

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

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

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 trending, and put the parameters inside params.
- No required parameters.
- Optional parameters:
  - limit: The most rows to return in this call, an integer from 1 to 30. The default applies when you leave it out, and a call can return fewer rows. Larger values return 422 before any charge. (default: 20)
- Returns a list of records. Main fields of each record: id, url (The record's link on Xiaohongshu), title, author_name, is_video (Whether the note is a video note), image_url.
- Example request body:
{
  "platform": "xiaohongshu",
  "action": "trending",
  "params": {}
}
- 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.
actionbodystringYestrendingCapability identifier, fixed value.
limitbody.paramsinteger (1–30)No20The most rows to return in this call, an integer from 1 to 30. The default applies when you leave it out, and a call can return fewer rows. Larger values return 422 before any charge.

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": "trending",
  "params": {}
}'

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

Response example

#
Captured October 24, 2026 at 18:28 (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": "trending",  "results": [    {      "id": "6ad37038000000001303dfad",      "url": "https://www.xiaohongshu.com/explore/6ad37038000000001303dfad?xsec_token=YCw7qdw4BrTHKOluaOFx0EwfP63jKAwxKU5sUT0tC2PMw%3D",      "title": "厨房早知道这些,我也不至于这么累",      "author_name": "•••",      "is_video": true,      "image_url": "https://sns-na-i1.xhscdn.com/1040g008326e5i15jl6005orjhjv7r9vsbuvdlh0?imageView2/format/jpg/q/90",      "platform": "xiaohongshu"    },    {      "id": "6acb2117000000001802c26a",      "url": "https://www.xiaohongshu.com/explore/6acb2117000000001802c26a?xsec_token=YCVPA9X-3nD0XXBBrhBx0IJp-l-hYVS0W_-p1KoFL9ESc%3D",      "title": "初三 |年级前十的学习好物分享",      "author_name": "•••",      "is_video": true,      "image_url": "https://sns-na-i1.xhscdn.com/1040g00832661cki74a0g5q5enesmfh0el2326gg?imageView2/format/jpg/q/90",      "platform": "xiaohongshu"    }  ],  "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).
author_nameAuthor's display name.
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.
image_urlImage link. Capabilities with several images may return an image_urls array.
platformSource platform identifier, the same as platform in the request (for example xiaohongshu, tiktok).

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

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