Call it
curl https://api.peume.com/v1/call/xiaohongshu-comments \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"url": "your url"
}
}'const res = await fetch("https://api.peume.com/v1/call/xiaohongshu-comments", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"url": "your url"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/xiaohongshu-comments",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"url": "your url"
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: xiaohongshu-comments.
Parameters
page_tokenstringPagination 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.
sortstringComment order: default follows the platform's own order (the same as omitting it), newest puts the latest comments first, and most_liked puts the most-liked first. Keep the same value while paging; with a different value, the previous next_page_token no longer applies. default is the platform's recommended order and is re-ranked on every request, so when rankings shift, paging skips or repeats some comments; newest orders by time and pages consistently, though for some notes the platform returns only the most recent part. A page without next_page_token only means the platform reported no next
default · most_liked · newest
urlRequiredstringSpecifies the full Xiaohongshu note URL, formatted as /explore/<note_id> or /discovery/item/<note_id>. Use recent search URLs that retain query parameters like xsec_token. The sub_comments action requires both this url and a valid comment_id.
