Tweets
Twitter user likes API & liked tweet export
Read your X account’s liked tweets with authors, text, media & metrics. Connect an X account first. X shows likes only to their owner. Other profiles get 424.
- 200
- 400
- 401
- 402
- 403
- 404
- 424
- 429
- 502
- 503
GET
Twitter user likes API & liked tweet export
When to read liked tweets
Use this route for the liked tweets of your connected X account. Pass that account’s user ID or username asid. Callers without a connected X account get 424 account_required. Use Connect X account to add one. Guest keys get 403 forbidden.
X has shown likes only to their owner since 2024. When another profile reports likes and X hides them, the route returns 424 likes_unavailable. It does not return an empty 200. When your connected X accounts are busy, the route returns 503. Retry after the Retry-After delay.
The output is tweet rows with engagement and pagination. Use media or timeline routes when you need posts the user wrote.
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 result returned · All plans from $0.00012/credit
User likes handoff
UseGET /x/users/{id}/likes when a CRM, warehouse, recommendation job, or
agent needs liked tweet rows from one account. The examples above write JSON
Lines rows with the liked-by user, liked tweet ID, text, tweet URL, author ID,
username, display name, follower count, verified state, profile image URL,
engagement counts, media URLs, and cursor fields. A worker can then resume from
the last saved next_cursor.
Build a liked-tweet library
Use this route to collect tweets liked by one profile. Keep the source user ID with every tweet. A tweet can appear in several users’ liked feeds. Store fields that support review:- Tweet ID, text, author, and creation time.
- Like, reply, repost, quote, and view counts.
- Photo, video, or animated GIF URLs.
- Source profile ID, cursor, and collection time.
Compare liked-feed snapshots
Label every run as complete or partial. Compare only complete runs collected to the same paging depth. Keep first-seen and last-seen timestamps in your own store. The endpoint returns the current page, not a historical like event log. When a liked tweet disappears, record it as no longer observed. Do not claim the user removed the like unless another verified source confirms that action. Tweet deletion or availability changes can produce the same observation. For review queues, link each row to the source tweet. Keep the liking profile separate from the tweet author. Store reviewer labels outside the tweet response. Use fixed values such as relevant, irrelevant, or needs review. Do not overwrite the original tweet text with notes. Keep both values in separate fields.Path parameters
string
required
User ID, username with or without
@, or URL-encoded profile URL, such as
x.com/nasa. See path IDs.Query parameters
string
Pagination cursor. Pass the
next_cursor value from the previous response to fetch the next page.integer
Tweets per page. Range:
1-100. Defaults to 20.Tweet result filters
These optional filters apply totweets[] returned by this route. They keep the
same liked-tweets target. Xquik filters rows after it fetches each page. Selective
filters can return fewer rows than an unfiltered page.
string
Filter to posts from this username. The
@ prefix is optional.string
Filter to replies directed to this username.
string
Filter to posts that mention this username.
string
Only include posts with this language code.
string
Include posts created on or after this date or timestamp.
string
Include posts up to this date or timestamp. A date is a UTC day, inclusive, so its own posts count.
string
Use
images, videos, gifs, media, links, or none.integer
Require this minimum like count.
integer
Require this minimum repost count.
integer
Require this minimum reply count.
integer
Require this minimum quote count.
integer
Require this minimum view count.
integer
Require this minimum bookmark count.
integer
Allow this maximum like count. Missing counts pass.
integer
Allow this maximum repost count. Missing counts pass.
integer
Allow this maximum reply count. Missing counts pass.
integer
Allow this maximum quote count. Missing counts pass.
boolean
When
true, only return posts from Blue-verified authors.boolean
When
true, only return posts from verified authors.string
Use
include, exclude, or only for replies.
This setting overrides includeReplies when the endpoint supports both.string
Use
include, exclude, or only for reposts.string
Match this literal phrase, including any hyphens.
string
Exclude comma-separated or whitespace-separated terms.
string
Require at least 1 comma-separated or whitespace-separated term.
string
Match these hashtags. Separate values with commas or spaces.
string
Match these cashtags. Separate values with commas or spaces.
string
Use
include, exclude, or only for quote posts.string
URL substring or domain that must appear in tweet URL entities.
string
Filter to tweets in this conversation thread.
string
Only include replies to this tweet ID.
string
Filter to quote tweets of this tweet ID.
string
Filter to retweets of this tweet ID.
string
Return Tweets whose IDs exceed this ID.
string
Return Tweets at or below this ID.
boolean
When
true, only return native reposts.string
Match Tweets from this recent window, such as
90m or 7d. Use a whole number & s, m, h or d.Headers
string
Full account key. Sessions and OAuth also work.
Response
200 OK
object[]
Array of liked tweets.
Tweet object fields.
string
Tweet ID.
string
Tweet text content.
string
Tweet type. Omitted if unavailable.
string
ISO 8601 creation timestamp. Omitted if unavailable.
boolean
Whether this is a Note Tweet (long-form post). 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
Tweet ID being replied to. Omitted if not a reply.
string
User ID being replied to. Omitted if not a reply.
string
Username being replied to. Omitted if not a reply.
string
Conversation thread ID. Omitted if unavailable.
string
Client used to post the tweet. Omitted if unavailable.
number[]
Start and end offsets for rendered tweet text. Omitted if unavailable.
boolean
Whether replies are limited. 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
Disclosure metadata for paid partnership and AI-generated media labels. Includes
advertising.isPaidPromotion and aiGenerated.hasAiGeneratedMedia when X returns them. 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.
number
Follower count. Omitted if unavailable.
boolean
Whether the author is verified. Omitted if unavailable.
string
Author profile image URL. Omitted if unavailable.
object[]
object
Embedded quoted tweet. Omitted if not a quote tweet.
object
Original retweeted tweet. Omitted if not a retweet.
boolean
Whether more results are available.
string
Opaque cursor for the next page. Empty string when no more results.
400 Invalid user ID
404 User not found
401 Unauthenticated
402 Payment required
Account keys get account options. No checkout starts automatically. Confirm any payment action.502 X API unavailable
429 Rate limit exceeded
Retry-After header before retrying.
424 Dependency failed
424 likes_unavailable when the profile reports likes and X hides them from other accounts. Retrying does not help. It returns 424 x_api_unavailable when the read service is unavailable.
Without a connected X account, the route returns 424 account_required. Connect one, then retry.
Related. Get user timeline · User media · User mentions timeline