MarkdownCopies this page as Markdown, ready to paste into an AI assistant.
RedNote API
6 RedNote endpoints behind one key, priced in credits per call and routed to the cheapest healthy source.
On this page
Social · 6 endpoints · from 7 credits per call
Endpoints
- POSTRedNote (Xiaohongshu) Note
/v1/run/rednote.noteOne RedNote (Xiaohongshu) note by id: title, text, cover, author, engagement counts, location and timestamps.7 creditsper call - POSTRedNote (Xiaohongshu) Note Comments
/v1/run/rednote.note_commentsTop-level comments of a RedNote (Xiaohongshu) note with author, likes, reply counts and timestamps, cursor paged.13 creditsper call - POSTRedNote (Xiaohongshu) Profile
/v1/run/rednote.profileRedNote (Xiaohongshu) creator profile by user id: nickname, RedNote number, bio, follower, like and note counts.7 creditsper call - POSTRedNote (Xiaohongshu) Search
/v1/run/rednote.searchSearch RedNote (Xiaohongshu) notes by keyword, sorted by relevance, popularity or time, cursor paged.13 creditsper call - POSTRedNote (Xiaohongshu) User Notes
/v1/run/rednote.user_notesNotes posted by a RedNote (Xiaohongshu) user, with cover, engagement counts and timestamps, cursor-paged.13 creditsper call - POSTRedNote (Xiaohongshu) User Search
/v1/run/rednote.search_usersSearch RedNote (Xiaohongshu) users by keyword and get normalised user records with RedNote number, bio and verification.13 creditsper call
Calling them
Every endpoint on this page is one POST to https://api.primaryapi.com/v1/run/{sku} with your API key and a JSON body. Responses share one envelope, so code written for one endpoint handles the others. For example, rednote.note:
curl -sS -X POST "https://api.primaryapi.com/v1/run/rednote.note" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"noteId":"69e71b110000000022029e5e"}'const res = await fetch('https://api.primaryapi.com/v1/run/rednote.note', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.PRIMARYAPI_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
noteId: '69e71b110000000022029e5e',
}),
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.code}: ${body.error}`);
// found:false is a successful answer ("does not exist"), not an error
console.log(body.output.found ? body.output.data : body.output.reason, body.credits);import os
import requests
res = requests.post(
"https://api.primaryapi.com/v1/run/rednote.note",
headers={"Authorization": f"Bearer {os.environ['PRIMARYAPI_API_KEY']}"},
json={
"noteId": "69e71b110000000022029e5e",
},
timeout=60,
)
body = res.json()
if not res.ok:
raise RuntimeError(f"{body['code']}: {body['error']}")
# found=False is a successful answer ("does not exist"), not an error
print(body["output"]["data"] if body["output"]["found"] else body["output"]["reason"], body["credits"])New to PrimaryAPI? Start with the Quickstart, then read Making requests.