Twitter Data Node
The Twitter Data node fetches tweets from the Twitter/X API v2. Use it to pull social sentiment, monitor specific accounts, or validate trading signals with real-time social data. It supports two modes: recent search (last 7 days) and full archive search (complete history).
Configuration
General
Give this node a custom name to identify it in your workflow
Continue workflow if this node fails
Twitter / X API
Connect your Twitter API Bearer Token or use NickAI credits
Search Configuration
Describe what you want to find — we'll build the query
Words or phrases to match. Boolean operators (OR, AND, parentheses) are allowed. Supports {variable} interpolation.
Why Twitter Data Matters for Trading
Twitter/X is one of the fastest sources of market-moving information. Price action often lags social signals by minutes or hours. This node lets you tap into that signal:
- Sentiment validation — A price drop triggered your strategy, but is it real panic or just noise? Search Twitter to confirm before executing.
- Account monitoring — Track tweets from influential accounts (e.g.,
from:elonmusk doge) that historically move markets. - Social volume detection — A sudden spike in tweets about a token often precedes a price move.
- News confirmation — Validate on-chain signals (funding rates, liquidations) with social context.
The strongest pattern is using this node as a mid-workflow validation step: upstream nodes detect a quantitative signal, the Twitter node confirms it with qualitative social data, and downstream nodes make the final decision.
Configuration
| Field | Description |
|---|---|
| API Credential | Your Twitter API Bearer Token, or use NickAI credits (~0.75 credits per tweet returned). Get a token at developer.x.com ↗. |
| Search Type | Which endpoint to use: Recent Search (last 7 days, all access levels) or Full Archive Search (complete history, requires Pro/Enterprise). Default: Recent Search. |
| Query Mode | Tabs at the top of the section. Form Builder (default) — fill in the fields below. Raw Query — write the query string by hand. Both modes are stored independently; switching modes preserves whatever you've entered in either side. The active mode determines what's sent to the X API. |
| Keywords (Form mode) | Words or phrases to match (e.g. bitcoin OR ethereum, "interest rate"). Boolean operators are allowed. Supports the f(x) toggle for dynamic values from upstream nodes — see Dynamic Queries below. |
| Exclude words (Form mode) | Comma or space separated. Each word is compiled to -word. Supports f(x). |
| From accounts (Form mode) | @handles separated by comma or space. Multiple are OR-combined into (from:a OR from:b). Supports f(x). |
| Language (Form mode) | Filter to a single language code. "Any language" applies no filter. |
| Exclude retweets / Has media / Has links (Form mode) | Toggles compiled to -is:retweet, has:media, has:links respectively. |
| Custom operators (Form mode) | Escape hatch for operators not exposed in the form (e.g. conversation_id:, place:). Appended verbatim. Supports f(x). See the operator reference below. |
| Query (Raw mode) | The full search query string, written by hand. Supports f(x). Use this when you need full control or the form doesn't cover an operator you want. |
| Max Results | Number of tweets to return. Range: 10–100. Default: 10. |
| Sort Order | Sort results by recency or relevancy. |
Search Types
| Search Type | Time Range | Access Level | Rate Limit |
|---|---|---|---|
| Recent Search | Last 7 days | All (including pay-per-use) | 450 req/15 min |
| Full Archive Search | Complete history (since 2006) | Pro / Enterprise only | 300 req/15 min |
Operator Reference
Most common needs are covered by the form fields (Keywords, Exclude words, From accounts, Language, the toggles). For everything else, the Custom operators field accepts any operator from the official X search operators reference ↗. Useful ones for trading workflows:
| Operator | What it filters on |
|---|---|
$BTC | Cashtag — posts containing a specific ticker |
#bitcoin | Hashtag — posts containing a specific hashtag |
to:elonmusk | Replies addressed to a specific user |
retweets_of:elonmusk | Retweets of posts from a specific user |
min_faves:100 | Minimum like count (legacy operator — may be silently ignored on v2) |
is:verified | Posts from verified authors only |
conversation_id:1234567890 | Posts within a specific thread |
place_country:US | Posts geo-tagged to a country |
has:images / has:video_link | Posts with images or native video |
Operators are space-separated. Most are combined as AND by default; use OR and parentheses for alternation: ($BTC OR $ETH) min_faves:50.
Dynamic Queries
Toggle the f(x) button next to any text field that supports it to use a value from an upstream node. The following fields support interpolation:
- Form mode: Keywords, Exclude words, From accounts, Custom operators
- Raw mode: Query
A common validation pattern uses Keywords:
{price_data.symbol}
When the Price Data node detects a move in SOL, Keywords becomes SOL — combined with whatever filters you've set, the compiled query might be SOL -is:retweet lang:en. Language and the boolean toggles (Exclude retweets / Has media / Has links) are static per execution; everything else can be made dynamic.
Setting Up Credentials
Option 1: NickAI Credits (Recommended)
Select NickAI Credits in the credential dropdown. You're charged ~0.75 credits per tweet returned (so a 10-result search costs ~7.5 credits, a 100-result search costs ~75). No setup required.
Option 2: Your Own Bearer Token
- Go to developer.x.com ↗ and create a project/app.
- Generate an App-only Bearer Token (under "Keys and tokens").
- In NickAI, go to Credentials and click Add Credential.
- Select Twitter / X API and paste your Bearer Token.
- In the Twitter Data node, select your credential from the dropdown.
Workflow Examples
Sentiment Validation for Trade Signals
The highest-value pattern: a quantitative signal triggers a social sentiment check before executing.
In this workflow:
- Price Data fetches the current BTC price.
- Conditional checks if the price dropped more than 5%.
- Twitter Data searches for
bitcoin crash OR dump -is:retweetto gauge social sentiment. - LLM analyzes the tweets — is it real panic or just noise?
- Conditional routes based on the LLM's assessment.
- Exchange buys the dip if sentiment confirms the opportunity.
Whale Account Monitor
Track tweets from influential accounts and alert when they mention specific tokens:
Funding Rate + Social Confirmation
Combine on-chain derivatives data with social sentiment for a more robust signal:
The CoinGlass node and Twitter Data node both feed the LLM. The LLM looks for confluence — negative funding rates combined with bearish social sentiment is a stronger short signal than either alone.
Pricing & Credits
When using NickAI credits, you're charged ~0.75 credits per tweet returned — the same rate across both search types (Recent and Full Archive), since X's pay-per-use API bills per post read regardless of endpoint. You only pay for tweets actually returned, not the Max Results ceiling.
| Max Results | Tweets returned | Credits charged |
|---|---|---|
| 10 | 10 | ~7.5 |
| 10 | 4 | ~3.0 |
| 100 | 100 | ~75 |
| 100 | 23 | ~17.25 |
Before each call, NickAI reserves the worst case (maxResults × 0.75) against your balance. After the API responds, you're charged only for the actual resultCount.
Output
After execution, the node produces the following data that downstream nodes can reference:
| Path | Description |
|---|---|
| {twitter.tweets} | Array of tweet objects. Each tweet includes id, text, created_at, public_metrics, author_id, lang, and entities. |
| {twitter.tweets[0].text} | Text content of the first tweet. |
| {twitter.tweets[0].id} | Unique tweet ID. |
| {twitter.tweets[0].created_at} | ISO timestamp of when the tweet was posted. |
| {twitter.tweets[0].public_metrics} | Engagement metrics: retweet_count, reply_count, like_count, quote_count, bookmark_count, impression_count. |
| {twitter.tweets[0].author_id} | ID of the tweet author. |
| {twitter.tweets[0].lang} | Language code of the tweet (e.g., en, es, ja). |
| {twitter.tweets[0].entities} | Parsed entities: hashtags, URLs, mentions, cashtags. |
| {twitter.includes} | Expanded objects — user profiles for author_id expansions. |
| {twitter.includes.users[0].username} | Username of the first expanded user. |
| {twitter.metadata.source} | Always twitter. |
| {twitter.metadata.searchType} | The search type used (recent or full_archive). |
| {twitter.metadata.query} | The resolved search query. |
| {twitter.metadata.resultCount} | Number of tweets returned. |
| {twitter.metadata.fetchedAt} | ISO timestamp of when the search was executed. |
| {twitter.metadata.nextToken} | Pagination token for fetching the next page (if available). |
| {twitter.metadata.newestId} | ID of the most recent tweet in results. |
| {twitter.metadata.oldestId} | ID of the oldest tweet in results. |
twitter with your node's edge label. If the edge connecting this node to the next is labeled sentiment, use {sentiment.tweets[0].text} instead.Example Output
{
"tweets": [
{
"id": "1234567890",
"text": "Bitcoin just broke $100k! This is massive for the entire crypto market.",
"created_at": "2026-04-17T10:30:00.000Z",
"author_id": "9876543210",
"lang": "en",
"public_metrics": {
"retweet_count": 1542,
"reply_count": 312,
"like_count": 8901,
"quote_count": 234,
"bookmark_count": 567,
"impression_count": 2500000
},
"entities": {
"cashtags": [{ "start": 0, "end": 8, "tag": "Bitcoin" }]
}
}
],
"includes": {
"users": [
{
"id": "9876543210",
"name": "Crypto Analyst",
"username": "cryptoanalyst",
"profile_image_url": "https://pbs.twimg.com/..."
}
]
},
"metadata": {
"source": "twitter",
"searchType": "recent",
"query": "bitcoin -is:retweet lang:en",
"resultCount": 10,
"fetchedAt": "2026-04-17T10:35:00.000Z",
"nextToken": "b26v89c19zqg8o3fpzbke..."
}
}
Common Errors
| Error | Cause | Fix |
|---|---|---|
| Invalid or expired Bearer Token | Token is wrong, expired, or revoked | Regenerate your token at developer.x.com ↗ and update the credential |
| Rate limit exceeded | Too many requests in a 15-minute window | Wait for the rate limit to reset (time shown in error), or reduce polling frequency |
| This endpoint requires Pro or Enterprise access | Using Full Archive on pay-per-use | Switch to Recent Search, or upgrade your X API access level |
| Invalid search query | Malformed query syntax | Check your query operators — see the query syntax guide ↗ |
| Search query is required | Query field is empty | Enter a search query or connect an upstream node via the f(x) toggle |
Next Steps
- LLM Node — Analyze tweet sentiment, extract key themes, or classify tweets.
- Conditional Node — Route decisions based on tweet count, sentiment score, or specific keywords.
- CoinGlass Node — Combine social signals with derivatives data for stronger trading signals.
- Price Data Node — Pair social sentiment with price action for divergence analysis.
- Function Node — Parse tweet data, compute sentiment scores, or aggregate metrics.