# List members

`GET https://api.twittrapi.com/lists/members`

Accounts that are members of a list.

HTML page: https://www.twittrapi.com/docs/reference/lists-members

## Parameters

| Name | In | Type | Required | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `listId` | query | string | yes |  | Numeric list ID, the number in the list URL (x.com/i/lists/<listId>). |
| `count` | query | integer | no | 20 | Number of members 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.

## Response

Raw JSON of X's ListMembers query.

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

## Errors

| Status | When |
| --- | --- |
| 400 | listId is missing or 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/lists/members?listId=84839422' \
  --header 'X-API-KEY: YOUR_API_KEY'
```

Python:

```python
from twittrapi import TwittrAPI

client = TwittrAPI(api_key="YOUR_API_KEY")
data = client.lists.members("84839422")
```

Node.js:

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

const client = new TwittrAPI({ apiKey: process.env.TWITTRAPI_API_KEY });
const data = await client.lists.members({ listId: "84839422" });
```

RapidAPI:

```bash
curl 'https://twitter-aio.p.rapidapi.com/lists/members?listId=84839422' \
  --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": {
    "list": {
      "members_timeline": {
        "timeline": {
          "instructions": [
            {
              "type": "TimelineClearCache"
            },
            {
              "direction": "Top",
              "type": "TimelineTerminateTimeline"
            },
            {
              "entries": [
                {
                  "content": {
                    "__typename": "TimelineTimelineItem",
                    "clientEventInfo": {
                      "component": "MembersSgs",
                      "element": "user"
                    },
                    "entryType": "TimelineTimelineItem",
                    "itemContent": {
                      "__typename": "TimelineUser",
                      "itemType": "TimelineUser",
                      "userDisplayType": "User",
                      "user_results": {
                        "result": {
                          "__typename": "User",
                          "affiliates_highlighted_label": {},
                          "avatar": {
                            "image_url": "https://pbs.twimg.com/profile_images/1354486384329854984/BXv7J1j2_normal.jpg"
                          },
                          "core": {
                            "created_at": "Mon Mar 30 21:02:29 +0000 2020",
                            "name": "Twitter Thailand",
                            "screen_name": "TwitterThailand"
                          },
                          "dm_permissions": {
                            "can_dm": false
                          },
                          "follow_request_sent": false,
                          "has_graduated_access": true,
                          "id": "VXNlcjoxMjQ0NzMxNDkxMDg4ODA5OTg0",
                          "is_blue_verified": false,
                          "legacy": {
                            "default_profile": true,
                            "default_profile_image": false,
                            "description": "Please follow @X for updates.",
                            "entities": {
                              "…": "…"
                            },
                            "fast_followers_count": 0,
                            "favourites_count": 16,
                            "follow_request_sent": false,
                            "followers_count": 37828,
                            "friends_count": 16,
                            "has_custom_timelines": true,
                            "is_translator": false,
                            "listed_count": 39,
                            "media_count": 333,
                            "needs_phone_verification": false,
                            "normal_followers_count": 37828,
                            "notifications": false,
                            "pinned_tweet_ids_str": [
                              "…"
                            ],
                            "possibly_sensitive": false,
                            "profile_banner_url": "https://pbs.twimg.com/profile_banners/1244731491088809984/1611791443",
                            "profile_interstitial_type": "",
                            "statuses_count": 1263,
                            "time_zone": "",
                            "translator_type": "none",
                            "url": "",
                            "utc_offset": 0,
                            "want_retweets": false,
                            "withheld_description": "",
                            "withheld_scope": ""
                          },
                          "location": {
                            "location": ""
                          },
                          "media_permissions": {
                            "can_media_tag": false
                          },
                          "parody_commentary_fan_label": "None",
                          "privacy": {
                            "protected": true
                          },
… (36 more lines)
```

Simple (`format=simple`):

```json
{
  "data": [
    {
      "id": "1244731491088809984",
      "username": "TwitterThailand",
      "name": "Twitter Thailand",
      "description": "Please follow @X for updates.",
      "location": "",
      "url": null,
      "createdAt": "2020-03-30T21:02:29Z",
      "avatarUrl": "https://pbs.twimg.com/profile_images/1354486384329854984/BXv7J1j2.jpg",
      "bannerUrl": "https://pbs.twimg.com/profile_banners/1244731491088809984/1611791443",
      "verified": false,
      "verifiedType": null,
      "protected": true,
      "counts": {
        "followers": 37828,
        "following": 16,
        "tweets": 1263,
        "likes": 16,
        "media": 333,
        "listed": 39
      },
      "pinnedTweetIds": [
        "1580793959307436032"
      ],
      "isAutomated": false
    },
    "… 1 more"
  ],
  "nextCursor": "1000000000000000000|2109016359324090346",
  "previousCursor": null,
  "hasNextPage": true
}
```
