Notes and media
Parse URLs, retrieve rich note details, inspect image/video/music availability, and combine detail with one comment page.
/note/detail_from_url
Available on RapidAPI
Structured public Xiaohongshu data for note, media, comment, and author workflows. Normalized responses, real cursor pagination, and request-level traceability.
Quick start
Subscribe on RapidAPI, keep the key on your server, and use a current public note URL containing its matching xsec_token.
curl --request GET \
--url 'https://xhs-data-api.p.rapidapi.com/note/detail_from_url?url=PUBLIC_NOTE_URL' \
--header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
--header 'X-RapidAPI-Host: xhs-data-api.p.rapidapi.com'
import os
import requests
response = requests.get(
"https://xhs-data-api.p.rapidapi.com/note/detail_from_url",
headers={
"X-RapidAPI-Key": os.environ["X_RAPIDAPI_KEY"],
"X-RapidAPI-Host": "xhs-data-api.p.rapidapi.com",
},
params={"url": os.environ["XHS_NOTE_URL"]},
timeout=45,
)
response.raise_for_status()
note = response.json()["data"]["note"]
const params = new URLSearchParams({
url: process.env.XHS_NOTE_URL,
});
const response = await fetch(
`https://xhs-data-api.p.rapidapi.com/note/detail_from_url?${params}`,
{ headers: {
"X-RapidAPI-Key": process.env.X_RAPIDAPI_KEY,
"X-RapidAPI-Host": "xhs-data-api.p.rapidapi.com",
}},
);
const { data } = await response.json();
RapidAPI supplies the gateway headers. No additional backend API key is required.
Endpoint coverage
Use small composable endpoints for interactive requests, or sequential asynchronous jobs for larger imports.
Parse URLs, retrieve rich note details, inspect image/video/music availability, and combine detail with one comment page.
/note/detail_from_url
Read normalized top-level comments with resource-bound cursors and duplicate protection across a valid chain.
/note/comments_from_url
Retrieve identity-bound profiles, cursor-paginated published notes, combined overviews, and coverage-aware metrics.
/user/overview_from_url
Use synchronous partial-result batches or submit up to 50 URLs to a durable, sequential asynchronous worker.
/note/async_batch_detail_from_url
Integration workflows
Parse a complete public note or author URL before an upstream fetch. Keep current signed note URLs out of source control.
GET /note/parse_url
Use the detail, media, profile, or overview endpoint that matches the job. Optional missing fields remain null, never fabricated zeroes.
GET /note/detail_from_url
Start without a cursor, then pass the exact data.next_cursor while keeping the original resource unchanged.
data.has_more
Honor Retry-After, retry the same cursor after temporary failures, and include data.request_id with support requests.
data.request_id
Response contract
Success and failure responses remain machine-readable. Sensitive provider state, cookies, credentials, and request headers are never included in raw output.
Read the full endpoint documentation{
"code": 200,
"msg": "success",
"data": {
"request_id": "support-id",
"cursor": null,
"next_cursor": "service-issued-cursor",
"has_more": true,
"count": 10,
"items": []
}
}
Know before shipping
The API preserves uncertainty so client applications can make honest decisions about upstream coverage.
Note detail and comment requests need a current public URL with its matching xsec_token.
Signed media URLs and public-link tokens can expire. Use them promptly and refresh when needed.
null means the upstream source did not provide a field. It must not be interpreted as zero.
This public version focuses on stable note and author workflows. Note search and child-comment replies are not advertised.
Developer guides
Short, copy-ready walkthroughs for the integration paths that require the most care.
Validate a URL, request normalized detail, and interpret missing fields correctly.
Read guide PaginationUse resource-bound cursors, deduplicate IDs, and recover from retryable timeouts.
Read guide Batch jobsSubmit up to 50 URLs, poll responsibly, and preserve partial results.
Read guide