Users who liked a tweet
Accounts that liked a tweet.
/tweet/{tweetId}/favoritesParameters
tweetIdpath · string · requiredNumeric tweet ID (digits only, up to 30), the number at the end of the tweet URL.
countquery · integer · optional · default 20Number of users to ask X for. Sent to X as is; X treats it as a hint and decides how many it returns (follower and following pages often hold 50 to 70 users for count=20). A value that is not a number falls back to 20.
cursorquery · string · optionalBottom cursor from the previous page. Leave it out for the first page. See Pagination.
Paginated: pass the bottom cursor of one page as cursor to get the next. Each page is one billed call. See Pagination.
Notes
- X made likes private in June 2024: only the author of a tweet can see who liked it. The API does not read as the author, so the timeline is empty: the only instruction is TimelineTerminateTimeline, with no entries and no cursor. The like count is still in the tweet (favorite_count).
Example request
curl 'https://api.twittrapi.com/tweet/20/favorites' \
--header 'X-API-KEY: YOUR_API_KEY'from twittrapi import TwittrAPI
client = TwittrAPI(api_key="YOUR_API_KEY")
data = client.tweets.likers("20")import { TwittrAPI } from "twittrapi";
const client = new TwittrAPI({ apiKey: process.env.TWITTRAPI_API_KEY });
const data = await client.tweets.likers({ tweetId: "20" });curl 'https://twitter-aio.p.rapidapi.com/tweet/20/favorites' \
--header 'x-rapidapi-key: YOUR_RAPIDAPI_KEY' \
--header 'x-rapidapi-host: twitter-aio.p.rapidapi.com'Base URL https://api.twittrapi.com, key in the X-API-KEY header. Python and Node.js use the official SDKs.
Response
Raw JSON of X's Favoriters query.
Simple format (?format=simple or X-Response-Format: simple): Collection of User objects: {data: [User], nextCursor, previousCursor, hasNextPage}. Schema.
{
"data": {
"favoriters_timeline": {
"timeline": {
"instructions": [
{
"direction": "Bottom",
"type": "TimelineTerminateTimeline"
}
]
}
}
}
}{
"data": [],
"nextCursor": null,
"previousCursor": null,
"hasNextPage": false
}In the raw format, field names and nesting come from X and can change without notice. See Response format; the simple format keeps a fixed schema.
Errors
- 422tweetId is not numeric.
Errors every endpoint can return (401, 402, 403, 404, 408, 409, 429, 5xx), and which of them are charged, are on the Errors page. Calls that fail with 400, 408, 409 or a 5xx error are refunded.