Skip to main content
GET
Top tweets API: most liked & viewed posts on X
1 credit per tweet · Up to 100 tweets per list · All plans from $0.00012/credit · Supports guest paid reads

The tweets X ranks highest

Use GET /x/tweets/top to list the tweets X ranks highest by one metric, as x.com’s Inspiration page shows them. Pick the metric and how far back to look. Narrow it to one country or one language, or leave both out for all of X. Pages hold up to 20 tweets. Pass next_cursor as cursor for the next page. The list ends at 100 tweets.

Query parameters

string
default:"likes"
What to rank tweets by: likes, replies, quotes, bookmarks, shares, or views. Singular names work too, such as like.
string
default:"day"
How far back to look: day, week, or month. Also takes 24h, 7d, 30d, daily, weekly, and monthly.
string
Only tweets from one country, as a 2- or 3-letter ISO 3166 code, such as US or USA. Send country or language, not both.
string
Only tweets in one language, as a 2-letter code, such as en. Send country or language, not both.
string
next_cursor from the previous page.
number
default:"20"
Tweets per page, from 1 to 100. Your credits can return fewer.

Headers

string
Full account key. Sessions and OAuth also work.
string
Bearer xq_your_guest_key_here for paid_reads.

Response

200 OK

object[]
The tweets in X’s order, each with its author, text, media, and metrics, as Search tweets returns them.
boolean
true while more tweets follow, up to 100.
string
Pass it as cursor for the next page. Empty on the last page.

400 Invalid input

The message says which parameter to fix.

401 Unauthenticated

Anonymous requests get WWW-Authenticate: Bearer and a guest wallet checkout action. This is not a Payment challenge.

402 Payment required

Account keys get account options. Guest keys get guest top-up only. No checkout starts automatically. Confirm any payment action.

502 X API unavailable

The read service returned an error. Retry after a short delay.