X AlgorithmTwitter AlgorithmFor You FeedExplainer

How the X Algorithm Works: Ranking Weights From the Code

How the X (Twitter) algorithm ranks the For You feed, with every weight quoted from X's open-source code, what changed on October 27, and which viral claims are wrong.

GetXAPI·
Billowing blue clouds against a pale sky, standing for the stream of posts the X algorithm sorts

The X algorithm ranks your For You feed by predicting how likely you are to like, reply, share or report each post, then adding those predictions up with fixed weights. X publishes that code, weights included. We read it line by line at the October 27, 2026 commit, and this guide quotes every number from it, explains what that commit changed, and checks the Twitter algorithm claims going viral this week against the source.

Last updated October 28, 2026. Every weight and rule below is quoted from X's open-source repository at commit 2f25214, pushed October 27, 2026 at 01

UTC, with line numbers so you can check them yourself. X's own Help Center and posts by X staff fill in what the code leaves out.

How does the X algorithm work?

For each request, X collects candidate posts, predicts your reaction to each one, scores them and filters the result. Candidates come from accounts you follow (a system called Thunder) and from accounts you do not follow (Phoenix retrieval, SimClusters and a popular-posts list). The Phoenix model predicts the probability of each action, and the score is the sum of each weight times its predicted probability. Posts older than 48 hours are dropped before scoring.

What changed in the X algorithm on October 27?

No ranking weight changed. We diffed the October 27 commit against the one before it. It synced production settings dated October 26 at 16

UTC, put a test model (Experiment19) on 30% of shadow traffic, and flipped VMRankerSendDebiasInputs from false to true (param.rs line 508). That flag sends X's reranking step seven content features per post: whether it has video, the longest video's length, whether it has photos, the media count, text length, line breaks, and whether it has a link.

Does one report cancel hundreds of likes?

No, and X's engineers say so in the code. The weights multiply your predicted probability of each action, not raw counts. The comment block above them (param.rs lines 319 to 346) calls the reading "one report cancels 468 likes" incorrect, and notes a report is more than 1,000 times less likely than a like. That is exactly the claim this post spread on October 27:

Does the X algorithm only boost paid accounts?

Not in the For You ranking code, but Premium does count for replies. We searched the scoring, filtering and reranking code at the October 27 commit and found no weight or multiplier for X Premium or verification. X's Help Center, though, says that when it ranks replies under a post it considers whether the replier is an X Premium subscriber. So paid accounts get a lift in reply threads, which the For You code does not cover. The question keeps coming up on Reddit:

Does the twitter algorithm only give reach to paid accounts now?
from r/Twitter

X algorithm ranking weights, from the code

These are the X algorithm weights exactly as they appear in home-mixer/params/param.rs at commit 2f25214, from FavoriteWeight on line 348 down to ReportWeight on line 460. A positive weight raises a post's score when the model predicts you will take that action; a negative weight lowers it. Read each weight alongside how often the action happens: reports are so rare that they need a large weight to move the score at all.

Predicted action Weight
Share via copy link 20.0
Reply 5.0 (plus 15.0 boost if you and the author follow each other)
Quote 5.0
Share via DM 5.0
Follow the author 4.0
Share 2.0
Repost 1.0
Like 0.66
Click dwell time (continuous) 0.4
Click 0.3
Open link 0.2
Photo expand, dwell 0.05 each
Video open 0.02
Dwell time (continuous) 0.006
Profile click, video quality view 0
Not dwelled minus 0.02
Block author minus 31.2
Not interested minus 52.272
Mute author minus 58.8
Report minus 234

The mutual-follow reply boost is the one weight with a public history. X's own write-up in the repository shows it was tested from July 10, 2026, launched at 20 on July 13, and cut to 15 on July 24. X's head of product announced it the day it launched:

Start building with GetXAPI

$0.05 per 1,000 tweets. $0.10 free credits. No credit card required.

