Users who liked a tweet
Accounts that liked one of your own tweets.
/tweet/{tweetId}/favoritesParameters
tweetIdpath · string · requiredNumeric tweet ID (digits only, up to 30), the number at the end of the tweet URL.
cookiebody · string · requiredCookie header of the X account that posted the tweet. Must contain auth_token and ct0; guest_id is used when present.
proxybody · string · requiredYour proxy, format http://user:pass@host:port. The request to X goes out through it. Used only for this request.
countbody · integer · optional · default 20Users per page, up to 100.
cursorbody · string · optionalBottom cursor from the previous page.
Body parameters are sent as a JSON object with Content-Type: application/json.
Paginated: pass the bottom cursor of one page as cursor to get the next. Each page is one billed call. See Pagination.
Notes
- Works only for your own tweets. X shows who liked a tweet only to its author, so the request runs as the account in cookie. For anyone else's tweet the list is empty.
- The like count of any tweet is in the tweet itself (favorite_count, or counts.likes in the simple format).
Example request
curl -X POST 'https://api.twittrapi.com/tweet/20/favorites' \
--header 'X-API-KEY: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{"cookie":"auth_token=...; ct0=...","proxy":"http://user:pass@host:port"}'import httpx
resp = httpx.post(
"https://api.twittrapi.com/tweet/20/favorites",
headers={"X-API-KEY": "YOUR_API_KEY"},
json={
"cookie": "auth_token=...; ct0=...",
"proxy": "http://user:pass@host:port",
},
timeout=60,
)
print(resp.status_code, resp.json())const resp = await fetch("https://api.twittrapi.com/tweet/20/favorites", {
method: "POST",
headers: { "X-API-KEY": process.env.TWITTRAPI_API_KEY, "Content-Type": "application/json" },
body: JSON.stringify({
cookie: "auth_token=...; ct0=...",
proxy: "http://user:pass@host:port",
}),
});
console.log(resp.status, await resp.json());Base URL https://api.twittrapi.com, key in the X-API-KEY header. The SDKs do not wrap account actions, so the examples are plain HTTP calls.
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.
- 400GET, or cookie or proxy missing. Refunded.
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, 407, 408, 409 or a 5xx error are refunded.