# \[deprecated] RedNote(Xiaohongshu) Search Scraper 🔍 (`easyapi/rednote-xiaohongshu-search-scraper`) Actor

Scrape RedNote (Xiaohongshu) search results with advanced features. Extract posts, user info, and engagement metrics from China's leading lifestyle platform. Perfect for market research, trend analysis, and social listening.

- **URL**: https://apify.com/easyapi/rednote-xiaohongshu-search-scraper.md
- **Developed by:** [EasyApi](https://apify.com/easyapi) (community)
- **Categories:** Social media, Videos
- **Features:** Limited permissions
- **Stats:** 1,134 total users, 6 monthly users, 94.3% runs succeeded, 18 bookmarks
- **User rating**: 1.46 out of 5 stars

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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 Search Scraper 🔍

### Features ✨

- 🎯 Search posts by keywords
- 📊 Comprehensive data extraction
- 🚀 High performance with request filtering

### Use Cases 💡

- Market Research & Analysis
- Social Media Monitoring
- Competitor Intelligence
- Trend Spotting
- Consumer Insights
- Influencer Research

### Output Data Structure 📋

For each post, you'll get:

- Search keyword used
- Post ID and type
- User information (nickname, ID, avatar)
- Engagement metrics (likes)
- Image information (URLs, dimensions)
- Post title
- Timestamp of scraping

### Input Parameters ⚙️

| Parameter | Type | Description |
|-----------|------|-------------|
| `keywords` | Array | List of keywords to search for |
| `maxItems` | Number | Maximum number of items to scrape per keyword |

### Limitations ⚠️

- Respects Xiaohongshu's terms of service
- Includes random delays to prevent rate limiting

### Tips for Best Results 💪

1. Use specific keywords for better targeting
2. Set reasonable `maxItems` limits
3. Run during off-peak hours for better performance
4. Consider using proxy rotation for large-scale scraping

Need help or custom solutions? Feel free to reach out! 🤝

#### Input Example

A full explanation of an input example in JSON.

```json
{
    "keywords": [
        "ai"
    ],
    "maxItems": 20
}
```

#### Output sample

The results will be wrapped into a dataset which you can always find in the **Storage** tab. Here's an excerpt from the data you'd get if you apply the input parameters above:

And here is the same data but in JSON. You can choose in which format to download your data: JSON, JSONL, Excel spreadsheet, HTML table, CSV, or XML.

```json
[
    {
        "keyword": "ai",
        "item": {
            "id": "670a46a50000000024017580",
            "model_type": "note",
            "note_card": {
                "image_list": [
                    {
                        "height": 1660,
                        "width": 1242,
                        "info_list": [
                            {
                                "image_scene": "WB_DFT",
                                "url": "http://sns-webpic-qc.xhscdn.com/202501171106/9a5a4077262b93a5364fb23edcdd9fb7/1040g008318rnbkmlgs005og26aok1l06286dlgg!nc_n_webp_mw_1"
                            },
                            {
                                "image_scene": "WB_PRV",
                                "url": "http://sns-webpic-qc.xhscdn.com/202501171106/0bb022e2b3fd7ce5d31d4ffc55b8d871/1040g008318rnbkmlgs005og26aok1l06286dlgg!nc_n_webp_prv_1"
                            }
                        ]
                    },
                    {
                        "width": 1242,
                        "info_list": [
                            {
                                "image_scene": "WB_DFT",
                                "url": "http://sns-webpic-qc.xhscdn.com/202501171106/cb13ef72141a0909ab3b57587bb769b6/1040g008318rnbkmlgs0g5og26aok1l061rcpmk0!nc_n_webp_mw_1"
                            },
                            {
                                "image_scene": "WB_PRV",
                                "url": "http://sns-webpic-qc.xhscdn.com/202501171106/b8d4bba0de0cb741ac7e8d376a23d288/1040g008318rnbkmlgs0g5og26aok1l061rcpmk0!nc_n_webp_prv_1"
                            }
                        ],
                        "height": 1660
                    },
                    {
                        "width": 1242,
                        "info_list": [
                            {
                                "url": "http://sns-webpic-qc.xhscdn.com/202501171106/6d4ef8a530523eebdcbb8e918b63e1b0/1040g008318rnbkmlgs105og26aok1l06fnlsop0!nc_n_webp_mw_1",
                                "image_scene": "WB_DFT"
                            },
                            {
                                "image_scene": "WB_PRV",
                                "url": "http://sns-webpic-qc.xhscdn.com/202501171106/7122c7c99f28c5c2ed66ae4995b12680/1040g008318rnbkmlgs105og26aok1l06fnlsop0!nc_n_webp_prv_1"
                            }
                        ],
                        "height": 1660
                    },
                    {
                        "height": 1660,
                        "width": 1242,
                        "info_list": [
                            {
                                "image_scene": "WB_DFT",
                                "url": "http://sns-webpic-qc.xhscdn.com/202501171106/458a8ee764c354d9dcffecc1b93c970c/1040g008318rnbkmlgs1g5og26aok1l06sqjtobo!nc_n_webp_mw_1"
                            },
                            {
                                "image_scene": "WB_PRV",
                                "url": "http://sns-webpic-qc.xhscdn.com/202501171106/eac2bd35f2e92f3a2931a472eec4ee7c/1040g008318rnbkmlgs1g5og26aok1l06sqjtobo!nc_n_webp_prv_1"
                            }
                        ]
                    },
                    {
                        "info_list": [
                            {
                                "url": "http://sns-webpic-qc.xhscdn.com/202501171106/5e4c46ae972bdf4ebe01fea6627c1afa/1040g00831924m06ikg005og26aok1l067gka0b8!nc_n_webp_mw_1",
                                "image_scene": "WB_DFT"
                            },
                            {
                                "image_scene": "WB_PRV",
                                "url": "http://sns-webpic-qc.xhscdn.com/202501171106/6a9fb402316da5ca0aa56ec49b5f537b/1040g00831924m06ikg005og26aok1l067gka0b8!nc_n_webp_prv_1"
                            }
                        ],
                        "height": 1660,
                        "width": 1242
                    },
                    {
                        "info_list": [
                            {
                                "image_scene": "WB_DFT",
                                "url": "http://sns-webpic-qc.xhscdn.com/202501171106/0cf93838983808e3f5fc0b88b12a2427/1040g008318rnbkmlgs2g5og26aok1l069b8n64o!nc_n_webp_mw_1"
                            },
                            {
                                "image_scene": "WB_PRV",
                                "url": "http://sns-webpic-qc.xhscdn.com/202501171106/33c6bee6e587e28dea26e00bd5a08a41/1040g008318rnbkmlgs2g5og26aok1l069b8n64o!nc_n_webp_prv_1"
                            }
                        ],
                        "height": 1660,
                        "width": 1242
                    },
                    {
                        "height": 1660,
                        "width": 1242,
                        "info_list": [
                            {
                                "image_scene": "WB_DFT",
                                "url": "http://sns-webpic-qc.xhscdn.com/202501171106/0a4ae6466a84fa1e9e947cb3b4fd6894/1040g008318rnbkmlgs305og26aok1l06kqqfqa8!nc_n_webp_mw_1"
                            },
                            {
                                "image_scene": "WB_PRV",
                                "url": "http://sns-webpic-qc.xhscdn.com/202501171106/a48ab77a62e1f4ac0b00be5c544212c2/1040g008318rnbkmlgs305og26aok1l06kqqfqa8!nc_n_webp_prv_1"
                            }
                        ]
                    },
                    {
                        "height": 1660,
                        "width": 1242,
                        "info_list": [
                            {
                                "image_scene": "WB_DFT",
                                "url": "http://sns-webpic-qc.xhscdn.com/202501171106/d8d9c0de7f30c85f4af984b6c62ac311/1040g008318rnbkmlgs3g5og26aok1l06avtuleo!nc_n_webp_mw_1"
                            },
                            {
                                "url": "http://sns-webpic-qc.xhscdn.com/202501171106/3c5083da80364fcb80dd8a26e4dddfbb/1040g008318rnbkmlgs3g5og26aok1l06avtuleo!nc_n_webp_prv_1",
                                "image_scene": "WB_PRV"
                            }
                        ]
                    },
                    {
                        "height": 1660,
                        "width": 1242,
                        "info_list": [
                            {
                                "url": "http://sns-webpic-qc.xhscdn.com/202501171106/d9823a69036cb4800208e8f9b588d7b8/1040g008318rnbkmlgs405og26aok1l06ntd5gu8!nc_n_webp_mw_1",
                                "image_scene": "WB_DFT"
                            },
                            {
                                "url": "http://sns-webpic-qc.xhscdn.com/202501171106/4586583b89ac468f08155e2d5c3eee45/1040g008318rnbkmlgs405og26aok1l06ntd5gu8!nc_n_webp_prv_1",
                                "image_scene": "WB_PRV"
                            }
                        ]
                    }
                ],
                "type": "normal",
                "display_title": "国内AI工具推荐，亲测好用！",
                "user": {
                    "nick_name": "千寻AI部落",
                    "avatar": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo3138f13q208005og26aok1l06olihpp8?imageView2/2/w/80/format/jpg",
                    "user_id": "620232b1000000001000d406",
                    "nickname": "千寻AI部落",
                    "xsec_token": "ABaVqWXGkAIRf-8QqiYwjllFDByVIFaMhzHeALEsf6PWA="
                },
                "interact_info": {
                    "liked": false,
                    "liked_count": "13759"
                },
                "cover": {
                    "width": 1242,
                    "url_default": "http://sns-webpic-qc.xhscdn.com/202501171106/9a5a4077262b93a5364fb23edcdd9fb7/1040g008318rnbkmlgs005og26aok1l06286dlgg!nc_n_webp_mw_1",
                    "url_pre": "http://sns-webpic-qc.xhscdn.com/202501171106/0bb022e2b3fd7ce5d31d4ffc55b8d871/1040g008318rnbkmlgs005og26aok1l06286dlgg!nc_n_webp_prv_1",
                    "height": 1660
                }
            },
            "xsec_token": "AByUeGt1ahKuwpBC-iDpv3S0kRcHqxyRWLKaJkVAYm0d4="
        },
        "link": "https://www.xiaohongshu.com/explore/670a46a50000000024017580?xsec_token=AByUeGt1ahKuwpBC-iDpv3S0kRcHqxyRWLKaJkVAYm0d4=&xsec_source=pc_search&source=web_explore_feed",
        "scrapedAt": "2025-01-17T03:06:58.355Z"
    },
    ...
]
```

#### Related Actors

- 📱 [RedNote (Xiaohongshu) Profile Scraper](https://apify.com/easyapi/rednote-xiaohongshu-profile-scraper) - Extract user profile data including basic information, follower counts, and interaction metrics.
- 💬 [RedNote (Xiaohongshu) Comments Scraper](https://apify.com/easyapi/rednote-xiaohongshu-comments-scraper) - Scrape comments with user info, timestamps, locations, and nested replies.
- 🎥 [RedNote(Xiaohongshu) Video Downloader](https://apify.com/easyapi/rednote-xiaohongshu-video-downloader) - Download videos and comprehensive metadata from Xiaohongshu posts.
- 🔄 [All-in-One RedNote(Xiaohongshu) Scraper](https://apify.com/easyapi/all-in-one-rednote-xiaohongshu-scraper) - A versatile scraper for search results, comments, profiles, and posts.
- 📊 [Instagram Profile Scraper](https://apify.com/easyapi/instagram-profile-scraper) - Extract comprehensive Instagram profile data and engagement metrics.
- 🎯 [Instagram Posts Scraper](https://apify.com/easyapi/instagram-posts-scraper) - Scrape Instagram posts data with likes, comments, captions, and hashtags.
- 📸 [Instagram Tagged Posts Scraper](https://apify.com/easyapi/instagram-tagged-posts-scraper) - Extract detailed post data and user information from tagged posts.
- 🔍 [TikTok Profile Posts Scraper](https://apify.com/easyapi/tiktok-profile-posts-scraper) - Extract comprehensive post data from TikTok user profiles.
- 📱 [TikTok Users Scraper](https://apify.com/easyapi/tiktok-users-scraper) - Scrape TikTok user profiles from search results.
- 🎥 [TikTok Videos Scraper](https://apify.com/easyapi/tiktok-videos-scraper) - Extract video metadata from TikTok search results.
- 📊 [Social Media Influencer Scraper](https://apify.com/easyapi/social-media-influencer-scraper) - Discover top influencers across TikTok, Instagram, and YouTube.
- 🔍 [Pinterest Search Scraper](https://apify.com/easyapi/pinterest-search-scraper) - Extract pins, boards, and user data from Pinterest search results.
- 📌 [Pinterest Profile Scraper](https://apify.com/easyapi/pinterest-profile-scraper) - Extract Pinterest user profiles with follower count and engagement metrics.
- 🎯 [Facebook Posts Search Scraper](https://apify.com/easyapi/facebook-posts-search-scraper) - Extract posts from Facebook search results with engagement metrics.
- 📱 [Twitter/X Video Downloader](https://apify.com/easyapi/twitter-x-video-downloader) - Download high-quality videos from Twitter/X posts.

# Actor input Schema

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

List of keywords to search for on Xiaohongshu

## `sortType` (type: `string`):

How to sort the search results

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

Result type for the search results

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

Maximum number of items to scrape per keyword

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

Proxy settings for the scraper

## Actor input object example

```json
{
  "keywords": [
    "ai"
  ],
  "sortType": "general",
  "noteType": "all",
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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": [
        "ai"
    ],
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("easyapi/rednote-xiaohongshu-search-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": ["ai"],
    "maxItems": 100,
}

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,easyapi/rednote-xiaohongshu-search-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/9qkezGwljt2uc4DY9/builds/p2G59EQRkZVtA6FaS/openapi.json
