Answers / Xiaohongshu (RedNote)

How do I retrieve notes published by a Xiaohongshu (RedNote) creator via API?

Call GET /v1/xiaohongshu/user_posts?username=USER_ID with your API key. Pass the 24-character user ID from the creator's profile page URL. PostToData returns recent published notes with titles, cover images, like counts, and direct note links.

Xiaohongshu (RedNote) · user posts · $0.03 a call · one verified website trial · updated 2026-11-13

Run it live

Calls run only when you press Run. Opening this page does not spend credit.

Loading…

Your results will appear here. Choose a platform and action, then press Run.

Real API calls require verification for one trial, or a signed-in account with prepaid credit.

From code

curl
curl "https://posttodata.com/v1/xiaohongshu/user_posts?username=5ebf5ce4000000000101e9bf&limit=5" -H "Authorization: Bearer YOUR_API_KEY"
Python (requests)
import requests

r = requests.get(
    "https://posttodata.com/v1/xiaohongshu/user_posts",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    params={"username": "5ebf5ce4000000000101e9bf", "limit": 5},
)
for item in r.json()["data"]["items"]:
    print(item["url"], item.get("text") or item.get("title"))
TypeScript / Node.js
const url = new URL("https://posttodata.com/v1/xiaohongshu/user_posts");
url.searchParams.set("username", "5ebf5ce4000000000101e9bf");
url.searchParams.set("limit", "5");
const res = await fetch(url, {
  headers: { "Authorization": "Bearer YOUR_API_KEY" }
});
const data = await res.json();
console.log(data.data.items);
Go
req, _ := http.NewRequest("GET", "https://posttodata.com/v1/xiaohongshu/user_posts?username=5ebf5ce4000000000101e9bf&limit=5", nil)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

From your AI

Claude and ChatGPT clients that support OAuth can sign in without pasting a key. Follow the client setup guide. The command below is the API-key option for Claude Code.

Add the MCP server once
claude mcp add --transport http posttodata https://posttodata.com/mcp --header "Authorization: Bearer YOUR_API_KEY"

Then ask

“Fetch recent notes from Xiaohongshu creator ID 5ebf5ce4000000000101e9bf using PostToData and summarize their top content pillars.”

The model calls get_user_posts with platform xiaohongshu.

Response Schema & Data Sample

Normalized JSON output structure returned by PostToData. All fields are strongly typed; missing upstream metrics return null rather than being omitted.

200 OK — JSON Response
{
  "meta": {
    "platform": "xiaohongshu",
    "action": "user_posts",
    "total_items": 1,
    "currency": "USD",
    "price_usd": "0.03"
  },
  "data": {
    "items": [
      {
        "id": "5ebf5ce4000000000101e9bf",
        "type": "post",
        "url": "https://xiaohongshu.com/discovery/item/example_id",
        "published_at": "2026-11-15T12:00:00Z",
        "title": "5ebf5ce4000000000101e9bf insights & discussion",
        "text": "Structured body content retrieved from the public social post, ready for AI indexing or sentiment analysis.",
        "author": {
          "id": "creator_01",
          "username": "5ebf5ce4000000000101e9bf",
          "name": "Creator",
          "url": null
        },
        "metrics": {
          "likes": 215,
          "comments": 34,
          "shares": 12,
          "views": 5400,
          "score": null
        }
      }
    ]
  }
}

Good to know

  • User post calls list at $0.03 per call.
  • Must use the creator's 24-character hexadecimal user ID from their web profile URL.
  • Returns titles, cover image URLs, like counts and note permalinks.

Full reference in the docs. All Xiaohongshu (RedNote) endpoints are on the Xiaohongshu (RedNote) API page.

More answers