# rednote（小红书）profile scraper (`funny_ground/xiaohongshu-profile-scraper`) Actor

Turn Xiaohongshu (RedNote) profile URLs or user IDs into structured public profile data: followers, likes, bio, avatar, tags, and location. Lightweight HTTP extraction keeps runs fast and compute costs low, with no residential proxy.

- **URL**: https://apify.com/funny\_ground/xiaohongshu-profile-scraper.md
- **Developed by:** [Coor Yu](https://apify.com/funny_ground) (community)
- **Categories:** Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.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/platform/actors/running/actors-in-store#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

## Xiaohongshu Profile Scraper — Fast, No Residential Proxy

Turn Xiaohongshu (RedNote / 小红书) profile URLs or user IDs into clean, structured public profile data. Get followers, likes and collections, bio, avatar, profile tags, and any public location label in one run.

Built on lightweight HTTP requests instead of a headless browser, so runs are fast and compute-efficient. This Actor does not use residential proxies.

### Why users choose this Actor

- Accepts full profile URLs, `xhslink.com` share links, copied share text, or user IDs.
- Exports analysis-ready JSON, CSV, Excel, or API results with one row per profile.
- Handles large batches with configurable concurrency and request limits.
- Returns the exact public follower and “likes + collections” totals when Xiaohongshu exposes them in mobile SSR.
- Collects public data only—no login, cookies, or private-account access.

### Cost-efficient by design

This Actor uses lightweight HTTP extraction, avoiding browser startup and residential-proxy traffic. That keeps Apify compute and bandwidth usage low. The Actor is currently private, so there is no public Store result price; if it is published, the **Pricing** tab will show the final rate.

Paste your profiles into **Input** and click **Start** to export the results.

### What it extracts

- Xiaohongshu user ID and public profile URL
- Nickname and Xiaohongshu ID (`redId`)
- Avatar URLs and bio
- Public gender label and IP location, when shown by Xiaohongshu
- Following, followers, and likes + collections counts
- Public profile tags
- Per-input success/error details and scrape timestamp

Only fields publicly rendered on the supplied profile page are collected. The Actor does not log in, bypass access controls, or scrape private account data.

### Input

```json
{
  "profileUrls": [
    "65c381340000000011014d37",
    "https://www.xiaohongshu.com/user/profile/65c381340000000011014d37"
  ],
  "connectionMode": "DIRECT",
  "maxConcurrency": 8,
  "maxRequestsPerMinute": 240,
  "maxRequestRetries": 2
}
```

`profileUrls` accepts:

- Long Xiaohongshu profile URLs
- `xhslink.com` profile share links
- Bare 24-character Xiaohongshu user IDs
- Full copied share text containing one of those URLs

`connectionMode` is intentionally restricted to:

- `DIRECT` — the Actor container's own datacenter IP (default and lowest-overhead mode)
- `APIFY_DATACENTER` — Apify automatic datacenter proxy pool when rotation is useful

The Actor does not accept a residential proxy group or arbitrary custom proxy URL.
Its default allocation is 256 MB, and short 20-second navigation / two-retry limits prevent blocked profiles from consuming unnecessary compute.

### Output example

```json
{
  "success": true,
  "input": "65c381340000000011014d37",
  "profileUrl": "https://www.xiaohongshu.com/user/profile/65c381340000000011014d37",
  "userId": "65c381340000000011014d37",
  "nickname": "示例账号",
  "redId": "123456789",
  "bio": "公开简介",
  "gender": "female",
  "ipLocation": "上海",
  "following": 8,
  "followers": 440,
  "followersText": "440",
  "followersLowerBound": 440,
  "followersIsExact": true,
  "likesAndCollects": 2387,
  "likesAndCollectsText": "2387",
  "likesAndCollectsLowerBound": 2387,
  "likesAndCollectsIsExact": true,
  "countsSource": "xiaohongshu_mobile_profile_ssr",
  "tags": [],
  "scrapedAt": "2026-07-29T00:00:00.000Z"
}
```

Counter accuracy is explicit:

- Mobile public SSR is preferred because it exposes exact counters even when the desktop page shows only `10+` or `1千+`.
- Tokenized profile/share links normally need one lightweight request. For a bare user ID or canonical URL, the Actor may use the desktop SSR page to obtain its public profile access token and then make one mobile SSR request.
- If Xiaohongshu does not expose an exact mobile value, the Actor does **not** invent one. It preserves the desktop source text, returns a numeric lower bound, and sets `...IsExact: false`.
- `likesAndCollects` follows Xiaohongshu's public profile label “获赞与收藏”; it is a combined total, not likes alone.

### Performance model

The desktop and mobile profile pages expose the required public metadata in their SSR initial states, so the Actor does not download browser binaries, execute page JavaScript, or call signed private endpoints. Crawlee provides adaptive concurrency, a global requests-per-minute cap, cookie/session reuse, and session retirement on block responses.

Start with the defaults. Raising concurrency beyond the target's sustainable request rate can reduce total throughput by increasing retries. No scraper can guarantee a fixed throughput because Xiaohongshu can change its markup, rate limits, or access policy.

### Local development

```bash
npm ci
npm test
npm run test:live
```

Run the Actor locally with the Apify CLI after placing input in local Actor storage, or deploy it directly:

```bash
npx apify-cli login
npx apify-cli push
```

For local runs without Apify Proxy, use `"connectionMode": "DIRECT"`.

### Operational notes

- Use only where your collection and downstream processing comply with Xiaohongshu's terms and applicable privacy/data-protection law.
- Treat public profile fields as personal data where applicable; minimize retention and restrict redistribution.
- A failed input is written to the dataset with `success: false`, so batch consumers can reconcile every supplied reference.
- If Xiaohongshu changes the SSR state shape, update `src/parser.js` and its fixture-based tests before increasing traffic.

# Actor input Schema

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

Xiaohongshu profile URLs, xhslink.com profile share links, or 24-character user IDs. Full copied share text containing a URL is also accepted.

## `connectionMode` (type: `string`):

APIFY\_DATACENTER uses Apify's automatic datacenter proxy pool. DIRECT uses the Actor's own datacenter IP. Residential proxies are never selected.

## `maxConcurrency` (type: `integer`):

Maximum number of profiles processed in parallel. The crawler also adapts to available CPU and memory.

## `maxRequestsPerMinute` (type: `integer`):

Global throughput cap. Increase cautiously if the target remains stable.

## `maxRequestRetries` (type: `integer`):

Retries use a fresh crawler session after blocking or transient failures.

## Actor input object example

```json
{
  "profileUrls": [
    "https://www.xiaohongshu.com/user/profile/65c381340000000011014d37"
  ],
  "connectionMode": "DIRECT",
  "maxConcurrency": 8,
  "maxRequestsPerMinute": 240,
  "maxRequestRetries": 2
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("funny_ground/xiaohongshu-profile-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("funny_ground/xiaohongshu-profile-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 '{}' |
apify call funny_ground/xiaohongshu-profile-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/5HJt5xV5Gp6bsAAEp/builds/fodBP9wXD1ZwSPpsP/openapi.json
