# Rednote (Xiaohongshu) Note Detail Scraper (`khadinakbar/xiaohongshu-note-detail-scraper`) Actor

Scrape public Xiaohongshu (RedNote / 小红书) note details from note URLs or IDs — title, description, images/video URLs, likes, collects, comments, shares, author, tags. Cookieless; no Xiaohongshu login required. MCP-ready.

- **URL**: https://apify.com/khadinakbar/xiaohongshu-note-detail-scraper.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** Social media, Automation, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $250.00 / 1,000 xiaohongshu note detail scrapeds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Xiaohongshu Note Detail Scraper

Turn a public Xiaohongshu (RedNote / 小红书) note URL, share link, or 24-character note ID into **one structured note-detail row**. You get title, description, image and video CDN URLs, like/collect/comment/share counts, author profile, tags, and location when the public page exposes them. No Xiaohongshu login or cookies.

This Actor is built for brand analysts, China-market researchers, and AI agents that already have a note link and need a predictable public creative payload before they scrape comments or run search.

### Best fit for this Actor

- Enrich a known list of Xiaohongshu note URLs with engagement counts and media URLs.
- Qualify a RedNote creative before pulling the comment thread.
- Feed MCP or CRM workflows with one row per public note.

### Practical scenario

A social-listening analyst pastes `https://www.xiaohongshu.com/explore/69afda73000000002800b3f2?xsec_token=YOUR_XSEC_TOKEN`, sets `maxNotes` to `1`, and starts the run. The dataset returns title, body, media CDN URLs, likes/collects/comments/shares, author name, and tags. A deleted note finishes `SUCCEEDED` with `VALID_EMPTY` and no `note-scraped` charge. Notes that clear the engagement bar can then be sent to the comments sibling.

### Quick start input

```json
{
  "noteUrls": [
    "https://www.xiaohongshu.com/explore/69afda73000000002800b3f2?xsec_token=YOUR_XSEC_TOKEN"
  ],
  "maxNotes": 1
}
```

`noteUrls` accepts explore, discovery/item, profile/note URLs, `xhslink.com` / `xhslink.cn` share links, and bare 24-character note IDs. Prefer Share → Copy link URLs that include `xsec_token`.

### Input reference

| Field | Type | What it controls |
|---|---|---|
| `noteUrls` | array (required) | Public note URLs, share links, or note IDs. Max 50 values. |
| `maxNotes` | integer | Hard cap on saved rows. Default 20. Prefill 1 keeps quality tests fast. |

### What data you receive

One dataset item is one public note.

```json
{
  "noteId": "69afda73000000002800b3f2",
  "title": "关于打击AI托管运营账号的治理公告",
  "likedCount": 6088,
  "collectedCount": 1269,
  "commentCount": 1700,
  "shareCount": 9919,
  "authorName": "薯管家",
  "noteType": "normal",
  "provider": "zen-studio",
  "scrapedAt": "2026-09-10T13:16:26.000Z"
}
```

| Field | Meaning |
|---|---|
| `title` + `description` | Public title and body |
| `likedCount` / `collectedCount` / `commentCount` / `shareCount` | Public engagement counters |
| `imageUrls` / `coverUrl` / `videoUrl` | Media CDN URLs when exposed |
| `authorName` / `authorProfileUrl` | Public author fields |
| `noteUrl` / `provider` / `scrapedAt` | Provenance |

`OUTPUT` and `RUN_SUMMARY` in the default key-value store hold `outcome`, `itemsPushed`, and `chargedEventCounts`.

### Use through the API

```bash
curl -X POST "https://api.apify.com/v2/acts/khadinakbar~xiaohongshu-note-detail-scraper/runs" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"noteUrls":["https://www.xiaohongshu.com/explore/69afda73000000002800b3f2?xsec_token=YOUR_XSEC_TOKEN"],"maxNotes":1}'
```

Download rows as JSON, CSV, Excel, or HTML from the Dataset tab.

### Use with AI agents through Apify MCP

> Look up the public Xiaohongshu note at https://www.xiaohongshu.com/explore/69afda73000000002800b3f2?xsec\_token=YOUR\_XSEC\_TOKEN. Return title, description, likedCount, collectedCount, commentCount, shareCount, imageUrls, videoUrl, authorName, and tags. Keep the scope to public note detail; route comment threads and keyword search to the sibling Actors.

Connect via <https://mcp.apify.com>. Read `OUTPUT.outcome` and `itemsPushed` to interpret empty datasets. Cost signal: about `$0.25` per saved note plus platform usage. Missing or deleted notes surface as `VALID_EMPTY` without a `note-scraped` charge.

### Connect the workflow

