App Logo
x.com

Get X trending topics

Read X's Explore trends for a given tab (trending, news, sports, entertainment or for-you), with each trend's rank, name, context line and post count where shown. Results are personalised to the logged-in account's location and interests, not a global chart.

Input

tab optional

Which Explore tab to read. These are X's own tabs and map to its own route segments (/explore/tabs/<tab>), which are locale-invariant even though the visible tab labels are translated. The tabs differ in row shape and the script handles both: "trending" returns ranked topics (rank + "Music · Trending" + name), while news, sports and entertainment return headline stories (headline + "9 hours ago · Other · 195K posts"). "for_you" mixes the two shapes in one list, so expect some rows with a rank and some without.

Default: "trending"
limit optional

Maximum entries to return, in the order X ranks them. The trending tab renders about 30 without scrolling and the topical tabs far fewer — sports returned only 5 — so asking for more scrolls until the list stops growing and simply returns what the tab holds.

Default: 20

Output

tab required
url required

The Explore tab URL actually read.

count required
trends required
note optional

Set when a tab rendered no rows at all — normal for for_you, which is a timeline rather than a list.

Start building not clicking