HDW Twitter icon

HDW Twitter

Integrate with Horizon Data Wave Twitter (X) API

Actions4

Overview

The "Search Posts" operation of the HDW Twitter node enables users to search for Twitter posts (tweets) using a variety of query parameters and filters. This node interacts with the Horizon Data Wave Twitter (X) API to retrieve tweets matching specified criteria.

Common scenarios where this node is beneficial include:

  • Monitoring social media trends by searching tweets containing specific keywords or hashtags.
  • Conducting sentiment analysis or market research by filtering tweets based on language, date range, or engagement metrics.
  • Tracking mentions or interactions related to particular accounts or topics.

Practical example: A marketing analyst wants to find the top 20 English-language tweets mentioning "bitcoin" or "crypto" posted in the last week, excluding certain words, and only from verified accounts. They can configure the query, language, date range, and other advanced options to get precise results.

Properties

Name Meaning
Query The main search query string to find tweets matching keywords or phrases (e.g., crypto OR bitcoin).
Count Maximum number of tweet results to return (default 20).
Advanced Search Options Additional filters to refine the search results:
- Exact Phrase Tweets containing this exact phrase.
- Any of These Words Tweets containing any of these comma-separated words.
- None of These Words Tweets containing none of these comma-separated words.
- These Hashtags Tweets containing these comma-separated hashtags (without the # symbol).
- Language Language filter for tweets. Options: English, Arabic, Simplified Chinese, French, German, Hindi, Japanese, Korean, Portuguese, Russian, Spanish. Default is English.
- From These Accounts Tweets originating from these comma-separated Twitter usernames.
- To These Accounts Tweets sent to these comma-separated Twitter usernames.
- Mentioning These Accounts Tweets mentioning these comma-separated Twitter usernames (with @).
- Minimum Replies Minimum number of replies a tweet must have to be included.
- Minimum Likes Minimum number of likes a tweet must have to be included.
- Minimum Retweets Minimum number of retweets a tweet must have to be included.
- From Date Starting date/time for the tweet search (ISO 8601 format).
- To Date Ending date/time for the tweet search (ISO 8601 format).
- Search Type Type of search results to return. Options: Top (most relevant), Latest (most recent). Default is Top.
Timeout Timeout in seconds for the API request (range 20-1500, default 300).

Output

The node outputs an array of JSON objects representing individual tweets matching the search criteria. Each item in the output corresponds to one tweet's data as returned by the Horizon Data Wave Twitter API.

The structure of each tweet object depends on the API response but typically includes fields such as tweet text, author information, timestamps, engagement metrics (likes, retweets, replies), and possibly metadata like language or hashtags.

This node does not output binary data.

Dependencies

  • Requires an API key credential for the Horizon Data Wave Twitter (X) API.
  • The node uses HTTP POST requests to the base URL https://api.horizondatawave.ai.
  • Proper configuration of the API authentication credential within n8n is necessary.
  • The node expects the credential to provide an account ID used in API requests.

Troubleshooting

  • No credentials provided!
    Error occurs if the required API authentication credential is missing. Ensure you have configured and selected the appropriate API key credential.

  • Account ID is missing in credentials!
    The node requires an account ID from the credentials to make requests. Verify that your credential setup includes this information.

  • API errors with HTTP status codes
    The node surfaces detailed error messages including HTTP status, API error headers, request IDs, execution time, and token usage points when available. Common issues may include rate limits, invalid queries, or malformed parameters.

  • Timeouts
    If the request times out, consider increasing the timeout property (between 20 and 1500 seconds).

  • Invalid date formats
    The "From Date" and "To Date" properties must be valid date-time strings; otherwise, the conversion to UNIX timestamp may fail.

  • Empty or invalid query
    The "Query" property is required and must be a valid search string.

Links and References

Discussion