Problem
The convenience shortcuts that read posts request a thin set of tweet.fields / expansions / user.fields, and no media.fields. That makes responses incomplete for common use cases (full post body, long posts, X Articles, images/video, author avatars).
Affected helpers in api/shortcuts.go:
| Shortcut |
Current gaps (examples) |
ReadPost |
No text, note_tweet, or article; no attachments.media_keys / media fields; no profile_image_url |
SearchPosts |
Same class of gaps (no attachments/media, no full text/article fields) |
GetUserPosts |
No text / note_tweet / article; no author expansion or media |
GetTimeline |
Same |
GetMentions |
Same |
GetBookmarks |
Same |
GetLikedPosts |
Same |
Why it matters
X API v2 returns only the fields you ask for. With the current defaults:
- Full text is unreliable — without
text and especially note_tweet, long posts can be truncated or missing the long-form body.
- X Articles are invisible — without
article (and article media expansions), Article posts have no usable payload for title/cover/content-related data.
- Media is incomplete —
attachments alone is not enough; you need expansions=attachments.media_keys plus media.fields (e.g. url, preview_image_url, type, variants) to resolve images/video.
- Author presentation is thin — several endpoints omit
profile_image_url / verified on expanded users, which agents and UIs need for a usable post card.
People using xurl read, search, timeline, mentions, bookmarks, likes, etc. reasonably expect a “full enough” post payload without hand-building query strings every time. Today they must drop to raw xurl get /2/tweets/... with a custom query.
Expected behavior
All post-read shortcuts should request a consistent, rich default set, for example:
tweet.fields: include at least text, note_tweet, article, attachments, plus the existing useful fields (created_at, public_metrics, entities, …)
expansions: author_id, attachments.media_keys, article.cover_media, article.media_entities (and keep endpoint-specific ones like referenced_tweets.id where already present)
user.fields: username, name, verified, profile_image_url
media.fields: url, preview_image_url, type, variants
Write shortcuts (post, reply, like/bookmark/etc.) do not need to change.
Proposed direction
Expand the query strings on the seven read helpers above and add a regression test that asserts those query params are present on each endpoint.
Problem
The convenience shortcuts that read posts request a thin set of
tweet.fields/expansions/user.fields, and nomedia.fields. That makes responses incomplete for common use cases (full post body, long posts, X Articles, images/video, author avatars).Affected helpers in
api/shortcuts.go:ReadPosttext,note_tweet, orarticle; noattachments.media_keys/ media fields; noprofile_image_urlSearchPostsGetUserPoststext/note_tweet/article; no author expansion or mediaGetTimelineGetMentionsGetBookmarksGetLikedPostsWhy it matters
X API v2 returns only the fields you ask for. With the current defaults:
textand especiallynote_tweet, long posts can be truncated or missing the long-form body.article(and article media expansions), Article posts have no usable payload for title/cover/content-related data.attachmentsalone is not enough; you needexpansions=attachments.media_keysplusmedia.fields(e.g.url,preview_image_url,type,variants) to resolve images/video.profile_image_url/verifiedon expanded users, which agents and UIs need for a usable post card.People using
xurl read,search,timeline,mentions,bookmarks,likes, etc. reasonably expect a “full enough” post payload without hand-building query strings every time. Today they must drop to rawxurl get /2/tweets/...with a custom query.Expected behavior
All post-read shortcuts should request a consistent, rich default set, for example:
tweet.fields: include at leasttext,note_tweet,article,attachments, plus the existing useful fields (created_at,public_metrics,entities, …)expansions:author_id,attachments.media_keys,article.cover_media,article.media_entities(and keep endpoint-specific ones likereferenced_tweets.idwhere already present)user.fields:username,name,verified,profile_image_urlmedia.fields:url,preview_image_url,type,variantsWrite shortcuts (
post,reply, like/bookmark/etc.) do not need to change.Proposed direction
Expand the query strings on the seven read helpers above and add a regression test that asserts those query params are present on each endpoint.