How the For You feed is built, step by step

  1. Query hydration. X loads your recent engagement history, which the README calls the main input to the model, plus who you follow, block and mute, your muted keywords and posts you have already seen.
  2. Candidate sources. Thunder returns recent posts from accounts you follow. Phoenix retrieval, SimClusters and a popular-posts list add posts from accounts you do not follow.
  3. Candidate hydration. Each post gets its text, media, author details, labels and engagement counts.
  4. Pre-scoring filters. Duplicates, posts older than 48 hours, your own posts, blocked or muted authors, muted keywords, already-seen posts, and replies and reposts from accounts you do not follow are removed.
  5. Scoring. Phoenix predicts each action, the weights combine them, then three adjustments apply: repeated authors decay, posts from outside your network are discounted, and new authors get a boost.
  6. Reranking and selection. A separate service, VMRanker, reorders posts so neighbours are less alike, and the top-scoring posts are kept.
  7. Visibility filtering. After ranking, a safety system can still drop a post, or show it behind a notice or interstitial, based on labels.
  8. Blending. Ads, Who to Follow and prompts are inserted around the ranked posts.

Flow diagram of the X For You feed: your history feeds candidates from accounts you follow and accounts you don't follow, filters remove posts older than 48 hours, a model predicts and weighs actions such as like, reply, copy link and report, and the result is your For You feed

The For You pipeline in the X algorithm, simplified from the README at commit 2f25214.

Viral X algorithm claims, checked against the code

Claim What the code says
"A single report is worth minus 355 likes" Wrong reading. Weights apply to predicted probabilities, and the code's own comment rejects count equivalences like this one
"Copying the link is worth about 30 likes" Wrong reading for the same reason. The copy-link weight is 20.0 against 0.66 for a like, but both multiply probabilities
"Your post has 48 hours" True for For You. The AgeFilter drops posts older than 48 hours before scoring
"Replies only reach people who follow you" Partly true. Replies from accounts a viewer does not follow are filtered out of that viewer's For You feed; replies under a post are ranked separately
"Bookmarks do nothing" Half right. Bookmarks have no ranking weight, but ClientTweetBookmark is listed as a positive engagement in viewer_history.rs (line 30), the history the model reads
"A like is worth 0.5" Outdated. The like weight is 0.66 at the October 27 commit
"X ranks posts with a Heavy Ranker" Outdated. The heavy ranker belongs to Twitter's 2023 release (the twitter/the-algorithm repository); the current For You feed is ranked by the Phoenix model

The cheapest Twitter API. Try it free.

$0.05 per 1,000 tweets. $0.10 free credits. No credit card required.

How do I fix my X algorithm?

Retraining your feed works through the same inputs the code reads:

  1. Engage with what you want more of. Your recent likes, replies, reposts, bookmarks and follows are the main input to the ranking model.
  2. Use Not interested on posts you do not want; it is one of the weighted negative actions, at minus 52.272.
  3. Mute, block, or add muted keywords. Those posts are filtered out before scoring ever starts.
  4. Use the Following tab when you want only accounts you follow. X's Help Center confirms it shows posts from only those accounts.

How to measure whether an algorithm change affected you

The code tells you what changed; your own numbers tell you whether it mattered to you. Take a daily snapshot of your recent posts' metrics and compare before and after a commit date. GetXAPI's user tweets endpoint returns views, likes, replies, reposts, quotes and bookmarks for about 20 recent posts per call, at $0.001 per call.

import csv
import os
from datetime import datetime, timezone

import requests

API_KEY = os.environ["GETXAPI_KEY"]
FIELDS = ["viewCount", "likeCount", "replyCount", "retweetCount", "quoteCount", "bookmarkCount"]

def snapshot(username, out="post_metrics.csv"):
    r = requests.get(
        "https://api.getxapi.com/twitter/user/tweets",
        params={"userName": username},
        headers={"Authorization": f"Bearer {API_KEY}"},
        timeout=30,
    )
    r.raise_for_status()
    taken = datetime.now(timezone.utc).isoformat(timespec="seconds")
    new_file = not os.path.exists(out)
    with open(out, "a", newline="", encoding="utf-8") as f:
        w = csv.writer(f)
        if new_file:
            w.writerow(["taken_at", "post_id", "created_at"] + FIELDS)
        for p in r.json()["tweets"]:
            w.writerow([taken, p["id"], p["createdAt"]] + [p.get(k) for k in FIELDS])

