xiaohongshu icon

xiaohongshu

与小红书API交互

Overview

This node integrates with the Xiaohongshu (Little Red Book) API to perform operations on notes. Specifically, for the "笔记" (note) resource and the "笔记操作" (note operation), it allows users to interact with individual notes by specifying their URL and performing actions such as commenting, liking, or collecting (favoriting) the note.

Common scenarios include:

  • Automating engagement with specific notes by posting comments.
  • Liking or unliking notes programmatically.
  • Collecting or removing collection of notes for organizational purposes.

Practical examples:

  • Automatically like a note when certain conditions are met in a workflow.
  • Post a comment to a note URL provided dynamically from previous steps.
  • Collect a note to a user's favorites list based on external triggers.

Properties

Name Meaning
笔记URL The URL of the note to operate on. This is required to identify which note to target.
评论ID Optional comment ID, used if the operation involves modifying or referencing a comment.
评论内容 Optional content of the comment to post on the note.
是否点赞 Boolean flag indicating whether to like (true) or unlike (false) the note.
是否收藏 Boolean flag indicating whether to collect (true) or un-collect (false) the note.

Output

The node outputs JSON data representing the result of the performed operation on the note. This typically includes confirmation of success, details about the comment posted, or status of like/collect actions.

If binary data were involved (e.g., images), it would be summarized here, but this node focuses on JSON responses related to note interactions.

Dependencies

  • Requires an API key credential for authenticating with the Xiaohongshu API.
  • The base URL for API requests is configured via credentials.
  • The node sends JSON-formatted requests and expects JSON responses.

Troubleshooting

  • Invalid or missing note URL: Ensure the "笔记URL" property is correctly set; otherwise, the API will reject the request.
  • Authentication errors: Verify that the API key credential is valid and has necessary permissions.
  • Comment failures: If posting a comment fails, check that the comment content is not empty and complies with any API restrictions.
  • Like/Collect flags ignored: Confirm boolean values are properly set; some APIs may require explicit true/false rather than string equivalents.
  • API rate limits: Frequent operations might hit rate limits imposed by Xiaohongshu; handle errors gracefully and implement retries if needed.

Links and References

Discussion