# Telegram 主页或对象详情 API (telegram.profile)

- Canonical page: [https://everyinfra.com/telegram-api/profile](https://everyinfra.com/telegram-api/profile?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "telegram", "action": "profile", "params": {...}}
- Price: $0.000556 per call ($0.56 per 1,000 requests); failed calls and empty results are not charged
- Returns: single object
- 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=profile

## 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 读取可见群成员；不支持私密邀请链接，也不承诺完整成员名单。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| username | 用户名（@handle）。 |
| name | 名称。用于账号/商品/商家类能力，指该对象本身的名字。 |
| bio | 个人简介，账号自己填写的文本。可能含换行和 emoji。 |
| subscriber_count | 订阅数。 |
| photo_count | 图片数量。 |
| video_count | 视频数量。 |
| link_count | 消息中的链接数量。 |
| is_verified | 账号是否已认证。 |
| avatar_url | 头像图片链接。部分平台给的是带尺寸参数的 CDN 链接，可能有时效。 |
| url | 该记录在原平台上的可访问链接。 |
| 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": "profile",
  "params": {
    "username": "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": "profile",
        "params": {
            "username": "telegram",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-10-24T18:28:34Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "telegram",
  "action": "profile",
  "results": {
    "username": "telegram",
    "name": "Telegram News",
    "bio": "The official Telegram on Telegram. Much recursion. Very Telegram. Wow.",
    "subscriber_count": 9250000,
    "subscriber_count_display": "9.25M",
    "photo_count": 16,
    "video_count": 228,
    "link_count": 378,
    "is_verified": true,
    "avatar_url": "https://cdn1.telesco.pe/•••",
    "url": "https://t.me/telegram",
    "platform": "telegram"
  },
  "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
