# Community members

`GET https://api.twittrapi.com/communities/{communityId}/members`

Members of a community.

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

## Parameters

| Name | In | Type | Required | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `communityId` | path | string | yes |  | Numeric community ID, the number in the community URL. |
| `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 membersSliceTimeline_Query. Members are in data.communityResults.result.members_slice.items_results; the next-page cursor is members_slice.slice_info.next_cursor.

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

## Errors

| Status | When |
| --- | --- |
| 422 | communityId 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/communities/1500000000000000000/members' \
  --header 'X-API-KEY: YOUR_API_KEY'
```

Python:

```python
import httpx

# No SDK method for this endpoint yet, so this is a plain HTTP call.
resp = httpx.get(
    "https://api.twittrapi.com/communities/1500000000000000000/members",
    headers={"X-API-KEY": "YOUR_API_KEY"},
    timeout=60,
)
data = resp.json()
```

Node.js:

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

const client = new TwittrAPI({ apiKey: process.env.TWITTRAPI_API_KEY });
// No wrapper method for this endpoint yet; client.get() sends the same authenticated GET.
const data = await client.get({
  path: "/communities/1500000000000000000/members",
});
```

RapidAPI:

```bash
curl 'https://twitter-aio.p.rapidapi.com/communities/1500000000000000000/members' \
  --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": {
    "communityResults": {
      "id": "Q29tbXVuaXR5UmVzdWx0czoxNzYyNDk0Mjc2NTY1NDI2NTky",
      "result": {
        "__typename": "Community",
        "id": "Q29tbXVuaXR5OjE3NjI0OTQyNzY1NjU0MjY1OTI=",
        "members_slice": {
          "items_results": [
            {
              "id": "VXNlclJlc3VsdHM6MTAwMDAwMDAwMDAwMDAwMDAwMQ==",
              "result": {
                "__typename": "User",
                "affiliates_highlighted_label": {},
                "community_role": "Admin",
                "id": "VXNlcjoxMDAwMDAwMDAwMDAwMDAwMDAx",
                "identity_profile_labels_highlighted_label": {},
                "is_blue_verified": true,
                "legacy": {
                  "blocking": false,
                  "follow_request_sent": false,
                  "followed_by": false,
                  "following": false,
                  "id_str": "1000000000000000001",
                  "name": "Example User 1",
                  "profile_image_url_https": "https://pbs.twimg.com/profile_images/1000000000000000000/example_normal.jpg",
                  "protected": false,
                  "screen_name": "example_user_1",
                  "verified": false
                },
                "rest_id": "1000000000000000001",
                "super_follow_eligible": false,
                "super_followed_by": false,
                "super_following": false
              }
            },
            "… 1 more"
          ],
          "slice_info": {
            "next_cursor": "CycRAAAAAAwABAwKmwzBVQo+vRYlx8zZ15ACCm07AAABjezzdesADJorCj69f/////////8KbTt//////////wAIP8AAAAACAAAA"
          }
        }
      }
    }
  }
}
```

Simple (`format=simple`):

```json
{
  "data": [
    {
      "id": "1000000000000000001",
      "username": "example_user_1",
      "name": "Example User 1",
      "description": "",
      "location": "",
      "url": null,
      "createdAt": null,
      "avatarUrl": "https://pbs.twimg.com/profile_images/1000000000000000000/example.jpg",
      "bannerUrl": null,
      "verified": true,
      "verifiedType": null,
      "protected": false,
      "counts": {
        "followers": 0,
        "following": 0,
        "tweets": 0,
        "likes": 0,
        "media": 0,
        "listed": 0
      },
      "pinnedTweetIds": [],
      "isAutomated": false
    },
    "… 1 more"
  ],
  "nextCursor": "CycRAAAAAAwABAwKmwzBVQo+vRYlx8zZ15ACCm07AAABjezzdesADJorCj69f/////////8KbTt//////////wAIP8AAAAACAAAA",
  "previousCursor": null,
  "hasNextPage": true
}
```