snapshot("your_handle")

What we tested: on October 28, 2026 we ran this against @nikitabier and it wrote 22 posts with all six metrics in one call; his October 26 post showed 120,478 views. Run it daily with cron, and watch the repository's commit list for the date of the next change.

What this code does not tell you

  • How the reranker uses the new inputs. The October 27 change sends content features to VMRanker; the published code shows what is sent, not how it is weighted.
  • Unpublished pieces. X holds back some rule files and the prompts of its Grox classifiers to limit gaming.
  • Your personal ranking. Every viewer's predictions differ, so the same post scores differently for each person.
  • Replies under a post, search and the Following tab. This repository covers the For You feed. Reply ranking is where X's Help Center says Premium counts.

Sources

Checked October 28, 2026.

X algorithm: FAQ

Yes. X publishes the code behind the For You feed at github.com/xai-org/x-algorithm, including the ranking weights, the filters and the Phoenix model training code. A few pieces are held back to limit gaming, such as some rule files and the prompts used by its Grox classifiers.

A predicted reply carries a weight of 5.0, against 0.66 for a like, and replies between accounts that follow each other get an extra boost of 15.0 at the October 27 commit. Replies and reposts from accounts a viewer does not follow are filtered out of that viewer's For You feed.

Visibility limits live in a separate system the repository also publishes: visibility filtering decides per post and viewer whether to show it, show it behind a notice or interstitial, or drop it, based on labels other systems apply. X's Under the Hood page shows the labels applied to your own account and posts.

The repository receives commits most days, mostly syncs of production settings. X says it aims to make experiments running on 10 percent of traffic or more visible in the code. Larger changes are listed under Notable Updates in the README; the latest entry is dated September 18, 2026.

The weights at the October 27 commit give opening a link a positive weight of 0.2, and no ranking weight penalises links. Since October 27, whether a post has a URL is also sent to X's reranking step as one of its content features; the published code does not say how the reranker uses it.

Check out similar blogs

More guides on the Twitter/X API, scraping, and pricing.

Blue and orange clouds of colour bursting outward, standing for a stream of X posts turned into a feed
Twitter RSSNitter

How to Get a Twitter (X) RSS Feed Now That Nitter Is Down

X has no built-in RSS feed and the Nitter instances we tested are down. The options that still work, a tested script that builds your own feed, and an n8n setup.

GetXAPI·
Billowing blue and white clouds beneath an orange sun, standing for the conversation under an X post
X RepliesTwitter Comments

How to See Comments on X (Twitter), Including Hidden Replies

How to see comments on X (Twitter): open the post, sort the replies, find hidden replies and quote posts, and read comments without an account. Checked on X.

GetXAPI·
Abstract blue and orange globe among spheres, standing for X users counted around the world
X StatisticsTwitter Users

How Many People Use X (Twitter)? User Statistics

How many people use X: about 550 million monthly users across X and Grok, 64.7 million in the EU, 21% of US adults. Every figure sourced, plus our own sample.

GetXAPI·
Halftone illustration of a cat in orange and blue sitting in front of two large grainy spheres
JevTweet Classification

Classify 10,000 Tweets with Jev and the X API: Real Costs

We pulled 10,000 live tweets and classified every one with Jev, TypeSafe's new decision model. Real cost, latency, agreement rates, failure cases and the full script.

GetXAPI·
Surrealist figure in blue reading a book on stepped terrain under orange suns and magenta clouds
Hashtag SearchX API

How to Search Tweets by Hashtag with the X API

Tested X API hashtag queries: how the # operator differs from a plain keyword, combining hashtags, Top versus Latest, filters that work, and cursor pagination.

GetXAPI·
Surreal collage of snow mountains under orange suns and purple clouds on a deep blue field
X API ObjectsTweet Object

X (Twitter) API Object Reference: Tweet and User Fields

Every field on the X API v2 Post and User objects, plus Media, Poll and Place: type, what it holds, the auth it needs, nested keys and enum values.

