# Xiaohongshu (RedNote) User Profile Scraper (`khadinakbar/xiaohongshu-user-profile-scraper`) Actor

Scrape public Xiaohongshu (RedNote) user profiles from URLs, share links, or user IDs. Returns nickname, Red ID, bio, followers, likes, IP location, and verification. Cookieless; no login. Not comments, note detail, or search. $0.01 per found profile.

- **URL**: https://apify.com/khadinakbar/xiaohongshu-user-profile-scraper.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** Social media, Lead generation, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 xiaohongshu profile scrapeds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## Xiaohongshu User Profile Scraper

Turn a public Xiaohongshu (RedNote / 小红书) profile URL, user ID, share link, or Red ID into **one structured profile row**. You get nickname, Red ID, bio, follower and following counts, likes, IP location, verification, and optional first-page note previews. No Xiaohongshu login or cookies.

This Actor is built for influencer researchers, brand analysts, and agents that already have a creator link and need a cheap, predictable profile lookup before they scrape notes or comments.

### Best fit for this Actor

- Enrich a known list of Xiaohongshu creator URLs with follower counts and bios.
- Qualify a RedNote influencer before pulling notes or comment threads.
- Feed MCP or CRM workflows with one row per public profile.

### Practical scenario

An influencer-ops analyst pastes `https://www.xiaohongshu.com/user/profile/65c381340000000011014d37`, leaves `includeRecentNotes` off, and sets `maxProfiles` to `1`. The run returns one public profile row: nickname, Red ID, bio, followers, likes, and IP location. A deleted or unknown handle finishes `SUCCEEDED` with `VALID_EMPTY` and no `profile-scraped` charge. Creators that clear the size bar can then be sent to the comments or note-detail siblings.

### Quick start input

```json
{
  "profileUrls": ["https://www.xiaohongshu.com/user/profile/65c381340000000011014d37"],
  "includeRecentNotes": false,
  "maxProfiles": 1
}
```

`profileUrls` accepts `/user/profile/{userId}` links, `xhslink.com` share links, bare 24-character user IDs, and Red IDs. Duplicate values are collapsed before any fetch.

### Input reference

| Field | Type | What it controls |
|---|---|---|
| `profileUrls` | array (required) | Public profile URLs, user IDs, share links, or Red IDs. Example: `65c381340000000011014d37`. Max 20 unique values. |
| `includeRecentNotes` | boolean | Attach a first-page public notes preview. Default false. This is a grid preview rather than a full posting archive. |
| `maxRecentNotes` | integer | Grid notes kept per profile when the preview is on. Default 6, max 12. |
| `maxProfiles` | integer | Hard cap after dedupe. Default 20. Prefill 1 keeps quality tests fast. |

### What data you receive

One dataset item is one public profile.

```json
{
  "inputProfile": "https://www.xiaohongshu.com/user/profile/65c381340000000011014d37",
  "userId": "65c381340000000011014d37",
  "redId": "Patellana",
  "profileUrl": "https://www.xiaohongshu.com/user/profile/65c381340000000011014d37",
  "nickname": "Patella",
  "bio": "Fashion notes",
  "gender": "female",
  "ipLocation": "Shanghai",
  "followerCount": 12000,
  "followingCount": 128,
  "likeCount": 100000,
  "isVerified": false,
  "provider": "scrapfly",
  "scrapedAt": "2026-09-10T12:00:00.000Z"
}
```

| Field | Meaning |
|---|---|
| `nickname` + `redId` | Public display name and Xiaohongshu Red ID |
| `followerCount` / `followingCount` / `likeCount` | Public counters when Xiaohongshu exposes them |
| `ipLocation` | Public IP location label |
| `recentNotes` | Optional first-page note preview |
| `sourceUrl` / `provider` | Page and fetch route used for the row |

`OUTPUT` and `RUN_SUMMARY` in the default key-value store hold `outcome`, `itemsPushed`, and `chargedEventCounts`.

### Use through the API

```bash
curl -X POST "https://api.apify.com/v2/acts/khadinakbar~xiaohongshu-user-profile-scraper/runs" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"profileUrls":["https://www.xiaohongshu.com/user/profile/65c381340000000011014d37"],"maxProfiles":1}'
```

Download rows as JSON, CSV, Excel, or HTML from the Dataset tab.

### Use with AI agents through Apify MCP

> Look up the public Xiaohongshu profile at https://www.xiaohongshu.com/user/profile/65c381340000000011014d37. Return nickname, redId, followerCount, likeCount, ipLocation, and isVerified. Keep the scope to public profile metadata; route comment threads and note archives to the sibling Actors.

Connect via <https://mcp.apify.com>. Read `OUTPUT.outcome` and `itemsPushed` to interpret empty datasets. Cost signal: about `$0.01` per found profile plus platform usage. Missing or deleted handles surface as `VALID_EMPTY` without a `profile-scraped` charge.

### Connect the workflow

