Search Tweets logo

Catalog action Social

Search tweets using Twitter/X advanced search syntax. Supports Latest and Top result types. Returns tweet data including text, author, engagement metrics, and media. Paginated with cursor. Ideal for: monitoring keywords, tracking conversations, content discovery, sentiment analysis. Profile picture is opt-in via includeProfilePicture.

At a Glance

FieldValue
Action IDx-search-tweets
CategorySocial
ConnectorNot required
Requires gasNo
Funds movementNone declared
Tagssocial, twitter, x, tweets, search, read

Payload Schema

FieldTypeRequiredDescription
querystringYesSearch query using Twitter advanced search syntax (e.g., 'from:elonmusk', '#crypto', 'bitcoin OR ethereum')
queryTypestringNoResult type: 'Latest' for chronological order, 'Top' for most engaged tweets. Default: 'Latest'
cursorstring | nullNoPagination cursor from a previous response to retrieve the next page of results. 'null' is treated the same as omitting the field (start from the first page). When the previous response had reached the end, 'nextCursor' is a sentinel value; passing that sentinel back returns an empty result so a pagination loop stops instead of restarting from the first page.
includeProfilePicturebooleanNoInclude the author's profile picture URL in each tweet. Off by default because the URL plus inlined base64 can bloat responses past the 100KB downstream limit. When false (default), 'authorProfilePicture' is returned as null.

Result Schema

FieldTypeRequiredDescription
statusstringYes'success' or 'error'
tweetsarrayYesArray of tweet objects matching the search query
totalResultsnumberYesNumber of tweets returned in this response
hasNextPagebooleanYesWhether more results are available via pagination
nextCursorstring | nullNoCursor to pass as 'cursor' in the next request for the following page. When there are no more results this is a sentinel value (not null); passing it back yields an empty result, so a pagination loop terminates instead of restarting from the first page. Use 'hasNextPage' to decide whether to continue.
errorstringNoError message if status is 'error'

Examples

json
{ "type": "x-search-tweets", "payload": { "query": "status:open" }, "children": []}

Payload fields can use workflow expressions such as {{$trigger.body.amount}}, {{$nodes.fetch.result.price}}, and {{$props.asset}} when the value should come from a trigger, prior node, or reusable workflow prop.