Guide

How the X algorithm ranks posts, from its open-source code

X publishes the code that ranks the For You feed. This guide quotes what it says about replies, links, small accounts and mutual follows, with the file and the lines for each, and says what the code cannot tell you about your own account.

Updated

In short: Xโ€™s open-source ranking code (xai-org/x-algorithm) ranks a post for each viewer by the reactions it predicts, each with a weight: a likely reply at 5.0, a likely link open at 0.2. In For You, a reply reaches only people who already follow its author; an original post from an account with 1,000 followers or fewer can get a cold-start lift in its first 48 hours; and on an original post, a likely reply counts for more when the viewer and the author follow each other. The code gives weights, not results: what works on your account is something only your own posts can show.