# Telegram 成员列表 API (telegram.members)

- Canonical page: [https://everyinfra.com/telegram-api/members](https://everyinfra.com/telegram-api/members?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "telegram", "action": "members", "params": {...}}
- Price: $0.000556 per call ($0.56 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, default 100, max 5000 per call
- Mode: sync; add "mode": "async" for slow tasks

Telegram 成员列表按 `username` 读公开群里可见的成员，每人带用户名、名称、是否认证、是否 Premium 用户、是否被标为诈骗或冒充、最后在线时间，以及成员自己公开的手机号。它回答「这个群里有哪些可见的人、谁最近在线」，适合做社群研究和活跃成员识别。

读到的只是可见成员，不承诺完整的成员名单，也不支持私密邀请链接。群本身的成员数、在线人数、简介和创建时间在群组资料那一页，成员列表里没有。

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| username | not declared | yes | not declared | 公开频道或群的用户名，可为 name、@name、t.me/name 或 t.me/s/name。channel_posts/profile 用于公开频道，group 读取公开实体信息，members 读取可见群成员；不支持私密邀请链接，也不承诺完整成员名单。 |
| limit | integer (1–5000) | no | 100 | 这次调用最多返回的条数，整数，1–5000；不传按默认值，实际返回可能少于这个数。超过上限会在扣费前返回 422。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| username | 用户名（@handle）。 |
| url | 该记录在原平台上的可访问链接。 |
| name | 名称。用于账号/商品/商家类能力，指该对象本身的名字。 |
| type | 记录类型，取值随能力而定（如 video / image / text）。 |
| is_verified | 账号是否已认证。 |
| is_premium | 发送者是否为 Telegram Premium 用户。 |
| is_scam | **Telegram 官方标记为诈骗账号**。为 true 时内容不可信。 |
| is_fake | **官方标记为冒充账号**（假冒知名主体）。 |
| last_seen_at | 最后在线时间。 |
| phone | 成员公开的手机号（members），原文返回；没公开时没有这个字段。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 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": "telegram",
  "action": "members",
  "params": {
    "username": "DatascienceChats"
  }
}'
```

```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": "telegram",
        "action": "members",
        "params": {
            "username": "DatascienceChats",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

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

```text
{
  "id": "req_…",
  "platform": "telegram",
  "action": "members",
  "results": [
    {
      "id": 0,
      "username": "•••",
      "url": "https://t.me/•••",
      "name": "•••",
      "last_seen_at": "2026-09-26T09:50:28+00:00",
      "platform": "telegram"
    },
    {
      "id": 0,
      "username": "•••",
      "url": "https://t.me/•••",
      "name": "•••",
      "last_seen_at": "last_week",
      "platform": "telegram"
    }
  ],
  "count": 8,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### 能拿到群里的全部成员吗？

不能保证。这一项读的是可见群成员，不承诺完整名单，所以返回的人数和群组资料里的成员数可能对不上，成员总数以群组资料为准。单次最多 5000 条，默认 100 条。

### `phone` 什么时候有值？

只有成员自己公开了手机号才有，原文返回；没公开时整个字段不出现。某一行没有 `phone`，只表示成员没有公开，不代表别的资料缺失；统计覆盖率时，把「没公开」单独算一类。

### 怎么用 `last_seen_at` 和 `is_premium` 筛成员？

`last_seen_at` 是成员最后在线的时间，可以用来挑近期活跃的人；`is_premium` 标出成员是否为 Telegram Premium 用户。筛选前先把 `is_scam` 或 `is_fake` 为真的成员去掉，它们是官方标记的诈骗和冒充账号。

## Also

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