Overview
This node integrates with the Xiaohongshu (Little Red Book) API, specifically enabling users to search notes within the platform. It is useful for scenarios where you want to programmatically retrieve content based on keywords from Xiaohongshu's note database. For example, marketers or analysts can use this node to gather posts related to specific topics or trends by searching notes with relevant keywords.
Properties
| Name | Meaning |
|---|---|
| 关键词 (keywords) | The search keywords to find matching notes. This is a required string input. |
| 限制结果数量 (limit) | Maximum number of search results to return. Must be a number greater than or equal to 1. Default is 50. |
Output
The node outputs JSON data representing the search results from Xiaohongshu notes. Each item in the output corresponds to a note matching the search criteria. The structure typically includes details about each note such as its content, author, creation time, and other metadata provided by the Xiaohongshu API.
If the node supports binary data output, it would relate to media content within notes (e.g., images or videos), but this is not explicitly indicated in the provided code snippet.
Dependencies
- Requires an API key credential for authenticating with the Xiaohongshu API.
- The base URL for API requests is dynamically set from the credential domain.
- The node expects JSON responses and sends requests with appropriate headers (
Accept: application/json,Content-Type: application/json).
Troubleshooting
- Common issues:
- Invalid or missing API credentials will cause authentication failures.
- Providing empty or invalid keywords may result in no search results or errors.
- Exceeding rate limits imposed by the Xiaohongshu API could lead to request rejections.
- Error messages:
- Authentication errors usually indicate problems with the API key or token; verify credentials.
- Validation errors may occur if the
limitproperty is set below 1 or if required fields are missing. - Network or timeout errors suggest connectivity issues or API downtime.
Links and References
- Xiaohongshu Official API Documentation (Note: link is illustrative; please refer to official sources)
- n8n documentation on Creating Custom Nodes