Xiaohongshu Extract for Openclaw

A high-performance script to scrape metadata, user info, and video details from Xiaohongshu share or discovery URLs.

jovijovi
v1.0.0
Feb 5, 2026
1
2.8k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install xiaohongshu-extract

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install xiaohongshu-extract using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Xiaohongshu Extract?

Xiaohongshu Extract is a specialized data extraction utility designed to parse the internal state of Xiaohongshu (XHS) web pages. By targeting the window object on public URLs, it retrieves structured data including titles, descriptions, user profiles, and engagement metrics. This skill is an essential component of the Openclaw Skills library for developers and researchers needing reliable access to XHS content without manual copying.

Xiaohongshu Extract Use Cases

  • Automating the collection of engagement stats like like counts and shares for social media auditing.
  • Extracting direct video stream URLs and metadata for media processing pipelines.
  • Performing competitive analysis by scraping tags and content descriptions at scale.
  • Integrating XHS data fetching into larger AI agent workflows via Openclaw Skills.

How Xiaohongshu Extract Works

  1. The user provides a Xiaohongshu share or discovery URL as an input to the python script.
  2. The extractor fetches the page and identifies the window initial state containing the raw note data.
  3. The script parses the JSON payload to extract note details, user info, and engagement metrics.
  4. Structured JSON is returned to the user or saved to a specified file for downstream analysis.

Xiaohongshu Extract Setup

To use this tool within your Openclaw Skills environment, ensure Python is installed and run the following commands:

# Run the extractor and print formatted JSON
python scripts/xiaohongshu_extract.py "<xhs_url>" --pretty

# Save the output to a specific JSON file
python scripts/xiaohongshu_extract.py "<xhs_url>" --output data.json

Xiaohongshu Extract Data Schema & Taxonomy

The skill produces a detailed JSON object. Key data points include:

Field Description
note_id Unique identifier for the extracted note.
user Nested object containing nickname, user_id, and avatar.
interact Engagement metrics including likes, comments, and shares.
video Video-specific details like duration, FPS, and stream URL.
flat A flattened record with ISO timestamps for easy database ingestion.

Xiaohongshu Extract Advanced Features

  • Support for --flat-only mode to generate simplified records for data analysis.
  • Error reporting via --error-json to capture status codes and failure reasons in a machine-readable format.
  • Capability to handle both standard discovery links and mobile share URLs.
  • Seamless interoperability with other Openclaw Skills for complex research automation.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*