# Xiaohongshu (RedNote) note detail scraper ( 小红书 ) (`data_dino/xiaohongshu-rednote-note-scraper`) Actor

Collect structured Xiaohongshu (RedNote) note details: title, full description, original-resolution images, every video stream plus native subtitle tracks, engagement counts, author, tags, hashtags, and source-linked URLs.

- **URL**: https://apify.com/data_dino/xiaohongshu-rednote-note-scraper.md
- **Developed by:** [Data Dino](https://apify.com/data_dino) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Xiaohongshu (RedNote) note detail scraper

Collect detailed Xiaohongshu (RedNote) note records in one Apify run. Paste note URLs or share links, or let the actor discover notes automatically from Xiaohongshu's own SEO sitemap. Each record includes the full title and description, original-resolution images, every video stream plus native subtitle tracks, engagement counts, author, tags, and source-linked URLs — ready for export to JSON, CSV, or Excel.

### Why use this actor?

- **Simple input** — paste note share links (xhslink.com), note URLs, or bare note ids. Leave the list empty to auto-discover notes from the sitemap.
- **Rich note records** — title, full description, original images, video streams with subtitles, likes/comments/collects/shares, author, hashtags, tags, and mentioned users.
- **Media download options** — optionally save videos, original images, covers, and native `.srt` subtitle tracks to disk.
- **Mainland-China access** — routes through a managed mainland-China exit, which is required for Xiaohongshu content (non-CN IPs are redirected to a separate international site).
- **Resilient collection** — parallel fetches with automatic retries and a configurable delay for stable runs.

### Input

All fields are optional; with no input the actor discovers 10 notes from the sitemap.

| Field | Type | Default | Description |
|---|---|---:|---|
| `noteUrls` | string array | `[]` | Note URLs, share links, or bare 24-hex note ids. Empty → discover from sitemap. |
| `fromSitemap` | integer | `10` | Number of notes to discover from the sitemap when `noteUrls` is empty. |
| `sitemapFiles` | integer | *(empty)* | Limit sitemap discovery to the first N sitemap files. |
| `maxItems` | integer | *(empty)* | Cap the total number of notes returned. |
| `workers` | integer | `4` | Parallel note fetches (1–16). |
| `delay` | number | `0.3` | Seconds to wait between requests. |
| `useProxy` | boolean | `true` | Use the managed mainland-China exit. |
| `downloadVideos` | boolean | `false` | Save the selected video stream. |
| `videoQuality` | select | `highest` | `highest` = largest file; `compatible` = h264 (plays everywhere). |
| `downloadCovers` | boolean | `false` | Save the video cover image. |
| `downloadImages` | boolean | `false` | Save original full-resolution images. |
| `downloadSubtitles` | boolean | `false` | Save native `.srt` subtitle tracks. |
| `downloadDir` | string | *(empty)* | Folder inside the actor where downloaded media is written. |

#### Example input

```json
{
  "noteUrls": [
    "https://www.xiaohongshu.com/explore/688e12770000000025011500",
    "http://xhslink.com/o/6oKW7wkJf09"
  ],
  "workers": 4,
  "delay": 0.3,
  "useProxy": true
}
```

### Output

The actor pushes one dataset item per note. Each item includes the note id, type (`normal`/`video`), title, full description, canonical URL, publish/update timestamps, engagement counts (likes, comments, collects, shares), author info, all images with original-resolution URLs, video streams and native subtitle tracks, tags, hashtags, mentioned users, and source provenance. Missing values are returned as `null`.

A representative result:

```json
{
  "id": "68a56629000000001c0126d7",
  "type": "video",
  "title": "超好用 记住这4个公式新手也能画好蝴蝶美甲",
  "desc": "…… #美甲[话题]# ……",
  "url": "https://www.xiaohongshu.com/explore/68a56629000000001c0126d7",
  "timestamp": 1756282021000,
  "published_at": "2025-08-27T09:27:01Z",
  "engagement": {
    "liked_count": 56,
    "comments_count": 20,
    "collected_count": 103,
    "shared_count": 16
  },
  "author": {
    "userid": "5de4da56…",
    "nickname": "省钱资讯站",
    "avatar": "https://…",
    "url": "https://www.xiaohongshu.com/user/profile/…"
  },
  "images": [
    {
      "url": "http://sns-webpic-qc.xhscdn.com/…!nd_dft_wlteh_webp_3",
      "url_original": "https://ci.xiaohongshu.com/…",
      "width": 1242,
      "height": 1656
    }
  ],
  "video": {
    "duration_seconds": 147,
    "streams": [
      {
        "url": "http://sns-video-…/…_258.mp4?sign=…",
        "codec": "h264",
        "quality": "HD",
        "width": 720,
        "height": 1280,
        "fps": 30,
        "duration": 147982,
        "size": 51015652
      }
    ],
    "subtitles": {
      "zh-CN": [{ "url": "…_11.srt", "language": "zh-CN" }]
    },
    "cover": { "url": "https://sns-img-qc.xhscdn.com/frame/…webp" }
  },
  "hashtags": ["美甲"],
  "note_id": "68a56629000000001c0126d7",
  "source": "xiaohongshu"
}
```

When media downloads are enabled, the item also carries `video_file`, `cover_file`, `image_files[]`, and `subtitle_files[]` with `{file, size, content_type}`. Deleted or private notes are returned as error rows `{id, error, source}` (never silently skipped).

### Practical limitations

- A mainland-China network exit is required; the actor uses a managed proxy for this. Runs without proxy access may return redirects or logins instead of notes.
- Notes that are not in the SEO sitemap must be given via their share link, which carries the required access token.
- Results reflect public note content at run time and may change as notes are added or removed.
- Use collected information in accordance with Xiaohongshu's terms and applicable privacy and data-use requirements.

# Actor input Schema

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

Xiaohongshu note URLs, share links (xhslink.com / xhscdn.com), or bare 24-hex note ids. When empty, notes are discovered from the SEO sitemap.

## `fromSitemap` (type: `integer`):

When note URLs are empty, pull this many note ids from Xiaohongshu's own SEO sitemap (~400k notes).

## `sitemapFiles` (type: `integer`):

Limit sitemap discovery to the first N sitemap files.

## `maxItems` (type: `integer`):

Cap the total number of notes returned.

## `workers` (type: `integer`):

Number of parallel note fetches.

## `delay` (type: `number`):

Seconds to wait between requests.

## `useProxy` (type: `boolean`):

Route through a mainland-China exit. Required: Xiaohongshu 302s non-CN IPs to rednote.com, where notes are not available.

## `downloadVideos` (type: `boolean`):

Save the selected video stream to disk and attach the file path to the output item.

## `videoQuality` (type: `string`):

highest = largest file; compatible = h264 codec (plays everywhere).

## `downloadCovers` (type: `boolean`):

Save the video cover image.

## `downloadImages` (type: `boolean`):

Save full-resolution original note images.

## `downloadSubtitles` (type: `boolean`):

Save native .srt subtitle tracks (source language plus translations).

## `downloadDir` (type: `string`):

Folder inside the actor where downloaded media is written. Required if any download toggle is on.

## Actor input object example

```json
{
  "noteUrls": [],
  "fromSitemap": 10,
  "workers": 4,
  "delay": 0.3,
  "useProxy": true,
  "downloadVideos": false,
  "videoQuality": "highest",
  "downloadCovers": false,
  "downloadImages": false,
  "downloadSubtitles": false
}
```

# Actor output Schema

## `results` (type: `string`):

All scraped notes, one item per row. Field shape: id, type (normal|video), title, desc, url, xsec_token, timestamp, published_at, engagement {liked_count, comments_count, collected_count, shared_count}, author {userid, nickname, avatar, url}, images\[] {url, url_pre, url_original, width, height, live_photo}, image_count, video {duration_seconds, streams\[] {url, codec, quality, width, height, fps, duration, size}, subtitles {}, cover}, tags\[] {id, name, type}, hashtags\[], at_users\[] {userid, nickname}, note_id, source. Error rows are {id, error, source}.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("data_dino/xiaohongshu-rednote-note-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("data_dino/xiaohongshu-rednote-note-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 '{}' |
apify call data_dino/xiaohongshu-rednote-note-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,data_dino/xiaohongshu-rednote-note-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/oBsbbLcn3Epv8P2So/builds/8ihu3u8SLcmqwdo5g/openapi.json