- After you confirm the creator, scrape comment threads with [Xiaohongshu Comments Scraper](https://apify.com/khadinakbar/xiaohongshu-comments-scraper).
- For a specific note URL, use [Xiaohongshu Note Detail Scraper](https://apify.com/khadinakbar/xiaohongshu-note-detail-scraper).
- When you still need handles, discover notes with [Xiaohongshu Search Scraper](https://apify.com/khadinakbar/xiaohongshu-search-scraper) and then return here for profile enrichment.

### Pricing

This Actor uses Pay per event plus Apify platform usage. The live Pricing tab is the current source of truth for billing details.

- `apify-actor-start`: $0.00005 per run
- `profile-scraped`: **$0.01** per found public profile row

A one-profile prefill is about $0.01 in result events plus compute/proxy usage. Missing or deleted handles have no `profile-scraped` charge.

### How it works

1. Normalize and deduplicate profile URLs, user IDs, share links, and Red IDs.
2. Fetch the public profile page through an anti-bot render path, then a nested public-profile provider, then residential Firefox if needed.
3. Parse nickname, Red ID, counters, IP location, verification, and optional grid notes.
4. Charge `profile-scraped` for found rows, then write the dataset item.

### Best results

- Prefer `/user/profile/{userId}` URLs that include `xsec_token`, or `xhslink.com` share links.
- Keep `includeRecentNotes` off when you only need identity and audience size.
- A typo or deleted handle finishes `SUCCEEDED` with `VALID_EMPTY` and no profile charge.
- Explore/note URLs without a user ID belong on the note-detail or comments Actors.

### Builder's note

I found that Xiaohongshu's public web profile still ships `__INITIAL_STATE__` with nickname, Red ID, and interaction counters when the anti-bot render path succeeds. Direct datacenter HTTP usually surfaces Xiaohongshu code `300031`, so this Actor keeps the owned parser and uses a render provider first, then a nested public-profile Actor, then residential Firefox. That split keeps the product a lean one-row profile SKU rather than a notes archive.

### Legal and responsible use

Use this Actor on public Xiaohongshu profile pages you are authorized to process, follow applicable law and Xiaohongshu's terms, and keep the output in your own compliance workflow. This Actor is independent of Xiaohongshu / RedNote. It does not collect DMs, follower rosters, or login-walled data.

Issues and feature requests: use the Actor Issues tab on Apify.

# Actor input Schema

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

Public Xiaohongshu user references to look up. Accepts https://www.xiaohongshu.com/user/profile/{userId}, xhslink.com share links, bare 24-character user IDs, and Red IDs (小红书号). Profile URLs that include xsec\_token work most reliably. Up to 20 unique profiles per run. NOT explore/note URLs without a user ID, and not keyword search — use the comments, note-detail, or search siblings for those jobs.

## `includeRecentNotes` (type: `boolean`):

When true, attach a small recent-notes preview from the public profile grid (title, note ID, likes, cover when exposed). This is the first-page public preview, not a full posting archive. Defaults to false so a profile-only lookup stays cheap and fast. Each saved profile is still one profile-scraped charge.

## `maxRecentNotes` (type: `integer`):

How many public grid notes to keep on each profile row when Include recent notes preview is on. Defaults to 6. Set 0 to skip notes even if the toggle is on. Ignored when the toggle is off. Does not paginate the creator's full history.

## `maxProfiles` (type: `integer`):

Hard cap on unique profiles processed after dedupe. Defaults to 20. Prefill 1 keeps the automated quality test under five minutes. Each found public profile costs $0.01.

## Actor input object example

```json
{
  "profileUrls": [
    "https://www.xiaohongshu.com/user/profile/65c381340000000011014d37",
    "65c381340000000011014d37"
  ],
  "includeRecentNotes": false,
  "maxRecentNotes": 6,
  "maxProfiles": 1
}
```

# Actor output Schema

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

Dataset items containing nickname, Red ID, bio, follower counts, likes, IP location, verification, and optional recent-note previews.

## `output` (type: `string`):

Final outcome, itemsPushed, profilesFound, and chargedEventCounts.

## `runSummary` (type: `string`):

Per-profile outcomes, provider route, warnings, and billing counters.

# 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 = {
    "profileUrls": [
        "https://www.xiaohongshu.com/user/profile/65c381340000000011014d37"
    ],
    "maxRecentNotes": 6,
    "maxProfiles": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/xiaohongshu-user-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 = {
    "profileUrls": ["https://www.xiaohongshu.com/user/profile/65c381340000000011014d37"],
    "maxRecentNotes": 6,
    "maxProfiles": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/xiaohongshu-user-profile-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 '{
  "profileUrls": [
    "https://www.xiaohongshu.com/user/profile/65c381340000000011014d37"
  ],
  "maxRecentNotes": 6,
  "maxProfiles": 1
}' |
apify call khadinakbar/xiaohongshu-user-profile-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,khadinakbar/xiaohongshu-user-profile-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/QLPOJdSZEY92sKTUj/builds/99Z2beY4BOjEM2r20/openapi.json
