Skip to main content
GET
Twitter batch user timeline API & latest tweets
Repost records include retweetedAt, the repost event’s UTC ISO 8601 timestamp. It is null when that timestamp is unavailable. The API omits it for original posts. The nested original post keeps its own creation date. This field does not report every account that reposted a post. Request per-account timestamps with Get retweeters.

When to use the batch timeline

Use this route to read the newest tweets of up to 20 users at once. It charges only for returned tweets. Use Get user timeline to page through 1 user’s older tweets.
Requested result counts are upper bounds for paid authenticated calls. When remaining credits cannot cover the full page or ID list, Xquik returns fewer results. If zero paid results are affordable, it returns 402 insufficient_credits.
1 credit per tweet returned · Accepts account credits and guest paid_reads
The Node.js and Python snippets build tweet rows. They do not print full response pages. Send unprocessed_ids again. Skip unavailable_ids.

Several timelines in 1 call

Tweets arrive user by user, in the order you named the users. Each user’s tweets are newest first, after the pinned tweet. Group rows by author.id. A call returns up to 20 tweets per user. Set pageSize to return fewer. A batch returns 1 page: has_next_page is false & next_cursor is empty. A user with no tweets appears in neither list & adds no rows.

Query parameters

string
Comma-separated numeric user IDs. Maximum 20 per request. Send ids or usernames, not both. A user named twice is read once.
string
Comma-separated X usernames, with or without @, or profile links such as x.com/nasa, in place of ids. Maximum 20 per request. A name in another case is the same account.
integer
Tweets per user. Range: 1-20. Defaults to 20. Also read as limit, count, max_results, maxItems, max_items or per_page.

Headers

string
Full account API key. Session cookie and OAuth authentication are also supported.
string
Send Bearer xq_your_guest_key_here for an active paid_reads guest key.

Response

200 OK

object[]
Each user’s newest tweets, in the order the users were named. Tweet object fields.
string
Tweet ID.
string
Tweet text.
string
Tweet type. Omitted if unavailable.
string
ISO 8601 creation timestamp.
boolean
Whether this is a Note Tweet. Omitted if unavailable.
boolean
Whether the author pinned this post to their profile. Omitted if unavailable.
number
Like count. Omitted if unavailable.
number
Retweet count. Omitted if unavailable.
number
Reply count. Omitted if unavailable.
number
Quote tweet count. Omitted if unavailable.
number
View count. Omitted if unavailable.
number
Bookmark count. Omitted if unavailable.
string
Permalink URL on X. Omitted if unavailable.
string
Tweet language code. Omitted if unavailable.
boolean
Whether the tweet is a reply. Omitted if unavailable.
string
Conversation thread ID. Omitted if unavailable.
boolean
Whether this tweet quotes another tweet. Omitted if unavailable.
boolean
Whether this row is a retweet. text carries the original post in full.
object
Parsed entities. Omitted if unavailable.
object
Tweet author profile. Omitted if unavailable. Author object fields.
string
Author user ID.
string
Author handle without @.
string
Author display name. Omitted if unavailable.
number
Follower count. Omitted if unavailable.
boolean
Whether the author is verified. Omitted if unavailable.
string
Author profile image URL. Omitted if unavailable.
object[]
Media attachments. Omitted when the tweet has no media. Media object fields.
string
Direct media URL.
object[]
Available video renditions with bitrate, content type, and URL. Omitted for images.
string
Media type.
string
Shortened URL from the tweet text.
object
Embedded quoted tweet. Omitted if not a quote tweet.
object
Original retweeted tweet. Omitted if not a retweet.
boolean
Always false for batch requests.
string
Always empty for batch requests.
string[]
Users with no account on X or with protected tweets. They cost nothing. Skip them.
string[]
Users the call did not read. They cost nothing. Send them again.
Both lists name each user as you sent it: an ID, or a username. A profile link is named by its username.

400 Missing IDs

Send ids or usernames.

400 Too many IDs

400 Invalid user IDs

Each ids value must be a numeric user ID. Each usernames value must be a username or a link to a profile on x.com or twitter.com. Sending both ids & usernames also answers 400. The request costs nothing.

401 Unauthenticated

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

402 Payment required

Full account keys can receive no_subscription, subscription_inactive, no_credits, or insufficient_credits with account payment options. Guest keys receive only the guest top-up action. The failed request creates no checkout. Ask the user to confirm before calling any checkout or top-up route.

502 X API unavailable

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

503 No user could be read

No user’s tweets could be read. The request costs nothing. Wait for the Retry-After header, then send it again.

429 Rate limit exceeded

You exceeded your tier rate limit. Wait for the Retry-After header before retrying.

424 Dependency failed

The normalized v1 response contract can return 424 when the read service is unavailable.