- After you confirm the note, scrape comment threads with [Xiaohongshu Comments Scraper](https://apify.com/khadinakbar/xiaohongshu-comments-scraper).
- For a creator homepage, use [Xiaohongshu User Profile Scraper](https://apify.com/khadinakbar/xiaohongshu-user-profile-scraper).
- When you still need note URLs, discover notes with [Xiaohongshu Search Scraper](https://apify.com/khadinakbar/xiaohongshu-search-scraper) and then return here for detail enrichment.

### Pricing

This Actor uses Pay per event plus Apify platform usage. The live Pricing tab is the current source of truth for billing details.

- `apify-actor-start`: $0.00005 per run
- `note-scraped`: **$0.25** per saved public note-detail row

A one-note prefill is about $0.25 in result events plus compute/proxy usage. Missing or deleted notes have no `note-scraped` charge.

### How it works

1. Normalize note URLs, share links, and note IDs.
2. Fetch the public note page through Scrapfly ASP when quota is available, then batch remaining notes into one nested public note-detail provider, then residential Camoufox if needed.
3. Parse title, description, media URLs, engagement counts, author, and tags.
4. Charge `note-scraped` for found rows, then write the dataset item.

### Best results

- Prefer explore/discovery URLs that include `xsec_token`, or `xhslink.com` share links.
- Keep `maxNotes` at `1` for smoke tests; raise it for campaign batches.
- A typo or deleted note finishes `SUCCEEDED` with `VALID_EMPTY` and no note charge.
- Profile-only URLs belong on the user-profile Actor; comment threads belong on the comments Actor.

### Builder's note

I found that Xiaohongshu's public note page still ships `__INITIAL_STATE__` with title, description, media, and engagement when the anti-bot render path succeeds. Direct datacenter HTTP usually surfaces Xiaohongshu code `300031`, and Scrapfly Discovery can hit quota or HTTP 429, so this Actor keeps the owned parser and uses Scrapfly first, then batches remaining URLs into one nested `zen-studio/rednote-note-detail-scraper` run to amortize the nested start charge, then residential Firefox. That split keeps the product a lean one-row note-detail SKU rather than a comments archive.

### Legal and responsible use

Use this Actor on public Xiaohongshu note pages you are authorized to process, follow applicable law and Xiaohongshu's terms, and keep the output in your own compliance workflow. This Actor is independent of Xiaohongshu / RedNote. It does not collect private notes, DMs, login-walled data, or comment threads.

Issues and feature requests: use the Actor Issues tab on Apify.

# Actor input Schema

## `noteUrls` (type: `array`):

Public Xiaohongshu note references to scrape. Accepts https://www.xiaohongshu.com/explore/{id}, /discovery/item/{id}, /user/profile/{userId}/{noteId}, https://xhslink.com/... or https://xhslink.cn/... share links, and bare 24-character note IDs. URLs that include xsec\_token work most reliably. Up to 50 notes per run. NOT profile-only URLs without a note ID, and not keyword search.

## `maxNotes` (type: `integer`):

Hard cap on how many note detail rows to save in this run. Defaults to 20. Prefill 1 keeps the automated quality test under five minutes and bills one note-scraped event on success. Each saved note is billed as note-scraped.

## Actor input object example

```json
{
  "noteUrls": [
    "https://www.xiaohongshu.com/explore/69afda73000000002800b3f2?xsec_token=ABS294BN1RIZ1_yaXpYLmp_VZQ_na4j9mhGzLPMICzCIU="
  ],
  "maxNotes": 1
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `OUTPUT` (type: `string`):

No description

## `RUN_SUMMARY` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "noteUrls": [
        "https://www.xiaohongshu.com/explore/69afda73000000002800b3f2?xsec_token=ABS294BN1RIZ1_yaXpYLmp_VZQ_na4j9mhGzLPMICzCIU="
    ],
    "maxNotes": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/xiaohongshu-note-detail-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "noteUrls": ["https://www.xiaohongshu.com/explore/69afda73000000002800b3f2?xsec_token=ABS294BN1RIZ1_yaXpYLmp_VZQ_na4j9mhGzLPMICzCIU="],
    "maxNotes": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/xiaohongshu-note-detail-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "noteUrls": [
    "https://www.xiaohongshu.com/explore/69afda73000000002800b3f2?xsec_token=ABS294BN1RIZ1_yaXpYLmp_VZQ_na4j9mhGzLPMICzCIU="
  ],
  "maxNotes": 1
}' |
apify call khadinakbar/xiaohongshu-note-detail-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,khadinakbar/xiaohongshu-note-detail-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/7B1Dfu34yRWfqX4yD/builds/Rm4Y8YNeqaBb42Umk/openapi.json
