# Xiaohongshu Comments Scraper (`automly/xiaohongshu-comments-scraper`) Actor

Scrape Xiaohongshu (RedNote, 小红书) comments from note links without login: comment text, likes, replies linked to the comment they answer, date, location and commenter profile. No account or cookies.

- **URL**: https://apify.com/automly/xiaohongshu-comments-scraper.md
- **Developed by:** [Automly](https://apify.com/automly) (community)
- **Categories:** Social media
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.75 / 1,000 comments

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

## Xiaohongshu Comments Scraper

### What is Xiaohongshu Comments Scraper?

**Xiaohongshu Comments Scraper** lets you **scrape the comments of Xiaohongshu notes** (小红书, also called RedNote): comment text, likes, replies linked to the comment they answer, publish date, the location Xiaohongshu shows, attached pictures and the commenter's nickname and profile link. Paste note links, click **Start**, and download the comments as Excel, CSV or JSON.

It reads **the first page of comments per note**, the part Xiaohongshu shows visitors who are not signed in: about 10 to 30 comments and replies per note, not full comment threads.

- ⚡ **Speed:** a note's comments in a few seconds
- 💬 **Threads kept:** every reply carries the ID of the top comment it sits under and of the comment it answers
- 🔗 **Any link:** browser links (xiaohongshu.com or rednote.com), xhslink.com share links or the whole share text from the app
- 🔓 **No login:** no Xiaohongshu account, cookies or QR code needed

### What can Xiaohongshu Comments Scraper do?

- Scrape the **first page of comments** Xiaohongshu shows visitors under each note: the top comments, each with its first replies (about 10 to 30 rows per note)
- Link each **reply** to its top comment and to the comment it answers
- Tell you which comments the **note's author** wrote
- Read many notes in one run and stop at the **number of comments** you choose
- Export to Excel, CSV, JSON, HTML or XML, or send the data to Google Sheets, Make, Zapier and more

### What data can you extract from Xiaohongshu comments?

| | | |
|---|---|---|
| 💭 Comment text | ❤️ Likes | 🔁 Reply count |
| 🧵 Top comment a reply sits under | ↩️ Comment a reply answers | ✍️ Written by the note's author |
| 📅 Publish date | 📍 Location shown on the comment | 🖼️ Attached pictures |
| 👤 Commenter nickname and profile link | 🏷️ Mentioned users | 🔗 Note ID and link |

### How to scrape Xiaohongshu comments

1. [Create a free Apify account](https://console.apify.com/sign-up) (no credit card needed).
2. Open **Xiaohongshu Comments Scraper**.
3. Paste one or more note links into **Note links**.
4. Optionally set **Max comments**. Click **Start**.
5. When the run finishes, download your comments as Excel, CSV, JSON, HTML or XML.

### How much does it cost to scrape Xiaohongshu comments?

You pay per comment saved (replies count as comments). Higher Apify plans pay less:

| Apify plan | Per 1,000 comments |
|---|---|
| Free | $2.50 |
| Starter (Bronze) | $2.25 |
| Scale (Silver) | $2.00 |
| Business (Gold) and higher | $1.75 |

Platform usage is included in these prices, so you pay nothing else for the run. There is no start fee. Notes that no longer exist, expired links and notes with no comments cost nothing. Every Apify account gets **$5 of free usage each month**.

### ⬇️ Input

| Setting | What it does |
|---|---|
| Note links | Note links copied from the browser or the app's share button, one per line |
| Max comments | The most comments and replies the run saves in total; leave empty for every comment shown |

**About note links:** copy the **whole link**, including the part after the question mark (`?xsec_token=...`). Xiaohongshu opens a note only with that part, so a link cut after the note ID returns nothing. Xiaohongshu shows a note's comments only for a limited time after its link is copied, so copy links shortly before the run; an expired link is listed as "this link has expired: copy the note link again" and costs nothing.

```json
{
  "noteUrls": [
    "https://www.xiaohongshu.com/explore/6aa7a3f600000000110335f8?xsec_token=YByFNzoKupps8B3qI774Gx7XGxfHpq4QWEvxU4zsD8454%3D"
  ],
  "maxResults": 50
}
```

### ⬆️ Output

One row per comment or reply:

```json
{
  "type": "comment",
  "commentId": "6ad17f490000000007028dd1",
  "noteId": "6ace7469000000001500c513",
  "noteUrl": "https://www.xiaohongshu.com/explore/6aa7a3f600000000110335f8?xsec_token=YByFNzoKupps8B3qI774Gx7XGxfHpq4QWEvxU4zsD8454%3D",
  "parentCommentId": "6acf5d1f000000000701162a",
  "replyToCommentId": "6acf5d1f000000000701162a",
  "text": "高速上真的是救命了",
  "likes": 1000,
  "likesAsShown": "1千+",
  "replyCount": null,
  "isNoteAuthor": false,
  "publishedAt": "2026-10-16T01:35:06+00:00",
  "ipLocation": "四川",
  "pictures": [],
  "mentions": [],
  "author": {
    "userId": "5b6a9424f7e8b927cdf5d7d9",
    "nickname": "娜霓",
    "avatarUrl": "https://sns-avatar-qc.xhscdn.com/avatar/5c540196d8cd200001614ad8.jpg?imageView2/2/w/120/format/jpg",
    "profileUrl": "https://www.xiaohongshu.com/user/profile/5b6a9424f7e8b927cdf5d7d9"
  },
  "input": "https://www.xiaohongshu.com/explore/6aa7a3f600000000110335f8?xsec_token=YByFNzoKupps8B3qI774Gx7XGxfHpq4QWEvxU4zsD8454%3D",
  "scrapedAt": "2026-11-15T16:43:51Z"
}
```

A top comment has an empty `parentCommentId`; a reply has the top comment's ID there. Dates are ISO 8601 in UTC. Xiaohongshu rounds big counts (1.2万 = 12,000); the exact text it shows is kept in `likesAsShown`. Emails and phone numbers typed into comments are left out.

### How can I use Xiaohongshu comments?

- **Brand and product research:** read what people say about a product under notes about it
- **Social listening:** follow the reactions under notes about your brand or your competitors
- **Influencer research:** see how a creator's audience responds and whether the creator replies
- **Data for AI and analysis:** feed comment texts into sentiment or topic models

### ❓FAQ

#### How many comments can I get per note?

The comments Xiaohongshu shows to visitors who are not signed in: the first page of top comments (usually 10 to 20), each with its first replies, so about 10 to 30 rows per note. More comments are shown only to signed-in users, and this scraper never signs in. To cover more of a topic, add more notes.

#### Can I sort the comments?

The comments come in the order Xiaohongshu shows them to visitors (its own ranking). Sort or filter the rows by `likes` or `publishedAt` after the run.

#### Do I need a Xiaohongshu account or cookies?

No. No account, cookies, QR login or phone number is needed.

#### What happens with a deleted note or a wrong link?

The run still succeeds. A deleted note, or a link that has expired ("this link has expired: copy the note link again"), is listed as not found in the log and in the run report (`report-summary`) and costs nothing. A link without its `xsec_token` part is listed as failed with a plain reason.

#### Can I get the notes themselves or creator profiles?

Use **RedNote Note Scraper** for full note details and **RedNote User Profile Scraper** for profiles, or **Xiaohongshu Scraper** for notes, comments, profiles and the Explore feed in one actor.

#### Can I use it with AI agents (MCP)?

Yes. Ask your agent, for example, "Get the comments of this Xiaohongshu note", and it can run this scraper with:

```json
{"noteUrls": ["https://www.xiaohongshu.com/explore/6aa7a3f600000000110335f8?xsec_token=..."]}
```

#### Something isn't working?

Open the **Issues** tab and tell us the input you used. We fix problems quickly.

# Actor input Schema

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

Note links copied from the browser address bar or the app's share button, e.g. https://www.xiaohongshu.com/explore/6aa7a3f600000000110335f8?xsec_token=YByF..., a rednote.com/discovery/item link, an xhslink.com link or the whole share text. Copy the whole link: Xiaohongshu opens a note only with the part after the question mark, and only for a limited time after you copy it.

## `maxResults` (type: `integer`):

The most comments and replies this run saves in total, e.g. 500. Leave empty to save every comment Xiaohongshu shows for each note.

## `proxyConfiguration` (type: `object`):

The default works for most runs. If results come back empty, try a different proxy option.

## Actor input object example

```json
{
  "noteUrls": [
    "https://www.xiaohongshu.com/explore/6aa7a3f600000000110335f8?xsec_token=YByFNzoKupps8B3qI774Gx7XGxfHpq4QWEvxU4zsD8454%3D"
  ],
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

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

No description

## `report` (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/6aa7a3f600000000110335f8?xsec_token=YByFNzoKupps8B3qI774Gx7XGxfHpq4QWEvxU4zsD8454%3D"
    ],
    "maxResults": 50,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("automly/xiaohongshu-comments-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/6aa7a3f600000000110335f8?xsec_token=YByFNzoKupps8B3qI774Gx7XGxfHpq4QWEvxU4zsD8454%3D"],
    "maxResults": 50,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("automly/xiaohongshu-comments-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/6aa7a3f600000000110335f8?xsec_token=YByFNzoKupps8B3qI774Gx7XGxfHpq4QWEvxU4zsD8454%3D"
  ],
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call automly/xiaohongshu-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automly/xiaohongshu-comments-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/xew6BBoJxLr2SK8M4/builds/luTi2PiOLi9k5jDbR/openapi.json
