# Red Note Scraper (`datascrapers/rednote-scraper`) Actor

Red Note (Xiaohongshu) post data by home-feed category or note/profile URL, with optional creator profiles and top comments. Structured JSON per post, with pay-per-event charging for posts, profiles, and comments.

- **URL**: https://apify.com/datascrapers/rednote-scraper.md
- **Developed by:** [Farhan Ali](https://apify.com/datascrapers) (community)
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 1,000 posts

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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

**Red Note Scraper** creates a structured dataset of Red Note (Xiaohongshu) posts collected from rednote.com. Each dataset item represents one post and can include the title, description, tags, cover and gallery media, engagement counts, and author; when enabled, it also attaches the creator profile and top comments. Query the source with home-feed categories, category names or keys via `searchQueries`, or note and profile URLs, control the result limit with `maxItems`, and retrieve records through the Apify Dataset API or export them as JSON, CSV, Excel, XML, or another supported format.

### Dataset at a glance

| Property | Value |
|---|---|
| Source | Red Note (Xiaohongshu) — rednote.com |
| Record unit | One post (note) |
| Input methods | `categories`, `searchQueries`, `startUrls` |
| Main identifiers | `noteId`, `url` |
| Delivery | Apify Dataset and API |
| Export formats | JSON, CSV, Excel, HTML, XML |
| Update model | Fresh records per Actor run |
| Pricing | Pay-per-event: $1.50 / 1,000 posts; optional profiles and comments billed separately |

### Coverage and available records

The Actor accepts three starting points, which can be combined in one run:

- **Home-feed categories** — `categories` is a multi-select of the keys `for_you`, `fashion`, `food`, `beauty`, `tv_movies`, `career`, `love_life`, `home_decor`, `gaming`, `travel`, `fitness`, and `videos`. `searchQueries` accepts the same values as names or keys (for example `fashion` or `For you`).
- **Post (note) URLs** — full note URLs, including `xhslink` short links. These yield full post records with a stable `noteId`, description, gallery, and video URL.
- **Profile and home-feed URLs** — creator profile URLs and the home feed are accepted. Posts gathered from a profile grid may omit `noteId`, so the record keeps title, cover, engagement, and author but not the full description or gallery.

Optional enrichment is conditional:

- **`scrapeProfiles`** (default `false`) attaches the creator profile — Red ID, bio, gender, IP location, follows/followers, likes-and-saves, and profile tags — once per unique creator.
- **`scrapeComments`** (default `false`) attaches top-level comments with nested replies (`subComments`), capped per post by `maxComments`.

`maxItems` limits the total posts collected across all categories and URLs (`0` = unlimited). Pagination over a category is capped by the number of posts the feed returns for the requested category; the Actor does not crawl the entire site.

### Data dictionary

| Field | Type | Nullable | Description | Example |
|---|---:|---|---|---|
| `noteId` | string | Yes | Unique post identifier; empty for profile-grid cards | `"64aac459000000002f02b151"` |
| `url` | string | No | Canonical post URL | `"https://www.rednote.com/explore/64aac459..."` |
| `noteUrl` | string | Yes | Post URL alias | `"https://www.rednote.com/explore/..."` |
| `type` | string | No | Post kind | `"normal"` |
| `title` | string | Yes | Post title | `"178🥕不是高腰！！"` |
| `description` | string | Yes | Post body text | `"上半身长度38.5cm不会是高腰的！..."` |
| `tags` | array | Yes | Topic tags | `["原创设计", "Lolita"]` |
| `publishedAt` | string (ISO 8601) | Yes | Publish timestamp | `"2023-07-09T14:29:45+00:00"` |
| `likedCount` | integer | No | Likes | `1485` |
| `collectedCount` | integer | No | Saves | `378` |
| `commentCount` | integer | No | Comments | `251` |
| `shareCount` | integer | No | Shares | `60` |
| `coverUrl` | string | Yes | Cover image URL | `"https://sns-webpic-qc.xhscdn.com/..."` |
| `imageUrls` | array | Yes | Gallery image URLs | `["https://sns-webpic-qc.xhscdn.com/..."]` |
| `videoUrl` | string | Yes | Video URL (video posts) | `""` |
| `videoDuration` | number | Yes | Video length in seconds | `null` |
| `authorId` | string | Yes | Creator ID | `"62c834b7000000000303ed1e"` |
| `authorName` | string | Yes | Creator display name | `"胖苹果原创"` |
| `authorUrl` | string | Yes | Creator profile URL | `"https://www.rednote.com/user/profile/..."` |
| `categoryLabel` | string | Yes | Category label when scraped from a feed | `"Fashion"` |
| `sourceQuery` | string | No | Seed that produced the row (category, query, or `url`) | `"url"` |
| `profile` | object | Yes | Creator profile; present only when `scrapeProfiles` is on | see below |
| `comments` | array | Yes | Top comments; present only when `scrapeComments` is on | see below |

The optional `profile` object carries `redId`, `bio`, `gender`, `ipLocation`, `follows`, `followers`, `likesAndSaves`, and `tags`. Each item in `comments` carries `commentId`, `noteId`, `content`, `likedCount`, `publishedAt`, `authorName`, `isAuthor`, and nested `subComments`.

The best stable field for deduplication is `noteId`, with `url` as a fallback when `noteId` is empty.

### Example dataset record

The following record was produced from a note URL with `scrapeProfiles` and `scrapeComments` enabled. Long media arrays are truncated for readability.

```json
{
  "noteId": "64aac459000000002f02b151",
  "url": "https://www.rednote.com/explore/64aac459000000002f02b151",
  "noteUrl": "https://www.rednote.com/explore/64aac459000000002f02b151",
  "type": "normal",
  "title": "178🥕不是高腰！！",
  "description": "上半身长度38.5cm不会是高腰的！\n在打二版样衣了！！",
  "tags": ["吃我一口lolita安利", "原创设计", "Lolita"],
  "publishedAt": "2023-07-09T14:29:45+00:00",
  "likedCount": 1485,
  "collectedCount": 378,
  "commentCount": 251,
  "shareCount": 60,
  "coverUrl": "https://sns-webpic-qc.xhscdn.com/...",
  "imageUrls": ["https://sns-webpic-qc.xhscdn.com/..."],
  "videoUrl": "",
  "authorId": "62c834b7000000000303ed1e",
  "authorName": "胖苹果原创",
  "authorUrl": "https://www.rednote.com/user/profile/62c834b7000000000303ed1e",
  "sourceQuery": "url",
  "profile": null,
  "comments": [
    {
      "commentId": "64aac869000000001802bfb4",
      "noteId": "64aac459000000002f02b151",
      "content": "今天有点中暑了[哭惹R]后续会出q and a...",
      "likedCount": "10+",
      "publishedAt": "2023-07-09T14:47:05+00:00",
      "authorName": "胖苹果原创",
      "isAuthor": true,
      "subComments": [
        { "commentId": "64aac8840000000019031c5e", "content": "宝宝可以看一下我的建议...", "authorName": "桔梗.", "likedCount": "1" }
      ]
    }
  ]
}
```

This record is a video-optional post; `videoUrl` is empty for image posts, and `profile` is `null` because the run collected the note without resolving that creator's profile.

### Query and input reference

| Input | Type | Required | Default | Accepted values | Description |
|---|---:|---|---|---|---|
| `searchQueries` | array | No | `["fashion"]` | category names or keys | Home-feed categories written as names or keys (e.g. `fashion`, `For you`). |
| `categories` | array | No | `["for_you"]` | `for_you`, `fashion`, `food`, `beauty`, `tv_movies`, `career`, `love_life`, `home_decor`, `gaming`, `travel`, `fitness`, `videos` | Home-feed categories to scrape. |
| `startUrls` | array | No | rednote.com home | note, profile, or home-feed URLs | Red Note / Xiaohongshu URLs. |
| `maxItems` | integer | No | `0` | `0` = unlimited | Maximum posts across all seeds. |
| `scrapeProfiles` | boolean | No | `false` | `true` / `false` | Attach creator profile per unique creator. |
| `scrapeComments` | boolean | No | `false` | `true` / `false` | Attach top-level comments. |
| `maxComments` | integer | No | `10` | `0` = all on first pages | Top comments per post. |
| `detailConcurrency` | integer | No | `5` | `1`–`10` | Parallel detail/profile/comment workers. |
| `proxyConfiguration` | object | No | Apify `RESIDENTIAL` | proxy config | Proxy settings; residential recommended. |

At least one of `searchQueries`, `categories`, or `startUrls` must be provided. A minimal request and an advanced request:

```json
{ "categories": ["fashion"], "maxItems": 10 }
```

```json
{
  "searchQueries": ["for_you"],
  "categories": ["for_you"],
  "startUrls": [{ "url": "https://www.rednote.com/explore/64aac459000000002f02b151" }],
  "maxItems": 5,
  "scrapeProfiles": true,
  "scrapeComments": true,
  "maxComments": 5,
  "detailConcurrency": 3,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
```

### Retrieve the data through the API

1. Start the Actor with a JSON input.
2. Wait for the run to finish, or use the synchronous `?waitForFinish=` endpoint when appropriate.
3. Read items from the run's default dataset.
4. Paginate or export the dataset.

A Python example using the Apify client:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("datascrapers/rednote-scraper").call(
    run_input={"categories": ["fashion"], "maxItems": 10}
)
items = client.dataset(run["defaultDatasetId"]).list_items().items
print(len(items), "posts")
```

For other languages, use the generated API tab on the Actor page. Never place a real token in a URL or example.

### Data quality and record handling

- **Conditional fields** — `description`, `imageUrls`, `videoUrl`, and `noteId` depend on the starting point. Posts resolved from a profile grid may omit `noteId`, the full description, and the gallery.
- **Completeness** — engagement counts are numeric where Red Note exposes them; the source also renders abbreviated text such as `2万`, which is not preserved numerically.
- **Deduplication** — within a run, posts are deduplicated by `noteId` when present; profile-grid cards without a note id are keyed by title and cover so they are not collapsed. Deduplicate across runs on `noteId` (or `url`).
- **Retries** — failed detail/profile/comment requests are retried with backoff; keep `detailConcurrency` modest (3–5) to avoid blocks.
- **Normalization** — timestamps are ISO 8601; source field names are preserved in camelCase.
- **Raw versus derived** — all fields are source values; the Actor does not compute derived engagement metrics.

### Export and pipeline examples

| Destination | Recommended method | Typical use |
|---|---|---|
| PostgreSQL / Supabase | Dataset API or webhook consumer | Store post and comment records for trend analysis |
| Google Sheets | Apify integration | Share category snapshots with a team |
| S3 / cloud storage | Scheduled export or integration | Archive daily feed snapshots |
| Data warehouse | Scheduled run + export | Join post engagement with creator profiles |

### Pricing and cost examples

Billing is pay-per-event. Each charge is a dataset record or optional enrichment:

| Event | What counts | Rate (per 1,000) |
|---|---|---|
| Post (`dataset-item`) | Each post pushed to the dataset | $1.50 |
| Profile Details (`profile-details`) | Each unique creator profile, when `scrapeProfiles` is on | $2.00 |
| Comment (`comment`) | Each comment, when `scrapeComments` is on | $1.50 |

Higher Apify plan tiers apply a discount (per 1,000): posts and comments Bronze $1.40 / Silver $1.30 / Gold $1.20; profiles Bronze $1.90 / Silver $1.80 / Gold $1.70. A one-time Actor Start event ($0.00005) is also applied per run.

| Records | Estimated base cost |
|---:|---:|
| 1,000 posts (listing only) | $1.50 |
| 10,000 posts (listing only) | $15.00 |
| 1,000 posts + 1,000 profiles | $3.50 |

Estimates assume the standard tier and no profile/comment enrichment unless stated. Profiles and comments are only charged when the corresponding toggle is enabled.

### Limitations and responsible data use

- The Actor collects publicly accessible Red Note content only.
- Feed categories return what Red Note surfaces for that feed; there is no guarantee of full-site or historical coverage.
- Some fields are conditional or empty depending on the starting point (see Data quality).
- No historical snapshots are guaranteed unless you store the exported datasets yourself.
- You are responsible for complying with applicable privacy, contractual, and legal requirements when using the data.

### Dataset questions

#### What does one dataset item represent?

One Red Note post (note), optionally enriched with its creator profile and top comments when those toggles are enabled.

#### Which field should I use as a unique identifier?

Use `noteId` when present. For records gathered from profile grids where `noteId` is empty, fall back to `url` or a combination of title and cover.

#### Are fields nullable or conditional?

Yes. `noteId`, `description`, `imageUrls`, `videoUrl`, and `profile` are conditional on the starting point and enrichment toggles. Treat every field except `url` as possibly empty.

#### Can I retrieve the records as CSV or JSON?

Yes. Open the run in the Apify Console, go to the Storage/Dataset tab, and export JSON, CSV, Excel, HTML, or XML; or read the dataset through the API.

#### How do I paginate large datasets?

Use the Dataset API's `offset` and `limit` parameters, or export the full dataset in one step from the Console.

#### Does the Actor return historical data?

No. Each run returns the records available at crawl time. Schedule recurring runs to build your own history.

#### What counts as a billable result?

Every post is a Post charge; each unique profile (when `scrapeProfiles` is on) is a Profile Details charge; each comment (when `scrapeComments` is on) is a Comment charge.

### Related datasets from Data Scrapers

- **Instagram Post Scraper** — post and media records from Instagram profiles; complements Red Note posts for cross-platform trend research.
- **Instagram Comment Scraper** — comment records by Instagram post URL; useful alongside Red Note comment collection for UGC analysis.
- **TikTok Profile Scraper** — creator profile and post metadata for short-video platforms.
- **TikTok Comment Scraper** — comment records for TikTok videos, comparable to Red Note comment extraction.
- **Twitter X Profile Scraper** — profile and post data from X/Twitter for social monitoring.
- **YouTube Channel Scraper** — channel-level metadata for creator research.

### Data Scrapers support

Need an additional field, record type, or export workflow? Contact Data Scrapers at stardustspotlight@gmail.com. Include a sample source URL, the required fields, the expected record volume, and your preferred delivery format.

# Actor input Schema

## `searchQueries` (type: `array`):

Home-feed categories to scrape, written as names or keys (e.g. "fashion", "food", "For you"). Same values as Categories — useful for AI agents that pass intent instead of URLs.

## `categories` (type: `array`):

Home-feed categories to scrape on rednote.com (e.g. for_you, fashion, food). Combined with Start URLs when both are set.

## `startUrls` (type: `array`):

Red Note or Xiaohongshu note, profile, or home-feed URLs (e.g. https://www.rednote.com/, https://www.rednote.com/explore/64aac459000000002f02b151, https://www.rednote.com/user/profile/62c834b7000000000303ed1e). Category, note, and profile URLs are all accepted.

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

Maximum number of posts to scrape across all categories and URLs (0 = unlimited).

## `scrapeProfiles` (type: `boolean`):

When enabled, fetch the creator profile for each post (bio, followers, Red ID). Charged as the profile-details event once per unique profile, in addition to each dataset item.

## `scrapeComments` (type: `boolean`):

When enabled, fetch top-level comments for each post. Charged as the comment event once per comment, in addition to each dataset item.

## `maxComments` (type: `integer`):

Maximum number of top comments to collect per post when Extract top comments is enabled (0 = all comments returned on the first pages).

## `detailConcurrency` (type: `integer`):

How many posts to enrich in parallel (details, profiles, and comments). Higher is faster; keep it modest to avoid blocks.

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

Proxy settings. Apify Residential proxies are recommended for reliable Red Note access.

## Actor input object example

```json
{
  "searchQueries": [
    "fashion"
  ],
  "categories": [
    "for_you"
  ],
  "startUrls": [
    {
      "url": "https://www.rednote.com/"
    }
  ],
  "maxItems": 10,
  "scrapeProfiles": false,
  "scrapeComments": false,
  "maxComments": 10,
  "detailConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Dataset containing scraped Red Note posts

## `runStats` (type: `string`):

Aggregate scrape statistics for this run

# 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 = {
    "searchQueries": [
        "fashion"
    ],
    "categories": [
        "for_you"
    ],
    "startUrls": [
        {
            "url": "https://www.rednote.com/"
        }
    ],
    "maxItems": 10,
    "maxComments": 10,
    "detailConcurrency": 5,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("datascrapers/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 = {
    "searchQueries": ["fashion"],
    "categories": ["for_you"],
    "startUrls": [{ "url": "https://www.rednote.com/" }],
    "maxItems": 10,
    "maxComments": 10,
    "detailConcurrency": 5,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("datascrapers/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 '{
  "searchQueries": [
    "fashion"
  ],
  "categories": [
    "for_you"
  ],
  "startUrls": [
    {
      "url": "https://www.rednote.com/"
    }
  ],
  "maxItems": 10,
  "maxComments": 10,
  "detailConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call datascrapers/rednote-scraper --silent --output-dataset

```

## MCP server setup

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