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.
| Option | Type | Description |
|---|---|---|
opts.engagement | string | Metric to rank by (default "Likes"). See engagements. |
opts.period | string | Time window (default "Daily"). One of Daily, Weekly, Monthly. |
opts.country | string | ISO-3 country code, or "All" for the global board (default "All"). |
opts.count | number | Page size (default 20). |
opts.cursor | string | Pagination cursor (from nextCursor). |
opts.viaRemote | boolean | Fetch the binary feed to obtain the timeline token instead of building it locally. Costs an extra request; off by default. |
opts.raw | boolean | Return the unparsed GenericTimelineById GraphQL response instead of parsed tweets. |
// 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.
| Value | UI label |
|---|---|
Likes | Most Likes |
Replies | Most Replies |
Bookmarks | Most Bookmarks |
Quotes | Most Quotes |
VideoQualityViews | Most 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.
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.
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.
| Field | Description |
|---|---|
token | The base64 Timeline: token (feed into GenericTimelineById). |
params | { engagement, country, period } decoded from the token. |
decoded | The full decoded payload (see wire format). |
status | HTTP status. |
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.
const page = await client.jetfuel.inspirationPage();
page.strings.filter((s) => s.length > 2); // "United States", "Canada", "Brazil", ...