# XiaoHongShu (RedNote) Scraper — Notes, Search, Comments 小红书 (`technicaldost/xiaohongshu-rednote-scraper`) Actor

Scrape XiaoHongShu (小红书 / RedNote) notes by keyword: titles, authors, engagement stats, images, videos and comments. No official API needed. Built for e-commerce research, trend analysis and social listening.

- **URL**: https://apify.com/technicaldost/xiaohongshu-rednote-scraper.md
- **Developed by:** [Technical Dost Solutions](https://apify.com/technicaldost) (community)
- **Categories:** E-commerce, Social media
- **Security:** Limited permissions
- **Stats:** 13 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.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

Scrape **XiaoHongShu (小红书 / RedNote)** notes by keyword search: titles, full text, authors, engagement stats (likes / collects / comments / shares), images, video URLs, publish time and top comments — delivered as clean JSON via the Apify API.

XiaoHongShu has **no public API**. This actor drives a real headless browser (Playwright) against the xiaohongshu.com web app and extracts structured data from rendered pages, so you get exactly what a logged-in user sees.

Built for CN/SEA e-commerce operators, US agencies, brand monitoring and trend research pipelines.

### What it does

1. Opens `xiaohongshu.com` search for each of your keywords.
2. Scrolls the result feed and collects up to `maxNotesPerKeyword` note cards.
3. Opens every note page and extracts the full note: title, description, hashtags, author, likes, collects, comment count, share count, publish time, all images, video URL.
4. Optionally scrolls the comment section and collects up to `maxCommentsPerNote` top-level comments per note (user, text, likes).
5. Pushes one dataset item per note — ready for export as JSON / CSV / Excel or API consumption.

### ⚠️ Keyless vs. cookies — read this before running

XiaoHongShu aggressively gates its web app behind login. Here is exactly what works, verified live:

| Feature | Without cookies | With login cookies |
| --- | --- | --- |
| Explore (发现) feed notes (`exploreFeed`) | ✅ Works | ✅ Works |
| Keyword search results | ❌ **Blocked** — the search page shows a login wall and renders zero note cards | ✅ Works |
| Note detail pages (title, author, stats, images) | ✅ Works | ✅ Works |
| Comments on note pages | ✅ Works (login popup auto-dismissed) | ✅ Works |

**Bottom line:** without cookies, use the Explore feed (the default when no keywords are given). For keyword search, set the `cookies` input.

#### How to get your cookies

1. Log in to [xiaohongshu.com](https://www.xiaohongshu.com) in Chrome/Edge (phone SMS or QR scan).
2. Open DevTools (F12) → **Network** tab → refresh the page.
3. Click any request to `xiaohongshu.com` → copy the full **`Cookie:`** request header value.
4. Paste it into the `cookies` input. It looks like `a1=abc123; webId=def456; web_session=...`.

Cookies typically last days to weeks. If a run with cookies returns 0 notes, grab fresh ones.

### Input

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `keywords` | string\[] | `["护肤 推荐"]` | Search keywords (Chinese or English). One search run per keyword. **Required.** |
| `maxNotesPerKeyword` | integer | `20` | Max notes scraped per keyword (1–200). |
| `maxCommentsPerNote` | integer | `0` | Max top-level comments per note. `0` skips comment extraction entirely (much faster). |
| `cookies` | string | — | Browser cookies for xiaohongshu.com (`name=value; name=value`). Strongly recommended — see above. |
| `proxyConfiguration` | object | — | Optional Apify proxy. Residential proxies help if you hit rate limits. |

#### Example input

```json
{
  "keywords": ["护肤 推荐", "夏日穿搭"],
  "maxNotesPerKeyword": 20,
  "maxCommentsPerNote": 5,
  "cookies": "a1=yourCookieValue; webId=yourCookieValue; web_session=yourCookieValue"
}
```

### Output

One dataset item per note:

| Field | Type | Description |
| --- | --- | --- |
| `keyword` | string | Keyword that found this note |
| `noteId` | string | XiaoHongShu note ID |
| `url` | string | Canonical note URL |
| `type` | string | `note` (image/text) or `video` |
| `title` | string | Note title |
| `desc` | string | Body text incl. hashtags |
| `authorName` | string | Author nickname |
| `authorId` | string | Author user ID |
| `authorUrl` | string | Author profile URL |
| `likes` | string | Like count as displayed (e.g. `2.4万`) |
| `collects` | string | Collect/favorite count |
| `commentsCount` | string | Total comment count |
| `shareCount` | string | Share count |
| `publishTime` | string | ISO publish timestamp |
| `images` | string\[] | Image URLs |
| `videoUrl` | string | Video URL (video notes only, else `null`) |
| `comments` | object\[] | `{userName, text, likes}` — empty when comment extraction is off |
| `scrapedAt` | string | ISO timestamp of scraping |

#### Example item

```json
{
  "keyword": "护肤",
  "noteId": "6a64f1c60000000010026e57",
  "url": "https://www.xiaohongshu.com/explore/6a64f1c60000000010026e57",
  "type": "note",
  "title": "讨厌夏天",
  "desc": "没有鲨人！但是是真的心好累……",
  "authorName": "+こおり+",
  "authorId": "699af24b000000001c037d61",
  "authorUrl": "https://www.xiaohongshu.com/user/profile/699af24b000000001c037d61",
  "likes": "2.4万",
  "collects": "1497",
  "commentsCount": "2153",
  "shareCount": "6106",
  "publishTime": "2026-07-25T16:06:30.000Z",
  "images": ["http://sns-webpic-qc.xhscdn.com/..."],
  "videoUrl": null,
  "comments": [
    { "userName": "+こおり+", "text": "你们点赞的是啥意思呀！", "likes": "1千+" }
  ],
  "scrapedAt": "2026-08-19T18:00:00.000Z"
}
```

### Pricing (pay per event)

- **$3.00 per 1,000 notes** scraped
- **$0.005 per comment** extracted
- **No start fee** — you only pay for successfully scraped data

Set `maxCommentsPerNote: 0` if you don't need comments — note-only runs are fast and cheap.

### Tips & limits

- **Rate limits**: XiaoHongShu throttles aggressively. Anonymous (no-cookie) access from one IP is cut off entirely after a burst of requests — with cookies, keep volumes modest per account, or attach a residential proxy (Chinese IPs work best; datacenter IPs are often pre-blocked).
- **Login wall popups** on note pages are auto-dismissed by the actor.
- Counts like `likes` are returned **as displayed** on the site (`2.4万` = 24,000) — convert in post-processing if you need raw numbers.
- Deleted or private notes are skipped with a warning.

### Legal

This actor extracts publicly visible data from xiaohongshu.com. You are responsible for complying with XiaoHongShu's Terms of Service and applicable law. Use your own account cookies at your own risk.

### Use XiaoHongShu (RedNote) Scraper with AI agents (MCP)

Give Claude, ChatGPT, Cursor, VS Code or any MCP client this Actor as a tool through the hosted [Apify MCP server](https://mcp.apify.com). The agent sees the input fields with descriptions and example values, runs the Actor, and reads the results.

**MCP server URL (this Actor only):**

```
https://mcp.apify.com/?tools=technicaldost/xiaohongshu-rednote-scraper
```

**Claude Code:**

```bash
claude mcp add --transport http apify "https://mcp.apify.com/?tools=technicaldost/xiaohongshu-rednote-scraper" --header "Authorization: Bearer YOUR_APIFY_TOKEN"
```

**Cursor, VS Code, Claude Desktop and other clients** (`mcp.json` or the client's MCP settings):

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com/?tools=technicaldost/xiaohongshu-rednote-scraper",
      "headers": { "Authorization": "Bearer YOUR_APIFY_TOKEN" }
    }
  }
}
```

Clients that support sign-in (such as Claude.ai connectors) can use the URL without a token and log in to Apify instead. Get your token in [Apify Console → Settings → API & Integrations](https://console.apify.com/settings/integrations), or generate a ready config for your client at [mcp.apify.com](https://mcp.apify.com). In the agent the tool is named `technicaldost--xiaohongshu-rednote-scraper`; ask it, for example, to *"run XiaoHongShu (RedNote) Scraper with {"keywords": \["护肤 推荐"]}"*.

AI agents without an Apify account can also run and pay for this Actor per request with [x402 agentic payments](https://docs.apify.com/platform/integrations/x402).

### Run XiaoHongShu (RedNote) Scraper via API

Run the Actor and get its results in one call (replace `YOUR_APIFY_TOKEN`):

```bash
curl -X POST "https://api.apify.com/v2/acts/technicaldost~xiaohongshu-rednote-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"keywords": ["护肤 推荐"]}'
```

**Python** (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("technicaldost/xiaohongshu-rednote-scraper").call(run_input={"keywords": ["护肤 推荐"]})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

**JavaScript / TypeScript** (`npm install apify-client`):

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('technicaldost/xiaohongshu-rednote-scraper').call({"keywords": ["护肤 推荐"]});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

Long runs: start them with `POST /v2/acts/technicaldost~xiaohongshu-rednote-scraper/runs` and fetch the dataset when the run finishes, or receive a webhook.

### Integrations

XiaoHongShu (RedNote) Scraper works with [Make](https://docs.apify.com/platform/integrations/make), [Zapier](https://docs.apify.com/platform/integrations/zapier), [n8n](https://docs.apify.com/platform/integrations/n8n), [LangChain](https://docs.apify.com/platform/integrations/langchain), Google Sheets, Slack, GitHub and [webhooks](https://docs.apify.com/platform/integrations/webhooks). Schedule runs in Apify Console and send new results straight to your apps, spreadsheets or AI pipelines.

### FAQ

#### Can I use XiaoHongShu (RedNote) Scraper with AI agents like Claude or ChatGPT?

Yes. Connect the Apify MCP server with `?tools=technicaldost/xiaohongshu-rednote-scraper` (see above) and the agent can run the Actor and read its results on its own.

#### Can I call XiaoHongShu (RedNote) Scraper from my own code?

Yes. Use the REST API, or the official Python and JavaScript clients shown above. Results are available as JSON, CSV, Excel, XML or HTML.

#### How do I run it on a schedule?

Save your input as a task in Apify Console and add a schedule (for example, daily). Use webhooks or integrations to send each run's results onward.

#### Is it legal to use this Actor?

It works with publicly available data. Make sure your use complies with the source website's terms and with data protection laws such as GDPR, especially for personal data.

#### Something doesn't work or I need a feature. What should I do?

Open an issue in the **Issues** tab on this Actor's page with an example input, and we'll look into it.

# Actor input Schema

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

Search keywords (Chinese or English), one search per keyword. Keyword search needs your xiaohongshu.com login cookies (see "cookies"). Leave empty to scrape the Explore feed instead.

## `exploreFeed` (type: `boolean`):

Also scrape the notes on the public Explore (发现) feed. Works without login cookies. Used automatically when no keywords are given.

## `maxNotesPerKeyword` (type: `integer`):

Maximum number of notes per keyword (and for the Explore feed).

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

Maximum top-level comments to extract per note. Set to 0 to skip comment extraction (much faster). Requires opening each note page. Without cookies, note detail pages are often blocked by a login wall.

## `cookies` (type: `string`):

Browser cookies for xiaohongshu.com, pasted from your browser (DevTools → Application → Cookies, or a 'Cookie' request header). Strongly recommended: without login cookies XiaoHongShu usually shows a login wall and only a small number of results may render. Format: 'name1=value1; name2=value2'.

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

Optional Apify proxy settings. Residential proxies with Chinese IPs may improve reliability.

## Actor input object example

```json
{
  "keywords": [],
  "exploreFeed": true,
  "maxNotesPerKeyword": 5,
  "maxCommentsPerNote": 0
}
```

# Actor output Schema

## `notesDatasetUrl` (type: `string`):

Dataset containing one item per scraped note.

# 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": [],
    "exploreFeed": true,
    "maxNotesPerKeyword": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("technicaldost/xiaohongshu-rednote-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": [],
    "exploreFeed": True,
    "maxNotesPerKeyword": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("technicaldost/xiaohongshu-rednote-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": [],
  "exploreFeed": true,
  "maxNotesPerKeyword": 5
}' |
apify call technicaldost/xiaohongshu-rednote-scraper --silent --output-dataset

```

## MCP server setup

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