# Users who liked a tweet

`GET https://api.twittrapi.com/tweet/{tweetId}/favorites`

Accounts that liked a tweet.

HTML page: https://www.twittrapi.com/docs/reference/tweet-tweetid-favorites

## Parameters

| Name | In | Type | Required | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `tweetId` | path | string | yes |  | Numeric tweet ID (digits only, up to 30), the number at the end of the tweet URL. |
| `count` | query | integer | no | 20 | Number 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. |
| `cursor` | query | string | no |  | Bottom cursor from the previous page. Leave it out for the first page. See Pagination. |

Every read endpoint also accepts `format=simple` (or the header `X-Response-Format: simple`) for compact, flat JSON with a fixed schema. Same price.

Paginated: pass the bottom cursor of one page as `cursor` to get the next. Each page is one billed call.

## 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).

## Response

Raw JSON of X's Favoriters query.

With `format=simple`: Collection of User objects: {data: [User], nextCursor, previousCursor, hasNextPage}.

## Errors

| Status | When |
| --- | --- |
| 422 | tweetId is not numeric. |

Shared errors (401 missing key, 402 no balance, 429 rate limit, 5xx) are listed on https://www.twittrapi.com/docs/helpful-infos/error-handling. Calls that fail with 400, 408, 409 or a 5xx error are refunded.

## Example request

curl:

```bash
curl 'https://api.twittrapi.com/tweet/20/favorites' \
  --header 'X-API-KEY: YOUR_API_KEY'
```

Python:

```python
from twittrapi import TwittrAPI

client = TwittrAPI(api_key="YOUR_API_KEY")
data = client.tweets.likers("20")
```

Node.js:

```js
import { TwittrAPI } from "twittrapi";

const client = new TwittrAPI({ apiKey: process.env.TWITTRAPI_API_KEY });
const data = await client.tweets.likers({ tweetId: "20" });
```

RapidAPI:

```bash
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'
```

## Example response

Shortened: arrays keep their first items and long strings are cut.

Raw (default):

```json
{
  "data": {
    "favoriters_timeline": {
      "timeline": {
        "instructions": [
          {
            "direction": "Bottom",
            "type": "TimelineTerminateTimeline"
          }
        ]
      }
    }
  }
}
```

Simple (`format=simple`):

```json
{
  "data": [],
  "nextCursor": null,
  "previousCursor": null,
  "hasNextPage": false
}
```
