# RedNote (Xiaohongshu) User Posts Scraper (`memo23/rednote-user-posts-scraper`) Actor

Scrape a RedNote / Xiaohongshu (小红书) creator's note catalog: every post with title, like counts (parsed to numbers), cover image, and a ready-to-scrape URL with xsec\_token. Page 1 needs NO login; add your web\_session cookie for deeper pagination. Paste a user ID or profile URL.

- **URL**: https://apify.com/memo23/rednote-user-posts-scraper.md
- **Developed by:** [Muhamed Didovic](https://apify.com/memo23) (community)
- **Categories:** Social media
- **Stats:** 2 total users, 1 monthly users, 80.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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## RedNote (Xiaohongshu) User Posts Scraper

**A creator's complete 小红书 note catalog as structured rows — title, engagement counts, cover, and a ready-to-scrape URL with `xsec_token` per post.**

Point it at any Xiaohongshu user and get their posted notes. The actor first tries the public profile page as a guest; Xiaohongshu often withholds the catalog from logged-out visitors, so for reliable results supply your `web_session` cookie — the catalog then runs through Xiaohongshu's own signed API under your session.

### What you get per post

| Field | Description |
| --- | --- |
| `noteId`, `noteType` | ID and type (`normal` image post or `video`) |
| `noteTitle` | Display title |
| `likedCount` / `likedCountNum` | Likes as shown (e.g. `1.2万`) and parsed to a number (12000) |
| `userId`, `userName`, `userAvatar` | The creator |
| `noteCoverUrl` | Cover image |
| `noteUrl` + `xsecToken` | Ready to paste into the [Note Detail](https://apify.com/memo23/rednote-note-detail-scraper) or [Comments](https://apify.com/memo23/rednote-comments-scraper) scraper |

### How to run it

```json
{
    "userId": "https://www.xiaohongshu.com/user/profile/5ff0e6410000000001008400",
    "maxPages": 1
}
```

For more than the first page, add your `web_session` cookie: log in at [xiaohongshu.com](https://www.xiaohongshu.com), open DevTools → **Application** → **Cookies**, copy the `web_session` value (marked secret in the input, never logged).

### FAQ

**Do I need a cookie?** For reliable results, yes — Xiaohongshu frequently withholds the notes section of a profile from logged-out visitors, so a guest run can come back empty even for an active creator. The actor still tries the free guest path first and never bills empty runs beyond the start event.

**How do I monitor a creator over time?** Schedule a `maxPages: 1` run with your cookie — the newest posts are on page 1.

**Where do I find creators to track?** The [RedNote Search Scraper](https://apify.com/memo23/rednote-search-scraper) — every note row includes the author's `userId`.

### Related scrapers

- [RedNote User Profile Scraper](https://apify.com/memo23/rednote-user-profile-scraper) — the creator's bio and follower counts
- [RedNote Note Detail Scraper](https://apify.com/memo23/rednote-note-detail-scraper) — hydrate any post to full detail, no login
- [Xiaohongshu (RedNote) Scraper](https://apify.com/memo23/xiaohongshu-rednote-scraper) — the all-in-one actor: 8 operations

### 🤖 For AI Agents & LLM Apps

Compact reference for AI agents calling this actor via the [Apify MCP server](https://mcp.apify.com) or the Apify API (actor: `memo23/rednote-user-posts-scraper`).

**Purpose:** Lists one Xiaohongshu (RedNote / 小红书) creator's posted notes as JSON rows with engagement counts and per-note access tokens.

**Minimal input:**

```json
{ "userId": "https://www.xiaohongshu.com/user/profile/5ff0e6410000000001008400", "maxPages": 1 }
```

**Output:** one row per note; key fields: noteId, noteType, noteTitle, likedCount, likedCountNum, userId, userName, userAvatar, noteCoverUrl, noteUrl, xsecToken.

**Behaviors an agent should know:**

- Xiaohongshu often gates the catalog for guests — supply a logged-in `web_session` cookie value in `webSession` (secret, never logged) for reliable results; guest runs can legitimately return 0 rows.
- \~15–20 notes per page; cap totals with `maxItems`.
- Each row's `noteUrl` + `xsecToken` feed directly into the RedNote Note Detail or Comments scrapers.
- Billing: pay-per-event — see the Pricing tab on the actor page.

### ⚠️ Disclaimer

This actor collects publicly displayed data from Xiaohongshu for legitimate research, marketing, and archival purposes. You are responsible for complying with applicable laws, Xiaohongshu's terms, and for the account whose cookie you supply. Do not use collected data for spam or harassment.

# Actor input Schema

## `userId` (type: `string`):

A 24-hex Xiaohongshu user ID, or a full profile URL (…/user/profile/<id>). The actor returns this creator's posted notes.

## `maxPages` (type: `integer`):

Pages of the creator's catalog to fetch (~15–20 notes per page). Page 1 works login-free; pages beyond the first need the web\_session cookie below. Default 1.

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

Hard cap on total dataset rows. Leave empty for no cap.

## `webSession` (type: `string`):

A logged-in Xiaohongshu `web_session` cookie value from an account you control. Only needed when maxPages > 1 — Xiaohongshu gates deeper catalog pagination behind login. Log in at xiaohongshu.com, open DevTools → Application → Cookies, and copy the `web_session` value. Bare value or whole cookie string both work.

## `proxy` (type: `object`):

Proxy egress. Leave default to use built-in residential routing. Override with Apify Proxy or custom proxy URLs if needed.

## Actor input object example

```json
{
  "userId": "https://www.xiaohongshu.com/user/profile/5ff0e6410000000001008400",
  "maxPages": 1,
  "proxy": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (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 = {
    "userId": "https://www.xiaohongshu.com/user/profile/5ff0e6410000000001008400"
};

// Run the Actor and wait for it to finish
const run = await client.actor("memo23/rednote-user-posts-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 = { "userId": "https://www.xiaohongshu.com/user/profile/5ff0e6410000000001008400" }

# Run the Actor and wait for it to finish
run = client.actor("memo23/rednote-user-posts-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 '{
  "userId": "https://www.xiaohongshu.com/user/profile/5ff0e6410000000001008400"
}' |
apify call memo23/rednote-user-posts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,memo23/rednote-user-posts-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/3i87wM1Z2DJeg7c3i/builds/8MBJgGnak69dwt9P8/openapi.json
