# RedNote (Xiaohongshu) Scraper (`coregent/rednote-xiaohongshu-scraper`) Actor

Scrape RedNote (Xiaohongshu, 小红书) notes by keyword, URL or creator: likes, saves, comments, shares, images and author, plus optional full detail, comments with replies and creator profiles. No login, no start fee.

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

## Pricing

from $3.00 / 1,000 notes

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## RedNote (Xiaohongshu) Scraper

![RedNote (Xiaohongshu) Scraper](https://raw.githubusercontent.com/coregentdevspace/rednote-xiaohongshu-scraper-assets/main/thumbnail-rednote-xiaohongshu-scraper.png)

Scrape public **RedNote (Xiaohongshu, 小红书)** notes by **keyword, note URL or creator**, all into one dataset with one
schema. Every note row has the title and text, likes, saves, comment and share counts, images (and the video for
video notes), the post time, and the creator's name, RedNote ID and profile link.

Optional extras, each off by default and charged only when you turn it on:

- **Note detail**: the note's IP location (province or country), topics and hashtags, all images and the video.
- **Comments**: top-level comments per note, in the note's row (and in their own tab, one row per comment).
- **Replies**: replies to those comments, linked to their parent comment.
- **Creator profiles**: followers, following, notes posted, bio, IP location and verification.

No RedNote account, login, cookies or browser needed, and **no start fee**: you pay only for data delivered.

### What you can scrape

| Input | Example | What you get |
|---|---|---|
| **Keywords** | `咖啡`, `coffee`, `露营` | Search results, with sort (relevance, newest, most liked, most commented, most saved), note type and publish-time filters |
| **Note URLs** | `https://www.xiaohongshu.com/explore/<id>`, `https://xhslink.com/…` share links, share text, or note IDs | One row per note, always with full detail |
| **Creators** | `https://www.xiaohongshu.com/user/profile/<id>`, a user ID, or a RedNote ID (小红书号) | The creator's notes, newest first, with an optional oldest-date cut-off |

Mix them freely in one run. A note found by several sources is delivered (and charged) once. One run takes up to 50
keywords, 500 note URLs and 50 creators; split bigger lists across runs.

### How many results

**Max notes (whole run)** is the total for the run, split evenly across your sources unless you set **Max notes per
source**. Comments and replies don't count toward it; they have their own per-note and per-comment limits.

Run it with no input and it does a short demo: a search for "coffee" with 10 notes.

### Input examples

**Most-liked coffee notes from the last week**

```json
{
    "keywords": ["咖啡"],
    "maxNotes": 50,
    "sortBy": "most_liked",
    "publishedWithin": "week"
}
```

**Comments and replies on specific notes**

```json
{
    "noteUrls": ["https://www.xiaohongshu.com/explore/<note-id>"],
    "includeComments": true,
    "maxCommentsPerNote": 50,
    "includeReplies": true,
    "maxRepliesPerComment": 3
}
```

**A creator's notes from the last 3 months, with their profile**

```json
{
    "creators": ["https://www.xiaohongshu.com/user/profile/<user-id>"],
    "maxNotes": 50,
    "oldestPostDate": "90 days",
    "includeCreatorProfile": true
}
```

**Everything on: detail, creator profiles, comments and replies** (the input behind the sample output below)

```json
{
    "keywords": ["咖啡"],
    "maxNotes": 4,
    "sortBy": "most_commented",
    "includeNoteDetail": true,
    "includeCreatorProfile": true,
    "includeComments": true,
    "maxCommentsPerNote": 4,
    "includeReplies": true,
    "maxRepliesPerComment": 2
}
```

**Keyword results with full detail (IP location and topics)**

```json
{
    "keywords": ["露营"],
    "maxNotes": 20,
    "includeNoteDetail": true
}
```

### Output

One row per note. With **Include comments** on, each note row carries its comments (and replies) in a `comments`
list, so every row in the dataset is a note and every column means the same thing in every row.

The run's output has three tabs:

- **Notes**: one row per note.
- **Notes with creator profiles**: the creator columns (with **Include creator profiles** on).
- **Comments and replies**: one row per comment or reply, next to the note it belongs to.

#### Notes tab

![Notes tab](https://raw.githubusercontent.com/coregentdevspace/rednote-xiaohongshu-scraper-assets/main/rednote-xiaohongshu-scraper-output-notes-table-view.png)

#### Sample note row

One row from the run above, with every extra on: note detail, the creator profile, and one comment with one of its
replies. Image links, the second comment and the IDs and names of people are shortened or replaced here; the real
output has them in full.

```json
{
    "recordType": "note",
    "noteId": "<note-id>",
    "noteUrl": "https://www.xiaohongshu.com/explore/<note-id>?xsec_token=…&xsec_source=pc_search",
    "type": "image",
    "title": "刷到就去买来喝了",
    "description": "真的不错#库迪拿铁推荐 #锡兰金杯鸳鸯拿铁",
    "createdAt": "2026-10-08T01:40:39.000Z",
    "likeCount": 9601,
    "collectCount": 3643,
    "commentCount": 753,
    "shareCount": 4969,
    "imageUrls": ["https://sns-i11.rednotecdn.com/…"],
    "videoUrl": null,
    "durationSeconds": null,
    "authorId": "<user-id>",
    "authorNickname": "<creator name>",
    "authorRedId": "<RedNote ID>",
    "authorProfileUrl": "https://www.xiaohongshu.com/user/profile/<user-id>",
    "ipLocation": "Sichuan",
    "tags": ["库迪拿铁推荐", "锡兰金杯鸳鸯拿铁"],
    "hasDetail": true,
    "author": {
        "id": "<user-id>",
        "redId": "<RedNote ID>",
        "nickname": "<creator name>",
        "bio": "…",
        "followerCount": 96,
        "followingCount": 28,
        "noteCount": 190,
        "ipLocation": "Sichuan",
        "verified": false,
        "verificationText": null,
        "avatarUrl": "https://sns-avatar-qc.rednotecdn.com/…",
        "profileUrl": "https://www.xiaohongshu.com/user/profile/<user-id>"
    },
    "source": { "type": "keyword", "value": "咖啡", "position": 4 },
    "scrapedAt": "2026-11-06T07:36:38.633Z",
    "comments": [
        {
            "commentId": "<comment-id>",
            "parentCommentId": null,
            "isReply": false,
            "text": "这个真的巨巨巨好喝！",
            "createdAt": "2026-11-02T14:27:03.000Z",
            "likeCount": 1,
            "replyCount": 4,
            "ipLocation": "Sichuan",
            "authorId": "<user-id>",
            "authorNickname": "<commenter name>",
            "authorRedId": "<RedNote ID>"
        },
        {
            "commentId": "<reply-id>",
            "parentCommentId": "<comment-id>",
            "isReply": true,
            "text": "要加糖嘛",
            "createdAt": "2026-11-02T14:28:17.000Z",
            "likeCount": 1,
            "replyCount": null,
            "ipLocation": "Inner Mongolia",
            "authorId": "<user-id>",
            "authorNickname": "<commenter name>",
            "authorRedId": "<RedNote ID>"
        }
    ]
}
```

In the **Comments and replies** tab, each entry of `comments` becomes its own row next to the note's link and title.

#### Notes

| Field | Description |
|---|---|
| `noteId`, `noteUrl` | The note and a link that opens it on the web |
| `type` | `image` or `video` |
| `title`, `description` | The note's title and text (topic markup cleaned to `#topic`) |
| `likeCount`, `collectCount`, `commentCount`, `shareCount` | Likes, saves, comments and shares at the time of the run |
| `createdAt` | When the note was posted |
| `imageUrls`, `videoUrl`, `durationSeconds` | Media links (video fields on video notes) |
| `authorId`, `authorNickname`, `authorRedId`, `authorProfileUrl` | The creator. On notes from a **Creators** input, `authorRedId` is filled when you gave the RedNote ID or turned on **Include creator profiles** (RedNote's creator listing doesn't include it) |
| `ipLocation`, `tags` | With note detail only (otherwise `null`) |
| `hasDetail` | Whether the row includes note detail |
| `author` | The creator's profile, with **Include creator profiles** on |
| `source` | Which input found the note: `{ type, value, position }` |
| `comments` | With **Include comments** on: the note's comments and replies (below) |

#### Comments and replies (in each note's `comments` list)

`commentId`, `text`, `createdAt`, `likeCount`, `replyCount` (top-level comments), `isReply`, `parentCommentId`
(replies), `ipLocation`, `authorId`, `authorNickname`, `authorRedId`. Top-level comments come first, each followed by
its replies.

`ipLocation` is filled only when RedNote shows a location on the comment, which it does for some comments and not
others (often not on comments from outside mainland China).

#### Inputs that couldn't be scraped

They are never dataset rows: each is logged, and listed with its reason in the `RUN_SUMMARY` record in the run's
key-value store (`errors`), along with counts by type and where the run stopped. They are never charged.

### Pricing

Pay per event: you pay for each **note** delivered, plus each extra you turn on: **note detail** per note (always for
notes given by URL), **comments** per comment or reply, and **creator profiles** once per creator per run. Inputs that
couldn't be scraped and duplicates are free, and there is **no start fee**. See the **Pricing** tab for current rates. This README
deliberately doesn't quote figures.

If you set a spending limit on a run, the Actor stops when it is reached and keeps everything already paid for.

### FAQ

**Why are `ipLocation` and `tags` empty?**
RedNote's search and creator listings don't include them. Turn on **Include note detail** to fill them; notes given
by URL always have them.

**What is a RedNote ID?**
The 小红书号 shown on a creator's profile. It can change; the user ID in the profile URL doesn't. Creator inputs
work best as profile URLs.

**Why doesn't the output have view counts?**
RedNote doesn't show them: the field is 0 on every note, so this Actor leaves it out rather than report a
misleading 0.

**Do the media links last?**
Image and video links are signed RedNote CDN links that expire after a while. Download what you need soon after the
run.

**Can I get comments without the notes' other data?**
Give the notes as URLs and turn on **Include comments**.

### Data and privacy

This Actor collects only what RedNote shows publicly: no private accounts, messages, phone numbers or email
addresses. Some fields are personal data (creator and commenter names, IDs, IP location). You are responsible for
having a lawful basis to process them and for following the laws that apply to you, including China's Personal
Information Protection Law (PIPL), the GDPR where relevant, and RedNote's terms.

This Actor is not affiliated with, endorsed by or sponsored by Xiaohongshu (RedNote).

# Actor input Schema

## `keywords` (type: `array`):

Search RedNote for these terms, in Chinese or English (e.g. 咖啡, coffee, 露营). Each keyword is one source. If you give no keyword, note URL or creator at all, the Actor runs a short demo search for "coffee". Up to 50 per run.

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

Note URLs (https://www.xiaohongshu.com/explore/<id>), share links (https://xhslink.com/…), share text containing such a link, or note IDs. Each note is fetched with its full detail. Up to 500 per run.

## `creators` (type: `array`):

Creator profile URLs (https://www.xiaohongshu.com/user/profile/<id>), user IDs, or RedNote IDs (小红书号). A profile URL is the most reliable; a RedNote ID needs an extra search to find the creator. Up to 50 per run.

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

The total number of note rows for the whole run, across all sources. Split evenly across sources unless you set a per-source limit. Comments do not count toward this limit.

## `maxNotesPerSource` (type: `integer`):

Optional. The most notes from any one keyword or creator. Leave empty to split the run's limit evenly across sources.

## `sortBy` (type: `string`):

How keyword search results are ordered.

## `noteType` (type: `string`):

Only image notes or only video notes.

## `publishedWithin` (type: `string`):

Only keyword results published within this period.

## `oldestPostDate` (type: `string`):

Stop reading a creator's notes at the first one older than this. A date (YYYY-MM-DD) or a period such as "30 days" or "2 weeks".

## `includeNoteDetail` (type: `boolean`):

Add each note's full detail to keyword and creator results: IP location, topics/hashtags, all images and the video. One extra lookup per note. Notes given by URL always include it. Without it, note rows still have the title, text, likes, saves, comments, shares, images and author.

## `includeComments` (type: `boolean`):

Add top-level comments for each note as separate rows (recordType "comment").

## `maxCommentsPerNote` (type: `integer`):

With "Include comments" on: the most top-level comments per note.

## `includeReplies` (type: `boolean`):

With "Include comments" on: also add replies to each comment, as comment rows with parentCommentId set.

## `maxRepliesPerComment` (type: `integer`):

With "Include replies" on: the most replies per comment.

## `includeCreatorProfile` (type: `boolean`):

Add each creator's profile to their notes: followers, following, notes posted, bio, IP location and verification. Fetched and charged once per creator per run. Without it, note rows still carry the creator's name, RedNote ID and profile link.

## Actor input object example

```json
{
  "keywords": [
    "coffee"
  ],
  "maxNotes": 10,
  "sortBy": "general",
  "noteType": "any",
  "publishedWithin": "any",
  "includeNoteDetail": false,
  "includeComments": false,
  "maxCommentsPerNote": 20,
  "includeReplies": false,
  "maxRepliesPerComment": 10,
  "includeCreatorProfile": false
}
```

# Actor output Schema

## `notes` (type: `string`):

No description

## `comments` (type: `string`):

No description

## `runSummary` (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 = {
    "keywords": [
        "coffee"
    ],
    "maxNotes": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("coregent/rednote-xiaohongshu-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 = {
    "keywords": ["coffee"],
    "maxNotes": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("coregent/rednote-xiaohongshu-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 '{
  "keywords": [
    "coffee"
  ],
  "maxNotes": 10
}' |
apify call coregent/rednote-xiaohongshu-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,coregent/rednote-xiaohongshu-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/1BfZdEVxMxzbY4mI9/builds/mKpOAn4yEBhQKmSGd/openapi.json
