Skip to content

Repository files navigation

Rednote (Xiaohongshu / 小红书) Unofficial API

Fast, free, and open-source Rednote (小红书) video/image downloader built with Rust + Axum.

Rust

rust-clippy


🚀 About This Project

This is an unofficial, reverse-engineered API for downloading Rednote (Xiaohongshu) media.
It extracts:

  • Post information
  • High-resolution images
  • Original video URLs (no watermark)
  • Title, keywords, description
  • Engagement data (likes, comments, collects)

Fully open-source and optimized for performance.


✨ Features

  • Download Xiaohongshu videos without watermark
  • Extract all post images
  • Built with async Rust
  • Supports GET and POST
  • CORS enabled (browser-friendly)
  • Complete OpenAPI 3.0 documentation
  • Every response includes status: true/false

📦 Installation

git clone https://github.com/hostinger-bot/rednote-api.git
cd rednote-api
cargo build
cargo build --release

Start the Server

cargo run
# or for production
cargo run --release

Default URL: http://localhost:4000

Development Commands

cargo check
cargo fmt
cargo clippy

Testing

cargo test

🔥 API Endpoints

GET /api/rednote

Query Parameters:

  • url (string, required)

Example:

/api/rednote?url=http://xhslink.com/o/21DKXV988zp

POST /api/rednote

Body:

{
"url": "http://xhslink.com/o/21DKXV988zp"
}

📤 Success Response Example

{
"desc": "这碗面不仅是食物,更是快乐的来源!好吃到想每天吃!",
"downloads": [],
"duration": "",
"engagement": {
"collects": "0",
"comments": "2",
"likes": "1"
},
"images": [
"http://sns-webpic-qc.xhscdn.com/202601081924/6bd0dbeff2d295034320d652e5920a11/1040g00831ej7ki91h26g5ps768227md5hqjjk70!nd_dft_wlteh_jpg_3"
],
"keywords": "",
"nickname": "这碗面不仅是食物,更是快乐的来源!好吃到想每天吃!",
"noteId": "67c6308c000000002a00fff2",
"status": true,
"title": "这碗面不仅是食物,更是快乐的来源!好吃到想每天吃! - 小红书"
}

❌ Error Response Example

{
"status": false,
"error": "Invalid Xiaohongshu URL"
}

📚 API Documentation

  • GET /openapi.json
  • GET /docs

🧩 Response Schema

FieldTypeDescription
noteIdstringUnique Rednote post ID
nicknamestringAuthor name
titlestringPost title
descstringDescription
keywordsstringExtracted keywords
durationstringVideo duration
engagementobjectLikes, comments, collects
imagesstring[]List of image URLs
downloadsobject[]Video download sources
statusboolAPI success flag
errorstringError message (only on failure)

🤝 Contributing

PRs are welcome. Open issues, submit fixes, or suggest new features.


📄 License

MIT License © 2025 Tio (BOTCAHX)


⭐ Support

Give this project a ★ on GitHub.

About

Fast, free, and open-source Rednote (小红书) video/image downloader built with Rust + Axum.

Topics

Resources

Stars

9 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages