Xiaohongshu API Open in RapidAPI

200 free requests each month

Xiaohongshu (RedNote) Data API

Structured public note details, media, top-level comments, and verified author profiles. Normalized JSON, duplicate-safe cursor pagination, and request-level traceability.

18
public endpoints
200
free requests monthly
50
URLs per async batch

Quick start

One request to normalized note data

Subscribe on RapidAPI, keep the key on your server, and use a current public note URL containing its matching xsec_token. Validate a URL and generate this request locally.

curl --request GET \
  --url 'https://xiaohongshu-rednote-data-api.p.rapidapi.com/note/detail_from_url?url=PUBLIC_NOTE_URL' \
  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
  --header 'X-RapidAPI-Host: xiaohongshu-rednote-data-api.p.rapidapi.com'
import os
import requests

response = requests.get(
    "https://xiaohongshu-rednote-data-api.p.rapidapi.com/note/detail_from_url",
    headers={
        "X-RapidAPI-Key": os.environ["X_RAPIDAPI_KEY"],
        "X-RapidAPI-Host": "xiaohongshu-rednote-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://xiaohongshu-rednote-data-api.p.rapidapi.com/note/detail_from_url?${params}`,
  { headers: {
      "X-RapidAPI-Key": process.env.X_RAPIDAPI_KEY,
      "X-RapidAPI-Host": "xiaohongshu-rednote-data-api.p.rapidapi.com",
  }},
);
const { data } = await response.json();

RapidAPI supplies the gateway headers. No additional backend API key is required.

Endpoint coverage

Focused public-data primitives

Use small composable endpoints for interactive requests, or sequential asynchronous jobs for larger imports.

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

Comments

Read normalized top-level comments with resource-bound cursors and duplicate protection across a valid chain.

/note/comments_from_url

Verified authors

Retrieve identity-bound public profiles by ID or URL, parse profile URLs locally, and process up to five authors with partial results.

/user/profile_from_url

Batch processing

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

Built for predictable continuation

  1. 01

    Validate the resource

    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
  2. 02

    Request normalized data

    Use the detail, media, comments, or profile endpoint that matches the job. Optional missing fields remain null, never fabricated zeroes.

    GET /note/detail_from_url
  3. 03

    Continue with returned cursors

    Start without a cursor, then pass the exact data.next_cursor while keeping the original resource unchanged.

    data.has_more
  4. 04

    Trace and recover

    Honor Retry-After, retry the same cursor after temporary failures, and include data.request_id with support requests.

    data.request_id

Response contract

Useful errors, stable envelopes

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

Source-aware by design

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, author-post feeds, and child replies are not advertised.

XHS Data API logo

200 free requests per month

Test all 18 endpoints in the RapidAPI Playground

Start free