# Telegram 批量查频道 API (telegram.channels_batch)

- Canonical page: [https://everyinfra.com/telegram-api/channels_batch](https://everyinfra.com/telegram-api/channels_batch?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "telegram", "action": "channels_batch", "params": {...}}
- Price: $0.000556 per call ($0.56 per 1,000 requests); failed calls and empty results are not charged
- Billing unit: each element in `channels` counts as one call; the number of elements you send sets the charge
- Returns: list
- 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=telegram&action=channels_batch

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| channels | not declared | yes | not declared | 要查的公开频道，数组，一次最多 20 个，不收逗号分隔的字符串；同一个频道只能出现一次（大小写不同算同一个）。每项可以是 name、@name 或 t.me/name 链接。按频道个数计费，每个频道和单查一次同价；没查到的频道退回、列在 missed 里；一个都没查到时返回空结果、不扣费。 |
| limit | integer (1–) | no | not declared | 正整数（≥1），本次最多返回的条数：不传则返回本次取到的全部结果，传了只把结果截短到这个条数以内，不会多取，也不会变多。扣费不受 `limit` 影响。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| username | 用户名（@handle）。 |
| url | 该记录在原平台上的可访问链接。 |
| type | 记录类型，取值随能力而定（如 video / image / text）。 |
| name | 名称。用于账号/商品/商家类能力，指该对象本身的名字。 |
| bio | 个人简介，账号自己填写的文本。可能含换行和 emoji。 |
| avatar_url | 头像图片链接。部分平台给的是带尺寸参数的 CDN 链接，可能有时效。 |
| is_verified | 账号是否已认证。 |
| bio_links | 简介里的链接（channels_batch、user_profile）。 |
| is_scam | **Telegram 官方标记为诈骗账号**。为 true 时内容不可信。 |
| is_fake | **官方标记为冒充账号**（假冒知名主体）。 |
| ok | 这个频道查到了没有（channels_batch）；false 时这一行只有 username、error_code 和 error_retryable。 |
| error_code | 没查到的原因代码（channels_batch）：not_found 是这个用户名不存在或不公开。 |
| error_retryable | 这一项过一会儿再查是否可能查到（channels_batch）。 |
| subscriber_count | 订阅数。 |
| has_preview | 频道有没有公开的网页预览，即 t.me/s/<频道名> 能不能看到消息（channels_batch）。 |
| 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": "channels_batch",
  "params": {
    "channels": [
      "durov",
      "telegram"
    ]
  }
}'
```

```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": "channels_batch",
        "params": {
            "channels": [
                "durov",
                "telegram",
            ],
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "telegram",
  "action": "channels_batch",
  "results": [
    {
      "username": …,
      "url": …,
      "type": …,
      "name": …,
      "bio": …,
      "avatar_url": …,
      "is_verified": …,
      "bio_links": …,
      "is_scam": …,
      "is_fake": …,
      "ok": …,
      "error_code": …,
      "error_retryable": …,
      "subscriber_count": …,
      "has_preview": …,
      "platform": …
    }
  ],
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

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