# X (Twitter) Community members API (twitter.community_members)

- Canonical page: [https://everyinfra.com/en/twitter-api/community_members](https://everyinfra.com/en/twitter-api/community_members?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "twitter", "action": "community_members", "params": {...}}
- Price: $0.000556 per call ($0.56 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, one page of 20 per target, no next_page_token (to read further, page one target at a time with the single-target action; limit is ignored)
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=twitter&action=community_members

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| community_id | not declared | yes | not declared | Numeric Community ID, the digits after x.com/i/communities/ in its link, or the whole link. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | The record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms. |
| username | Username (@handle). |
| url | Link to the record on the platform. |
| name | Name of the object itself, for account, product and business capabilities. |
| avatar_url | Avatar image link. Some platforms return sized CDN links that can expire. |
| is_verified | Whether the platform verified the account. null means it cannot be determined. |
| is_protected | platform-native meaning |
| community_role | platform-native meaning |
| platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "twitter",
  "action": "community_members",
  "params": {
    "community_id": "1508567430188126209"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "twitter",
        "action": "community_members",
        "params": {
            "community_id": "1508567430188126209",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-11-21T07:22:03Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2 of 18. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "twitter",
  "action": "community_members",
  "results": [
    {
      "id": "•••",
      "username": "F•••e",
      "url": "https://x.com/•••",
      "name": "A•••h",
      "avatar_url": "https://pbs.twimg.com/•••",
      "is_verified": true,
      "is_protected": false,
      "community_role": "Admin",
      "platform": "twitter"
    },
    {
      "id": "•••",
      "username": "E•••5",
      "url": "https://x.com/•••",
      "name": "E•••L",
      "avatar_url": "https://pbs.twimg.com/•••",
      "is_verified": false,
      "is_protected": false,
      "community_role": "Member",
      "platform": "twitter"
    }
  ],
  "count": 18,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=twitter
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
