# All-in-One RedNote (Xiaohongshu) Scraper (`huggable_quote/xiaohongshu-all-in-one-scraper`) Actor

Scrape Xiaohongshu (RedNote/小红书) — search posts, get post details, extract comments, scrape profiles, collect user posts, and download videos without watermarks. 6 modes in one actor.

- **URL**: https://apify.com/huggable\_quote/xiaohongshu-all-in-one-scraper.md
- **Developed by:** [OrbitData Labs](https://apify.com/huggable_quote) (community)
- **Categories:** Social media, Lead generation
- **Stats:** 22 total users, 8 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.99 / 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## All-in-One RedNote (Xiaohongshu) Scraper

A powerful, all-in-one scraper for **Xiaohongshu** (RedNote / 小红书), one of China's largest social media and lifestyle platforms with over 320 million users. Extract search results, post details, comments, user profiles, user posts, and video download URLs — all from a single Actor.

### Features

- **Search Posts** — Search by keywords with advanced sorting (general, latest, popular) and note type filtering (all, video, image).
- **Post Detail** — Extract comprehensive post data: full description text, all images, video URLs, tags, and engagement metrics (likes, comments, collects, shares).
- **Comments** — Scrape comments and nested replies with user info, timestamps, IP locations, and like counts.
- **User Profile** — Extract profile data: nickname, RED ID, gender, bio, follower/following counts, likes & collects, tags, and avatar.
- **User Posts** — Collect all posts from a user profile with cover images and engagement metrics.
- **Video Download** — Extract watermark-free video URLs in multiple quality options with full metadata.

### Input Parameters

| Parameter | Type | Description |
|---|---|---|
| `mode` | String | `search`, `postDetail`, `comments`, `profile`, `userPosts`, or `videoDownload` |
| `keywords` | Array | Keywords to search (search mode) |
| `postUrls` | Array | Post URLs (postDetail, comments, videoDownload modes) |
| `profileUrls` | Array | Profile URLs (profile, userPosts modes) |
| `maxItems` | Integer | Max items per keyword/URL (default: 20, max: 1000) |
| `sortBy` | String | Search sort: `general`, `time_descending`, `popularity_descending` |
| `noteType` | String | Search filter: `all`, `video`, `normal` |
| `sessionCookie` | String | Your browser cookie string for authenticated scraping (highly recommended) |
| `proxyConfiguration` | Object | Proxy settings (Apify Proxy recommended) |

### How to Get Your Session Cookie (Step-by-Step Guide)

Xiaohongshu requires login for full data access. Providing your session cookie **dramatically improves** scraping success rates and data quality. Without cookies, many pages will show a login wall after a few requests.

#### Why Do I Need Cookies?

| Mode | Without Cookie | With Cookie |
|---|---|---|
| Search | First page only, login wall after a few requests | Full pagination, unlimited results |
| Post Detail | Basic SSR data, may be blocked | Full post data with all metrics |
| Comments | Almost no data (API requires auth) | All comments and replies |
| Profile | May show login wall | Full profile data |
| User Posts | First few posts only | All posts with pagination |
| Video Download | SSR data only | Full video URLs and metadata |

#### Method 1: Chrome DevTools (Recommended)

1. **Open Chrome** and go to [https://www.xiaohongshu.com](https://www.xiaohongshu.com)
2. **Log in** to your Xiaohongshu account (sign up at [https://www.xiaohongshu.com](https://www.xiaohongshu.com) if you don't have one)
3. **Open DevTools**: Press `F12` or `Ctrl+Shift+I` (Windows) / `Cmd+Option+I` (Mac)
4. Go to the **Network** tab
5. **Reload the page** (`F5` or `Ctrl+R`)
6. Click on any request to `www.xiaohongshu.com` (usually the first one)
7. In the **Headers** tab, scroll down to **Request Headers**
8. Find the **`Cookie`** header and **copy the entire value**
9. Paste it into the **Session Cookie** field in the actor input

> **Example cookie string** (yours will be much longer):
> ```
> a1=1912c3e4a27xbhq2kl1c3lqirhh70j6o6u1u50000313575; webId=46ae16...; web_session=040069b2c4...; xsecappid=xhs-pc-web; websectiga=9ef3...
> ```

#### Method 2: Chrome Application Tab

1. Open Chrome DevTools (`F12`)
2. Go to the **Application** tab
3. In the left sidebar, expand **Cookies** → click `https://www.xiaohongshu.com`
4. You'll see a table of all cookies. You need to copy them all.
5. **Quick way**: Open the **Console** tab and run:

```javascript
document.cookie
````

6. Copy the output and paste it into the actor's **Session Cookie** field.

#### Method 3: Cookie Editor Extension

1. Install a browser extension like **[EditThisCookie](https://chrome.google.com/webstore/detail/editthiscookie/fngmhnnpilhplaeedifhccceomclgfbg)** or **[Cookie-Editor](https://chrome.google.com/webstore/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdm)**
2. Go to <https://www.xiaohongshu.com> and log in
3. Click the extension icon → **Export** (as JSON)
4. Paste the JSON directly into the **Session Cookie** field — the actor accepts JSON format too!

#### Important Cookies

These are the key cookies the actor needs. Make sure they're included:

| Cookie | Purpose | Required? |
|---|---|---|
| `a1` | Primary session token | **Essential** |
| `web_session` | Web session identifier | **Essential** |
| `webId` | Web visitor ID | Recommended |
| `xsecappid` | App identifier | Recommended |
| `websectiga` | Security token | Recommended |

#### Cookie Tips

- **Cookies expire** — If scraping stops working, re-export fresh cookies from your browser
- **Stay logged in** — Don't log out of your Xiaohongshu account in the browser while the actor is running
- **One account** — Don't use the same cookies in multiple concurrent actor runs
- **Session length** — Cookies typically last 7–30 days before expiring
- **Safety** — Your cookies are only used for this actor and are not stored or shared. Treat them like a password.

### Input Examples

#### Search Mode (with cookie)

```json
{
    "mode": "search",
    "keywords": ["ai", "fashion"],
    "maxItems": 20,
    "sortBy": "general",
    "noteType": "all",
    "sessionCookie": "a1=your_token; web_session=your_session; webId=your_webid; ..."
}
```

#### Post Detail Mode

```json
{
    "mode": "postDetail",
    "postUrls": [
        "https://www.xiaohongshu.com/explore/670a46a50000000024017580"
    ],
    "sessionCookie": "a1=your_token; web_session=your_session; ..."
}
```

#### Comments Mode (cookie strongly recommended)

```json
{
    "mode": "comments",
    "postUrls": [
        "https://www.xiaohongshu.com/explore/6764f52c000000000900c655?xsec_token=ABQuGdhHV4zPI_3lR2iWdS9VxX_4RmI3bUSh394ppVitk="
    ],
    "maxItems": 50,
    "sessionCookie": "a1=your_token; web_session=your_session; ..."
}
```

#### Profile Mode

```json
{
    "mode": "profile",
    "profileUrls": [
        "https://www.xiaohongshu.com/user/profile/6784ba7f00000000080191fb"
    ],
    "sessionCookie": "a1=your_token; web_session=your_session; ..."
}
```

#### User Posts Mode

```json
{
    "mode": "userPosts",
    "profileUrls": [
        "https://www.xiaohongshu.com/user/profile/639946a0000000002702b173"
    ],
    "maxItems": 50,
    "sessionCookie": "a1=your_token; web_session=your_session; ..."
}
```

#### Video Download Mode

```json
{
    "mode": "videoDownload",
    "postUrls": [
        "https://www.xiaohongshu.com/explore/6795e093000000001902c0dd?xsec_token=ABMWHV4ZQpvHMK27K3aBzT_xu4JqjfqMuQx5pUUZLqm8g="
    ],
    "sessionCookie": "a1=your_token; web_session=your_session; ..."
}
```

### Output Samples

#### Search Mode Output

```json
[
    {
        "mode": "search",
        "keyword": "ai",
        "id": "670a46a50000000024017580",
        "type": "normal",
        "title": "国内AI工具推荐，亲测好用！",
        "user": {
            "userId": "620232b1000000001000d406",
            "nickname": "千寻AI部落",
            "avatar": "https://sns-avatar-qc.xhscdn.com/avatar/..."
        },
        "likes": 13759,
        "cover": {
            "url": "http://sns-webpic-qc.xhscdn.com/...",
            "width": 1242,
            "height": 1660
        },
        "imageCount": 9,
        "url": "https://www.xiaohongshu.com/explore/670a46a50000000024017580",
        "scrapedAt": "2025-01-17T03:06:58.355Z"
    }
]
```

#### Post Detail Output

```json
[
    {
        "mode": "postDetail",
        "postUrl": "https://www.xiaohongshu.com/explore/670a46a50000000024017580",
        "id": "670a46a50000000024017580",
        "type": "normal",
        "title": "国内AI工具推荐，亲测好用！",
        "description": "Full post description text here...",
        "content": "Full post content...",
        "user": {
            "userId": "620232b1000000001000d406",
            "nickname": "千寻AI部落",
            "avatar": "https://..."
        },
        "likes": 13759,
        "comments": 892,
        "collects": 5423,
        "shares": 234,
        "tags": [
            { "id": "5c2cc7bd...", "name": "AI", "type": "topic" }
        ],
        "images": [
            {
                "width": 1242,
                "height": 1660,
                "urls": [
                    { "scene": "WB_DFT", "url": "http://..." },
                    { "scene": "WB_PRV", "url": "http://..." }
                ]
            }
        ],
        "video": null,
        "ipLocation": "北京",
        "scrapedAt": "2025-01-17T03:06:58.355Z"
    }
]
```

#### Comments Output

```json
[
    {
        "mode": "comments",
        "postUrl": "https://www.xiaohongshu.com/explore/...",
        "noteId": "6764f52c000000000900c655",
        "comment": {
            "id": "6764f606000000000e01f2e9",
            "parentId": null,
            "content": "Great post! Very helpful.",
            "likes": 7,
            "createTime": 1734669831000,
            "ipLocation": "湖南",
            "subCommentCount": 28,
            "user": {
                "userId": "66178cdc000000000d0248dd",
                "nickname": "coconut",
                "avatar": "https://..."
            },
            "replyTo": null
        },
        "scrapedAt": "2025-01-17T05:45:22.613Z"
    }
]
```

#### Profile Output

```json
[
    {
        "mode": "profile",
        "profileUrl": "https://www.xiaohongshu.com/user/profile/6784ba7f00000000080191fb",
        "userId": "6784ba7f00000000080191fb",
        "redId": "95435108495",
        "nickname": "hopeawinters",
        "description": "fashion | teacher",
        "gender": 2,
        "avatar": "https://sns-avatar-qc.xhscdn.com/avatar/...",
        "ipLocation": "美国",
        "follows": 40,
        "fans": 206881,
        "interaction": 294998,
        "tags": [
            { "name": "25岁", "type": "info" }
        ],
        "scrapedAt": "2025-01-17T15:51:01.110Z"
    }
]
```

#### Video Download Output

```json
[
    {
        "mode": "videoDownload",
        "url": "https://www.xiaohongshu.com/explore/...",
        "noteId": "6795e093000000001902c0dd",
        "title": "Post title here",
        "author": "hopeawinters",
        "type": "video",
        "duration": 117,
        "thumbnail": "http://...",
        "medias": [
            {
                "url": "https://sns-video-hw.xhscdn.com/pre_post/...",
                "quality": "NW_X265_MP4",
                "extension": "mp4",
                "type": "video"
            },
            {
                "url": "http://sns-video-al.xhscdn.com/stream/...",
                "quality": "WM_X264_MP4",
                "extension": "mp4",
                "type": "video"
            }
        ],
        "likes": 1000,
        "comments": 10,
        "collects": 500,
        "shares": 50,
        "tags": [],
        "scrapedAt": "2025-01-27T09:35:00.000Z"
    }
]
```

### Use Cases

- **Market Research & Trend Analysis** — Track trending topics, hashtags, and content styles.
- **Influencer Discovery** — Find and evaluate influencers by engagement metrics and content quality.
- **Competitor Intelligence** — Monitor competitor brands and product mentions.
- **Consumer Insights** — Analyze product reviews and user opinions at scale.
- **Social Media Monitoring** — Track brand mentions and sentiment across posts and comments.
- **Content Strategy** — Discover high-performing content formats and topics.
- **Video Content Archiving** — Download and archive video content for analysis.

### Limitations

- Respects Xiaohongshu's rate limits with built-in random delays.
- **Session cookie is highly recommended** for reliable access. Without it, Xiaohongshu shows login walls after a few requests.
- Comments mode **requires authentication** (session cookie) — the comments API does not work without login.
- Maximum 1,000 items per run recommended for optimal performance.
- Video download extracts URLs only (no file downloading).
- Session cookies expire after 7–30 days and need to be refreshed.

### Tips for Best Results

1. **Provide a session cookie** for the most reliable and complete scraping results.
2. Use **Apify Proxy** for reliable access and to avoid rate limiting.
3. Set reasonable `maxItems` limits — start small and scale up.
4. Run during **off-peak hours** (Chinese timezone) for better performance.
5. Use **specific keywords** for more targeted search results.
6. Combine modes in separate runs to build comprehensive datasets.
7. **Refresh cookies** if you notice increased login wall errors.

### Pricing

- **$4.99 per 1,000 results** — Pay only for what you scrape.
- Actor start cost is negligible.

### Related Actors

- Instagram Profile Scraper
- TikTok Profile Posts Scraper
- Pinterest Search Scraper
- Facebook Posts Search Scraper

# Actor input Schema

## `mode` (type: `string`):

Select which type of data to scrape. 'Search Posts' finds posts by keywords. 'Post Detail' extracts full content from specific posts. 'Comments' collects comments and replies. 'User Profile' gets profile info. 'User Posts' lists posts from a user. 'Video Download' extracts video URLs.

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

List of keywords to search for on Xiaohongshu. Each keyword runs a separate search. Only used when mode is 'Search Posts'. Example: \["ai", "fashion", "travel"].

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

How to sort search results. 'General' uses Xiaohongshu's default ranking. 'Latest' shows newest posts first. 'Most Popular' shows posts with highest engagement first.

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

Filter search results by post type. 'All Types' returns both image and video posts. 'Video Only' returns only video posts. 'Image/Text Only' returns only image and text posts.

## `postUrls` (type: `array`):

List of Xiaohongshu post URLs to scrape. Used for 'Post Detail', 'Comments', and 'Video Download' modes. Example: https://www.xiaohongshu.com/explore/670a46a50000000024017580

## `profileUrls` (type: `array`):

List of Xiaohongshu user profile URLs to scrape. Used for 'User Profile' and 'User Posts' modes. Example: https://www.xiaohongshu.com/user/profile/6784ba7f00000000080191fb

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

Maximum number of items to scrape per keyword or URL. Higher values take longer and use more compute. Start with 20 for testing, then scale up. Maximum 1000.

## `sessionCookie` (type: `string`):

Your Xiaohongshu browser cookie string for authenticated scraping. Paste the full cookie value from your browser's DevTools (Application → Cookies or Network tab → Request Headers → Cookie). This dramatically improves success rates and is required for comments scraping. Without cookies, Xiaohongshu may block access or show login walls after a few requests. See the README for a step-by-step guide on how to extract cookies.

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

Proxy settings for avoiding rate limits. Apify Proxy is recommended for best results. Residential proxies provide the highest success rate.

## Actor input object example

```json
{
  "mode": "search",
  "keywords": [
    "ai"
  ],
  "sortBy": "general",
  "noteType": "all",
  "postUrls": [],
  "profileUrls": [],
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

All scraped Xiaohongshu data including search results, post details, comments, profiles, user posts, and video download URLs.

# 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 = {
    "mode": "search",
    "keywords": [
        "ai"
    ],
    "postUrls": [],
    "profileUrls": [],
    "maxItems": 20,
    "sessionCookie": "",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("huggable_quote/xiaohongshu-all-in-one-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 = {
    "mode": "search",
    "keywords": ["ai"],
    "postUrls": [],
    "profileUrls": [],
    "maxItems": 20,
    "sessionCookie": "",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("huggable_quote/xiaohongshu-all-in-one-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "mode": "search",
  "keywords": [
    "ai"
  ],
  "postUrls": [],
  "profileUrls": [],
  "maxItems": 20,
  "sessionCookie": "",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call huggable_quote/xiaohongshu-all-in-one-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=huggable_quote/xiaohongshu-all-in-one-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "All-in-One RedNote (Xiaohongshu) Scraper",
        "description": "Scrape Xiaohongshu (RedNote/小红书) — search posts, get post details, extract comments, scrape profiles, collect user posts, and download videos without watermarks. 6 modes in one actor.",
        "version": "0.1",
        "x-build-id": "PmJ9BWFdBwIUofQFf"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/huggable_quote~xiaohongshu-all-in-one-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-huggable_quote-xiaohongshu-all-in-one-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/huggable_quote~xiaohongshu-all-in-one-scraper/runs": {
            "post": {
                "operationId": "runs-sync-huggable_quote-xiaohongshu-all-in-one-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/huggable_quote~xiaohongshu-all-in-one-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-huggable_quote-xiaohongshu-all-in-one-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "mode"
                ],
                "properties": {
                    "mode": {
                        "title": "Scraping Mode",
                        "enum": [
                            "search",
                            "postDetail",
                            "comments",
                            "profile",
                            "userPosts",
                            "videoDownload"
                        ],
                        "type": "string",
                        "description": "Select which type of data to scrape. 'Search Posts' finds posts by keywords. 'Post Detail' extracts full content from specific posts. 'Comments' collects comments and replies. 'User Profile' gets profile info. 'User Posts' lists posts from a user. 'Video Download' extracts video URLs.",
                        "default": "search"
                    },
                    "keywords": {
                        "title": "Search Keywords",
                        "type": "array",
                        "description": "List of keywords to search for on Xiaohongshu. Each keyword runs a separate search. Only used when mode is 'Search Posts'. Example: [\"ai\", \"fashion\", \"travel\"].",
                        "items": {
                            "type": "string"
                        }
                    },
                    "sortBy": {
                        "title": "Sort By",
                        "enum": [
                            "general",
                            "time_descending",
                            "popularity_descending"
                        ],
                        "type": "string",
                        "description": "How to sort search results. 'General' uses Xiaohongshu's default ranking. 'Latest' shows newest posts first. 'Most Popular' shows posts with highest engagement first.",
                        "default": "general"
                    },
                    "noteType": {
                        "title": "Note Type Filter",
                        "enum": [
                            "all",
                            "video",
                            "normal"
                        ],
                        "type": "string",
                        "description": "Filter search results by post type. 'All Types' returns both image and video posts. 'Video Only' returns only video posts. 'Image/Text Only' returns only image and text posts.",
                        "default": "all"
                    },
                    "postUrls": {
                        "title": "Post URLs",
                        "type": "array",
                        "description": "List of Xiaohongshu post URLs to scrape. Used for 'Post Detail', 'Comments', and 'Video Download' modes. Example: https://www.xiaohongshu.com/explore/670a46a50000000024017580",
                        "items": {
                            "type": "string"
                        }
                    },
                    "profileUrls": {
                        "title": "Profile URLs",
                        "type": "array",
                        "description": "List of Xiaohongshu user profile URLs to scrape. Used for 'User Profile' and 'User Posts' modes. Example: https://www.xiaohongshu.com/user/profile/6784ba7f00000000080191fb",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of items to scrape per keyword or URL. Higher values take longer and use more compute. Start with 20 for testing, then scale up. Maximum 1000.",
                        "default": 20
                    },
                    "sessionCookie": {
                        "title": "Session Cookie",
                        "type": "string",
                        "description": "Your Xiaohongshu browser cookie string for authenticated scraping. Paste the full cookie value from your browser's DevTools (Application → Cookies or Network tab → Request Headers → Cookie). This dramatically improves success rates and is required for comments scraping. Without cookies, Xiaohongshu may block access or show login walls after a few requests. See the README for a step-by-step guide on how to extract cookies."
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings for avoiding rate limits. Apify Proxy is recommended for best results. Residential proxies provide the highest success rate."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
