Xiaohongshu (RedNote) search API: find a topic's posts, read them in full and rank them by engagement in one call
Short answer: POST /api/v1/search with a topic, platform: "xiaohongshu" and digest: true searches the topic, reads every post it found (caption, text in the images, the video's speech, the top comments on the page), writ
Short answer: POST /api/v1/search with a topic, platform: "xiaohongshu" and digest: true searches the topic, reads every post it found (caption, text in the images, the video's speech, the top comments on the page), writes a comparison, and returns the posts ranked hottest first. A result that will not read is skipped free and replaced by the next one. One measured run below: four posts on ้ฒ่ฅ่ฃ
ๅค ๆจ่ (camping gear), 7 credits.
Disclosure: LinkDigest is the author's own service. The numbers are from a run on the author's account on 2026-10-30; third-party notes are described by type, not quoted.
One call: search, read, rank
curl -X POST https://linkdigest.dev/api/v1/search \
-H "Authorization: Bearer ld_live_..." \
-H "Content-Type: application/json" \
-d '{"query": "้ฒ่ฅ่ฃ
ๅค ๆจ่", "platform": "xiaohongshu", "limit": 4, "digest": true}'
digest: true turns the results into a batch: each post is read in full and a comparison is written across them. The call answers 202 with a batch_id; poll the batch until it is done:
import requests, time
KEY = "ld_live_..."
H = {"Authorization": f"Bearer {KEY}"}
r = requests.post("https://linkdigest.dev/api/v1/search", headers=H, json={
"query": "้ฒ่ฅ่ฃ
ๅค ๆจ่", "platform": "xiaohongshu", "limit": 4, "digest": True}).json()
batch = r["batch"]
while batch["status"] != "done":
time.sleep(15)
batch = requests.get(f"https://linkdigest.dev/api/v1/digest/batch/{r['batch_id']}", headers=H).json()
for row in batch["ranked"]: # hottest first
print(row["rank"], row["heat"], row["likes"], row["collects"], row["comments"], row["title"])
print(batch.get("note_zh")) # says so when a result was replaced
How heat is scored
heat = likes + 2 ร saves + comments. Saves count double because a save means the reader plans to come back; for topic research that says more about usefulness than a like does. The numbers are a snapshot at read time.
The run on ้ฒ่ฅ่ฃ ๅค ๆจ่, four posts read (two of them had been read before by someone, so they came from the cache at no charge):
| Rank | Heat | Likes | Saves | Comments | Kind of post |
|---|---|---|---|---|---|
| 1 | 461 | 142 | 157 | 5 | Essentials checklist |
| 2 | 247 | 76 | 85 | 1 | Beginner's gear list |
| 3 | 201 | 70 | 65 | 1 | Beginner's gear list |
| 4 | 104 | 37 | 27 | 13 | Camping abroad, what you need |
The top three are all list posts, and the top two were saved more often than they were liked: readers keep them to shop from. Number four has the lowest heat and by far the most comments, which is a reason to open its comment section on its own.
Results that will not read are replaced
Web search often returns Xiaohongshu links without the share token the app adds, and some of those notes refuse to open. The search keeps a few extra results in reserve: a result that will not read is skipped and not charged, and the next one takes its place until the batch has the number you asked for. In the response:
-
skippedon an item: it was replaced (it still counts infailed, sodone + failed === totalholds); -
reserve_left: how many spare results remain; -
note_zh: a one-line note, for example "read 4; 1 would not read โฆ replaced by the next result, not charged".
Honestly: some topics have only two or three notes in the web index (ๅคงๅบๆฐๅ่ฅ ้ฃ่ฐฑ returned 3 in the same session), and then there is nothing to swap in.
Where a read failed, the API tells you
GET /api/v1/usage carries failed: the key's last 10 links that did not read, each with the reason and the fix (for example "share the note from the app; a link with its token reads"). A failed read is never charged, and the record is kept 30 days.
From an agent
claude mcp add --transport http linkdigest https://linkdigest.dev/mcp \
--header "Authorization: Bearer ld_live_..."
In Claude Code or Cursor, ask for "the camping-gear notes on Xiaohongshu, read and ranked by heat": the agent calls search_links with digest: true, then compare_links for the comparison and the ranking. The same works for Douyin with platform: "douyin".
What it cost
The run above was 7 credits: 4 for a search that found posts on Xiaohongshu or Douyin, 1 for each of the two posts read fresh, 1 for the comparison; the two cached posts were free. Sign-up comes with 10 credits, no card; after that ยฅ9.9 by Alipay for 50 credits or ยฅ36 for 250, or $1.50 / $5 by card, one-time and never expiring. A search that finds nothing is free.
Related
Xiaohongshu and Douyin platform pages ยท the search endpoint in the API docs ยท Xiaohongshu / RedNote API ยท Dozens of links on one page ยท A daily brief for a topic ยท ไธญๆ๏ผๅฐ็บขไนฆ่ฏ้ขไธๆฌก่ฐ็จ๏ผๆ็ดขใ่ฏปๅฎใๆ็ญๅบฆๆๅบ็ญๆฆ
Originally published at https://linkdigest.dev/blog/xiaohongshu-search-api-hottest-posts
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes โ full credit and traffic to the original publisher.