Overview
This node integrates with the Horizon Data Wave Reddit API to perform searches for Reddit posts based on user-defined criteria. It is particularly useful for scenarios where you want to programmatically retrieve Reddit content matching specific keywords, filter by subreddit, or sort results according to relevance, popularity, or recency.
Practical examples include:
- Monitoring mentions of cryptocurrencies like Bitcoin or Ethereum across Reddit.
- Gathering trending posts from a particular subreddit such as "cryptocurrency".
- Analyzing community discussions over different time periods (e.g., last day, week, month).
- Collecting data for sentiment analysis or market research based on Reddit activity.
Properties
| Name | Meaning |
|---|---|
| Query | Search query string for Reddit posts (e.g., "crypto bitcoin"). |
| Count | Maximum number of posts to return (default 20). |
| Advanced Search Options | Collection of optional filters: |
| - Sort | Sort order for search results. Options: Relevance, Hot, New, Top, Rising, Comments. |
| - Time Filter | Time period to search within. Options: All Time, Hour, Day, Week, Month, Year. |
| - Subreddit | Specific subreddit to search in (without the "r/" prefix), e.g., "cryptocurrency". |
| Timeout | Timeout in seconds for the search request (range 20-1500, default 300). |
Output
The node outputs an array of JSON objects, each representing a Reddit post matching the search criteria. Each item contains the raw data returned by the Horizon Data Wave Reddit API for a single post.
If the API returns multiple posts, each post is output as a separate JSON object in the array.
No binary data output is produced by this node.
Dependencies
- Requires an API key credential for authenticating with the Horizon Data Wave Reddit API.
- The base URL for requests is
https://api.horizondatawave.ai. - The node uses HTTP POST requests to
/api/reddit/search/postsendpoint. - Proper configuration of the API authentication credential in n8n is necessary.
Troubleshooting
- Timeouts: If the search takes too long, consider increasing the timeout property (within allowed limits) or reducing the count of posts requested.
- API Errors: Errors from the API are captured and can include HTTP status codes and error messages. Common issues might be invalid queries, exceeding rate limits, or authentication failures.
- Empty Results: Ensure the query string is valid and that the subreddit (if specified) exists and has relevant posts.
- Rate Limits: The API may enforce rate limits; if you encounter errors related to token points or request limits, reduce request frequency or contact the API provider.
- When errors occur, detailed information including HTTP status, API error message, request ID, execution time, and token points used is included in the error output if "Continue On Fail" is enabled.
Links and References
- Horizon Data Wave API Documentation (Assumed link, replace with actual if available)
- Reddit API Concepts (For general understanding of Reddit data)
