Skip to content

Top posts

The Creator hub's "Inspiration" surface (x.com/i/jf/creators/inspiration/top_posts) is a global top-posts leaderboard: the most-engaged public posts, filterable by engagement metric, time window and country. It is the one Jetfuel feed that resolves to real tweets, so emusks gives it a proper helper.

jetfuel.topPosts(opts?)

Fetch the leaderboard as parsed tweets. Returns the standard timeline shape: { tweets, users, nextCursor, previousCursor, raw }, plus the echoed engagement, period, country and the resolved timelineId.

OptionTypeDescription
opts.engagementstringMetric to rank by (default "Likes"). See engagements.
opts.periodstringTime window (default "Daily"). One of Daily, Weekly, Monthly.
opts.countrystringISO-3 country code, or "All" for the global board (default "All").
opts.countnumberPage size (default 20).
opts.cursorstringPagination cursor (from nextCursor).
opts.viaRemotebooleanFetch the binary feed to obtain the timeline token instead of building it locally. Costs an extra request; off by default.
opts.rawbooleanReturn the unparsed GenericTimelineById GraphQL response instead of parsed tweets.
js
// most-liked posts in the US today
const { tweets } = await client.jetfuel.topPosts({
  engagement: "Likes",
  period: "Daily",
  country: "USA",
});

// most-replied globally this week, then paginate
const first = await client.jetfuel.topPosts({ engagement: "Replies", period: "Weekly" });
const next = await client.jetfuel.topPosts({
  engagement: "Replies",
  period: "Weekly",
  cursor: first.nextCursor,
});

By default topPosts builds the timeline token locally (no extra request) and resolves it directly. The token is deterministic, so this is identical to what the live UI fetches. Pass viaRemote: true if you would rather have the server hand you the token (useful as a sanity check, or if X ever changes the token format).

Engagements

The server only honors these values; anything else silently falls back to Likes.

ValueUI label
LikesMost Likes
RepliesMost Replies
BookmarksMost Bookmarks
QuotesMost Quotes
VideoQualityViewsMost Video Views

Exported as ENGAGEMENTS. Periods are exported as PERIODS (Daily, Weekly, Monthly); any other period silently falls back to Daily. The supported country codes are exported as COUNTRIES.

js
import { ENGAGEMENTS, PERIODS, COUNTRIES } from "emusks/src/helpers/jetfuel.js";

jetfuel.topPostsTimelineId(opts?)

Build the GenericTimelineById token for a given leaderboard query, offline, without any network call. Same engagement / period / country options as topPosts. This is exactly the token the feed returns.

js
const id = client.jetfuel.topPostsTimelineId({ engagement: "Quotes", country: "BRA", period: "Monthly" });
// "VGltZWxpbmU6DADKCwABAAAABlF1b3Rlcw..."

// resolve it yourself, e.g. with extra GraphQL variables
const raw = await client.graphql("GenericTimelineById", { variables: { timelineId: id, count: 40 } });

jetfuel.topPostsFeed(opts?)

Fetch the raw binary inspiration feed (creators/inspiration/remote/urt) and return what it actually contains: the embedded timeline token, its decoded parameters, and the full decoded wire format.

FieldDescription
tokenThe base64 Timeline: token (feed into GenericTimelineById).
params{ engagement, country, period } decoded from the token.
decodedThe full decoded payload (see wire format).
statusHTTP status.
js
const feed = await client.jetfuel.topPostsFeed({ engagement: "Likes", period: "Daily", country: "PRT" });
feed.token;  // "VGltZWxpbmU6DADK..."
feed.params; // { engagement: "Likes", country: "PRT", period: "Daily" }

jetfuel.inspirationPage(opts?)

Fetch and decode the leaderboard page itself (the UI shell: the country and language filter dropdowns and the engagement tabs), not the post data. Returns the decoded wire format. Useful if you want the canonical list of countries/languages X exposes.

js
const page = await client.jetfuel.inspirationPage();
page.strings.filter((s) => s.length > 2); // "United States", "Canada", "Brazil", ...

not affiliated with X Corp.