npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-rednotes

v1.3.6

Published

n8n node for Rednote (小红书) API

Downloads

58

Readme

n8n-nodes-rednotes

n8n的自定义节点包,提供小红书平台集成功能,支持内容搜索、用户信息获取、登录管理和笔记交互等操作。

功能特性

🔍 内容搜索

  • 根据关键词搜索小红书笔记
  • 支持结果数量限制
  • 获取笔记详情信息

👤 用户管理

  • 获取用户信息
  • 获取用户笔记列表
  • 用户数据统计

🔐 登录管理

  • 获取登录二维码
  • 检查登录状态
  • 手机号验证码登录
  • 自动获取和保持登录会话

📝 笔记交互

  • 点赞/取消点赞笔记
  • 收藏/取消收藏笔记
  • 发表评论
  • 下载笔记图片

安装

通过n8n界面安装

  1. 在n8n中,导航到 Settings > Community Nodes
  2. 点击 Install
  3. 输入包名:n8n-nodes-rednotes
  4. 点击安装

通过命令行安装

cd ~/.n8n
npm install n8n-nodes-rednotes

配置

凭据设置

  1. 在n8n工作流中添加Rednote节点
  2. 在凭据设置中选择 Rednote API
  3. 配置以下参数:
    • Domain: API服务地址(如:http://localhost:3000
    • Headless: 是否使用无头浏览器模式
    • User Agent: 自定义用户代理(可选)
    • Browserless URL: 远程浏览器服务地址(可选)

节点操作

登录相关

1. 获取登录二维码 (Get Login QR Code)

  • 操作类型: 获取登录二维码
  • 返回: 二维码文件路径和使用说明

2. 检查登录状态 (Check Login Status)

  • 操作类型: 检查当前登录状态
  • 返回: 登录状态、用户信息和cookies

3. 手机号登录 (Login with Phone)

  • 手机号: 用于登录的手机号码
  • 验证码: 验证码(可选,不填写则只发送验证码)
  • 返回: 登录结果或验证码发送状态

内容搜索

1. 搜索内容 (Search Content)

  • 关键词: 搜索关键词
  • 结果限制: 返回结果数量限制
  • 返回: 笔记列表(标题、内容、作者、互动数据等)

2. 获取笔记详情 (Get Content Details)

  • 笔记URL: 小红书笔记的完整URL
  • 返回: 笔记详细信息(标题、内容、标签、图片、互动数据等)

用户操作

1. 获取用户信息 (Get User Profile)

  • 用户URL: 小红书用户主页URL
  • 返回: 用户详细信息(用户名、简介、粉丝数、笔记数等)

2. 获取用户笔记 (Get User Notes)

  • 用户URL: 小红书用户主页URL
  • 数量限制: 获取笔记数量限制
  • 返回: 用户笔记列表

笔记交互

执行笔记操作 (Perform Note Operations)

  • 笔记URL: 要操作的笔记URL
  • 点赞: 是否点赞笔记
  • 收藏: 是否收藏笔记
  • 评论内容: 评论内容(可选)
  • 返回: 各操作执行结果

媒体下载

下载图片 (Download Images)

  • 图片URL: 要下载的图片URL,多个URL用逗号分隔
  • 保存目录: 保存目录(可选,留空保存到临时目录)
  • 返回: 下载结果和文件信息

工作流示例

示例1:搜索并分析热门笔记

  1. 搜索内容 - 使用关键词搜索笔记
  2. 获取详情 - 获取感兴趣的笔记详情
  3. 数据存储 - 将结果存储到数据库

示例2:用户分析工作流

  1. 获取用户信息 - 分析特定用户
  2. 获取用户笔记 - 获取用户的所有笔记
  3. 数据统计 - 分析用户活跃度和内容质量

示例3:自动互动工作流

  1. 检查登录状态 - 确保账号已登录
  2. 搜索内容 - 搜索相关笔记
  3. 执行笔记操作 - 批量点赞、收藏或评论

技术要求

  • Node.js: >= 20.15
  • n8n: 最新版本
  • 浏览器: 支持Chrome/Chromium

注意事项

使用建议

  1. 建议合理控制请求频率,避免触发平台的反爬机制
  2. 使用代理可以提高稳定性并避免IP被封
  3. 定期检查登录状态,确保会话有效

安全提醒

  1. 请妥善保管登录凭证和cookies
  2. 遵守小红书的服务条款
  3. 仅用于合法的自动化场景

项目结构

n8n-nodes-rednotes/
├── dist/                    # 编译输出
│   ├── credentials/        # 凭证文件
│   │   └── Rednote.credentials.js
│   └── nodes/              # 节点文件
│       └── Rednote/
│           ├── Rednote.node.js
│           └── rednote.svg
├── src/                     # 源代码
│   ├── credentials/        # 凭证源码
│   └── nodes/              # 节点源码
├── package.json            # 项目配置
├── index.js               # 入口文件
├── README.md              # 说明文档
├── LICENSE.md             # 许可证文件
└── gulpfile.js            # 构建配置

故障排除

常见问题

  1. 登录失败

    • 检查网络连接
    • 确保浏览器版本兼容
    • 尝试手动登录后再使用节点
  2. 搜索无结果

    • 确认已正确登录
    • 检查关键词是否正确
    • 调整结果限制参数
  3. 操作失败

    • 检查笔记URL是否正确
    • 确认账号有相应权限
    • 查看详细错误信息

免责声明

本项目仅供学习和研究使用,请遵守小红书的服务条款和相关法律法规。使用本项目所产生的任何后果由使用者自行承担。

许可证

MIT License - 详见 LICENSE.md 文件

贡献

欢迎提交Issue和Pull Request来改进项目。

联系方式