How the X/Twitter Algorithm Works in 2026
The Algorithm Is Not a Black Box Anymore
In March 2023, X (then Twitter) did something unprecedented for a major social platform: they open-sourced their recommendation algorithm on GitHub. For the first time, developers and researchers could see exactly how tweets were ranked, what signals mattered, and why some content went viral while similar posts got buried
Since then, the algorithm has evolved significantly. New signals have been added, weights have shifted, and the platform's priorities have changed under Elon Musk's leadership. But the core architecture remains remarkably similar to what was revealed in that initial code drop
This article breaks down how X's recommendation system works in 2026, from candidate sourcing to final ranking, based on the open-source code, public statements from X engineers, and empirical analysis of content performance across millions of tweets
The Recommendation Pipeline
X's "For You" timeline isn't just a reverse-chronological feed. Every time you open the app, the algorithm runs a multi-stage pipeline to select and rank approximately 1,500 candidate tweets down to the ones you'll actually see
Stage 1: Candidate Sourcing
The pipeline starts by gathering candidate tweets from multiple sources:
Real Graph, which predicts how likely you are to engage with each person you follow based on your interaction history- Social Graph: "What are people similar to you engaging with?" The algorithm looks at users with similar follow/engagement patterns and surfaces tweets they've interacted with
- Embedding Spaces: Tweets and users are represented as vectors in a high-dimensional space. The algorithm finds tweets whose embedding vectors are close to your interest clusters
This 50/50 split between in-network and out-of-network content was one of the most surprising revelations from the open-source release. Half of your "For You" feed is content from accounts you've never followed
Stage 2: Ranking
Once ~1,500 candidates are gathered, a neural network model scores each tweet on the probability of multiple engagement types:
The final score is a weighted combination of these predicted engagement probabilities. A tweet that the model predicts you'll like and retweet will score dramatically higher than one you'll merely read and scroll past
Key insight: Likes carry 30x the weight of replies. This is why engagement bait that generates replies ("What do you think?") actually performs worse than content that generates genuine appreciation (likes and bookmarks). The algorithm literally values a like 30 times more than a reply
Stage 3: Filtering
After scoring, several filters are applied:
Stage 4: Mixing
The final feed isn't purely ranked by score. X mixes in additional content types:
The mixer ensures the feed feels varied rather than monotonous. Even if the top 20 tweets by score are all crypto discussions, the mixer will intersperse other topics to maintain diversity
The Signals That Matter Most
Engagement Velocity
The single most important factor for a tweet going viral is engagement velocity: how quickly it accumulates interactions after posting. A tweet that gets 50 likes in its first 10 minutes will dramatically outperform one that gets 50 likes over 24 hours
This is why posting time matters so much. If your followers are active and engage quickly, the algorithm interprets that early burst as a strong signal and starts distributing the tweet to out-of-network users
The velocity window is approximately 30-60 minutes after posting. After that, the algorithm has largely made its distribution decision
The Blue Checkmark Boost
Verified accounts (X Premium subscribers) receive a measurable ranking boost. Based on the open-sourced code and subsequent testing:
This doesn't mean every verified account's tweets perform 4x better. The boost is applied to the ranking score, which then competes with all other signals. A verified account posting low-engagement content will still underperform an unverified account with genuinely engaging tweets
However, all else being equal, verification provides a significant advantage. This is one of the reasons X pushes Premium subscriptions so aggressively: it creates a direct financial incentive tied to algorithmic visibility
Media Type and Reach
Not all tweet formats are created equal:
Images: Tweets with images consistently outperform text-only tweets. The algorithm gives a moderate boost to image content, and users are naturally more likely to stop and engage with visual content. Multi-image tweets (2-4 images) perform slightly better than single images
Videos: Native video uploads (not YouTube links) receive the strongest media boost. X has been prioritizing video content since 2024. Key factors:
Links: External links are penalized. X wants users to stay on the platform. Tweets with external URLs see significantly reduced distribution compared to the same content without a link. If you must include a link, consider putting it in the first reply rather than the original tweet
Polls: Moderate boost. Polls generate replies and engagement but the interactions are lower-signal than organic likes/retweets
Threads: The first tweet in a thread is treated normally. Subsequent tweets get progressively less distribution unless the thread itself generates significant engagement
Negative Signals
The algorithm also tracks signals that reduce a tweet's ranking:
What Makes a Tweet Go Viral
Based on analysis of tens of thousands of high-performing tweets, several patterns emerge consistently:
1. Strong First Line
The first line of a tweet functions like a headline. It must stop the scroll. Questions, surprising statements, and contrarian takes perform best. The algorithm measures whether users pause their scrolling on your tweet, a clear signal of interest
2. Engagement Within Your Community
Tweets that get engagement from people you frequently interact with perform better than engagement from random accounts. The Real Graph model weighs interactions from your "strong ties" more heavily. This is why building a genuine community matters more than raw follower count
3. Quote Tweets Over Retweets
A quote tweet creates a new piece of content that gets its own ranking in the algorithm. A retweet merely re-surfaces existing content. If you want to amplify something while benefiting your own account's algorithm score, always quote-tweet with added commentary
4. Reply Depth
When your tweet generates not just replies but replies to replies (threaded conversations), the algorithm interprets this as high-quality content that sparked genuine discussion. Surface-level engagement ("Nice!" "True!") carries less weight than substantive back-and-forth
5. Cross-Cluster Distribution
The most viral tweets break out of their author's typical audience cluster. A crypto tweet that resonates with tech, finance, AND general audiences will dramatically outperform one that only engages crypto-native followers. The algorithm detects cross-cluster engagement and accelerates distribution
Crypto/NFT Content and the Algorithm
Crypto content has a unique relationship with X's algorithm:
Advantages:
Disadvantages:
What works for crypto content:
Practical Tips for Maximizing Reach
Real Graph scores with their followers, leading to better baseline distribution for every tweetUnderstanding Your Performance
Analyzing which of your tweets perform well (and why) is the most effective way to improve your algorithm positioning over time. X's built-in analytics provide basic metrics, but deeper analysis requires tracking engagement rates, audience overlap, content type performance, and posting time optimization across hundreds of tweets
The signals the algorithm weights are the same ones you measure after the fact. If you're not sure which numbers actually matter, how to measure Twitter engagement and reach breaks down impressions, engagement rate, reach and bookmarks with the exact formulas
Want to track which content formats perform best? XCROP's user endpoints return per-tweet likes, retweets, replies, views and bookmarks for any public account, which is the raw data you need to work out what lands with your specific audience
The Short Version
X's algorithm is sophisticated but not unknowable. The core principles are clear: create content that generates genuine engagement (especially likes and bookmarks), post consistently, engage with your community, and use native media formats. Knowing these mechanics won't guarantee virality, but it gives you a better baseline and a clearer reason behind each content decision
The algorithm will continue to evolve. X regularly adjusts weights and introduces new signals. But the fundamental architecture of candidate sourcing, neural ranking, and engagement-weighted scoring is likely to remain stable for the foreseeable future
One API for X (formerly Twitter) data: profiles, tweets, followers, search and real-time streams. Start free with 10,000 credits/month, no card required