# Telegram API 数据接口

Telegram API（数据接口）可以读消息详情、账号资料和账号发布的消息，不用登录 Telegram 账号，也不用提供 Cookie。每次调用 2 积分（约 $0.004–$0.0067），失败不扣。Telegram 的内容不带作者粉丝数，这个字段返回 null。可以直接发 HTTP 请求，也可以通过 MCP 接到 AI 客户端里用。最近实测：2026-10-17。

- 页面：https://socialtoai.com/zh/platforms/telegram/
- 最近更新：2026-10-17
- 最近实测：2026-10-17

## 可用的动作

| 动作 | 返回什么 | 由什么参数选中 | 价格键 | 积分 | 参数和字段 |
| --- | --- | --- | --- | --- | --- |
| `detail` | 用编号或链接取一条消息：正文、作者、播放或阅读数和发布时间。 | — | `telegram.detail` | 2 | https://socialtoai.com/zh/telegram-detail-api.md |
| `user_profile` | 一个账号：名称、简介和粉丝数。 | — | `telegram.user_profile` | 2 | https://socialtoai.com/zh/telegram-user-profile-api.md |
| `user_posts` | 一个账号最近发布的消息。 | — | `telegram.user_posts` | 2 | https://socialtoai.com/zh/telegram-user-posts-api.md |

Telegram 不提供：搜索、热榜和评论。

## 调用示例

```bash
curl https://api.socialtoai.com/v1/detail \
  -H "Authorization: Bearer $SOCIALTOAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "telegram",
    "id": "telegram/401"
  }'
```

## Telegram 给不了的字段

这些字段在对应的调用里始终是 null，并列在返回的 `unavailable` 里。

| 字段 | 哪些动作 |
| --- | --- |
| `title` | detail, user_posts |
| `author.id` | detail, user_posts |
| `author.verified` | detail, user_posts |
| `author.followers` | detail, user_posts |
| `metrics.likes` | detail, user_posts |
| `metrics.comments` | detail, user_posts |
| `metrics.shares` | detail, user_posts |
| `metrics.collects` | detail, user_posts |
| `metrics.reposts` | detail, user_posts |
| `hashtags` | detail, user_posts |
| `is_pinned` | detail, user_posts |
| `id` | user_profile |
| `following` | user_profile |
| `posts_count` | user_profile |

## 在 AI 里直接问

- 这个 Telegram 账号有多大？最近发了什么？ → user_profile, user_posts: 4 积分

- 查一下这个 Telegram 账号，告诉我它是谁。 → user_profile: 2 积分

- 比较这 3 个 Telegram 账号的粉丝数和发帖数。 → user_profile × 3: 6 积分

## 能读 Telegram 的现成工具

- [账号监测](https://socialtoai.com/zh/tools/account-watch.md)：每个账号最近发了什么，哪条明显好于平时
- [达人档案](https://socialtoai.com/zh/tools/creator-card.md)：这个人在其他平台的账号、各自的数据，以及是同一人的把握
- [批量链接数据](https://socialtoai.com/zh/tools/batch-stats.md)：每条链接一行，给出现在的数字；失效的链接会标出来

## 官方 API

Telegram 的 API 向所有开发者开放：有 Telegram 账号即可在 my.telegram.org 申请 API ID。它是完整的客户端接口，支持频道（可设为公开）和消息搜索，使用须遵守 Telegram 的 API 服务条款。

来源：[Telegram 官方开发者文档](https://core.telegram.org/api/obtaining_api_id)，核对于 2026-10-17。