GetXAPI·
Abstract orange beam descending onto blue mountain terrain, suggesting pushed event delivery
Twitter WebhooksX Activity API

X (Twitter) Webhooks: Setup, the CRC Check and Limits

How X delivers real-time events over webhooks, what the Challenge-Response Check actually asks for, the requirements that silently reject a URL, and the per-tier limits.

GetXAPI·
Abstract blue and orange landscape of monolithic blocks reflected in still water
X API ErrorsTwitter API Error Codes

X (Twitter) API Error Codes: Reference and Retry Rules

X API status codes, error type URIs and the numeric codes behind them, with the cause and the fix for each, plus the partial-error case that returns HTTP 200.

GetXAPI·

Featured in

Where GetXAPI's data and pricing get cited.

Indie Hackers: The hidden line item in your AI side project: X data
Indie Hackers·Jun 2026

The hidden line item in your AI side project: X data

Indie Hackers post on the often-overlooked cost of X data for AI side projects, citing GetXAPI as the usage-based way to pull live Twitter data without a five-figure X developer contract.

Read on Indie Hackers
Big News Network: How Companies Are Learning to Read Market Mood in Real Time
Big News Network·Jun 2026

How Companies Are Learning to Read Market Mood in Real Time

Editorial feature on Big News Network examining how companies read market mood from X in real time, citing GetXAPI as the usage-based Twitter API that prices live social listening by the call instead of a five-figure annual contract.

Read on Big News Network
Business Newswire: How Companies Are Learning to Read Market Mood in Real Time
Business Newswire·Jun 2026

How Companies Are Learning to Read Market Mood in Real Time

Syndicated feature on Business Newswire on how companies read market mood from X in real time, citing GetXAPI as the usage-based Twitter API that prices live social listening by the call.

Read on Business Newswire
SIIT: Working with Twitter/X Data: A Practical Skill for IT Students and Professionals in 2026
SIIT·Jul 2026

Working with Twitter/X Data: A Practical Skill for IT Students and Professionals in 2026

Guide on SIIT (Scholars International Institute of Technology) on collecting live Twitter/X data as a practical developer skill, citing GetXAPI as the per-call Twitter data API that makes it affordable without an X developer account.

Read on SIIT
Programming Insider: Adding Twitter/X Data to Your App in 2026: A Developer's Integration Guide
Programming Insider·Jul 2026

Adding Twitter/X Data to Your App in 2026: A Developer's Integration Guide

Developer integration guide on Programming Insider covering how to add live Twitter/X data to an app in 2026, comparing the official X API v2 with a key-based REST approach and citing GetXAPI as the low-cost per-call option with no developer-account approval.

Read on Programming Insider
TechBullion: 6 Twitter/X Scraping Solutions for Every Budget
TechBullion·Jul 2026

6 Twitter/X Scraping Solutions for Every Budget

Roundup on TechBullion of the leading Twitter/X scraping solutions, ranking GetXAPI first as the cheapest option at $0.001 per call (about $0.05 per 1,000 tweets) with clean JSON output and no monthly minimum.

Read on TechBullion
SpeakRJ: The Data Bill Behind Every Social Analytics Tool
SpeakRJ·Jun 2026

The Data Bill Behind Every Social Analytics Tool

Editorial piece on SpeakRJ examining the underlying data costs behind social analytics tools, citing GetXAPI as the usage-based way to source live X data by the call.

Read on SpeakRJ
AI Journal: What Is AI Sentiment Analysis, and What Does Each Layer Cost?
AI Journal·Aug 2026

What Is AI Sentiment Analysis, and What Does Each Layer Cost?

Explainer in AI Journal breaking sentiment analysis into its data, model and reporting layers and what each costs to run, citing GetXAPI for pulling public X posts on pay-per-call pricing.

Read on AI Journal
The Silicon Review: Why Enterprise AI Agents Still Cannot Read Social Data
The Silicon Review·Aug 2026

Why Enterprise AI Agents Still Cannot Read Social Data

Analysis piece in The Silicon Review on why enterprise agents reach internal systems easily but struggle with public social data, citing GetXAPI's MCP server and data-as-a-service model as one route to close the gap.

Read on The Silicon Review