Telegram API

提供全面的频道信息和最新消息,包括标题、描述、图片、统计数据和实时更新的内容
通过 MCP 从您的 AI 代理使用此 API
支持 OpenClaw、Claude Code/Desktop、Cursor、Windsurf、Cline 以及任何兼容 MCP 的 AI 客户端。
文档和设置
通过封装此 MCP 创建技能: https://mcp.zylalabs.com/mcp?apikey=YOUR_ZYLA_API_KEY

Telegram API提供了一种高效可靠的方式来访问有关频道和最近消息的详细信息,使开发人员、分析师和公司能够将最新数据直接集成到他们的应用程序、仪表板或内部系统中

通过此API,可以获取关键数据,例如频道ID、标题、描述、验证状态、头像、订阅者数量和相关指标。它还包括提取频道上发布的最新消息的能力,显示文本、多媒体内容、链接和查看统计信息。这些信息对希望监控公共频道活动、执行趋势分析、验证真实性或创建自动跟踪工具的人至关重要

该API稳定且实时工作,确保您收到的信息始终是最新的。其结构化设计便于与其他系统或平台集成,并且标准化的响应格式允许顺利处理大量数据

简而言之,此Telegram API在一个安全、快速且易于使用的接入点集中管理频道和消息信息,非常适合大规模监控、分析和软件开发解决方案

API 文档

端点


获取有关Telegram频道的详细信息,包括ID、类型、验证、标题、描述、图像和订阅者统计信息


                                                                            
GET https://www.zylalabs.com/api/9874/telegram+api/18582/channel+information
                                                                            
                                                                        

频道信息 - 端点功能

对象 描述
channel [必需] Indicates the name of the channel
测试端点

API 示例响应

       
                                                                                                        
                                                                                                                                                                                                                                                                                                                                        {
  "id": "{\"$numberInt\":\"1005640892\"}",
  "chat_type": "channel",
  "verified": true,
  "title": "Telegram News",
  "description": "The official Telegram on Telegram. Much recursion. Very Telegram. Wow.",
  "image": "https://cdn1.telesco.pe/file/Q52vSDd_iD81n1sCp9r9M7xV_w7z6s94qwXXO9JzbbcfcDrWy0ayfdP_2aXtc7aVRw6XA9ADv2Wv-YZE3rKV2XUNAJ41sMwXr3UxObvalVxdxAxAjPWQwFYcdkmfSjqnD9MIXQ5lGI1csWxFeNyQERzDOZX6z4mTrR3lfBv-gfeDNj-lz9F6uTTpuuPxuzXaFQx-UV9xXVraZ6lBdKQ2Pqv9g0MnXKGUbEguY-nMvFD9NR3EbPSGAEYVC5V3pmeClR6m__-liiBczoCGyR4NthMrDZ9ptFHMBOx9cctqrxBg1es9rZwJG6zmBHM43c2xzNO2p3OfBf54AMtbRk3EPw.jpg",
  "subscribers": "11650763",
  "subscribers_online": "0"
}
                                                                                                                                                                                                                    
                                                                                                    

频道信息 - 代码片段


curl --location --request GET 'https://zylalabs.com/api/9874/telegram+api/18582/channel+information?channel=telegram' --header 'Authorization: Bearer YOUR_API_KEY' 


    

从Telegram频道获取消息,包括ID、作者、日期、阅读状态、文本、多媒体内容和相关链接



                                                                            
GET https://www.zylalabs.com/api/9874/telegram+api/18583/channel+latest+messages
                                                                            
                                                                        

频道最新消息 - 端点功能

对象 描述
channel [必需] Indicates the name of the channel
limit 可选 Indicates the number of messages
测试端点

API 示例响应

       
                                                                                                        
                                                                                                                                                                                                                                                                                                                                        [
  {
    "id": "401",
    "author": "Telegram News",
    "date": "2025-08-18T13:34:15+00:00",
    "user_read_status": "read",
    "text": "For all the new features from this update, like Premium gifts and a new mini app for developers – check out the full blog:https://telegram.org/blog/post-search-story-albums-and-moreJuly Features1 • 2 • 3 • 4 • 5 • 6 • 7 • 8 • 9 • More",
    "html": "\u003cp\u003eFor all the new features from this update, like \u003cb\u003ePremium gifts \u003c/b\u003eand a\u003cb\u003e new mini app\u003c/b\u003e for developers – check out the full blog:\u003cbr/\u003e\u003cbr/\u003e\u003ca href=\"https://telegram.org/blog/post-search-story-albums-and-more\" target=\"_blank\" rel=\"noopener\"\u003ehttps://telegram.org/blog/post-search-story-albums-and-more\u003c/a\u003e\u003cbr/\u003e\u003cbr/\u003eJuly Features\u003cbr/\u003e\u003ca href=\"https://t.me/telegram/392\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm(\u0026#39;Open this link?\\n\\n\u0026#39;+this.href);\"\u003e1\u003c/a\u003e • \u003ca href=\"https://t.me/telegram/393\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm(\u0026#39;Open this link?\\n\\n\u0026#39;+this.href);\"\u003e2\u003c/a\u003e • \u003ca href=\"https://t.me/telegram/394\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm(\u0026#39;Open this link?\\n\\n\u0026#39;+this.href);\"\u003e3\u003c/a\u003e • \u003ca href=\"https://t.me/telegram/395\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm(\u0026#39;Open this link?\\n\\n\u0026#39;+this.href);\"\u003e4\u003c/a\u003e • \u003ca href=\"https://t.me/telegram/396\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm(\u0026#39;Open this link?\\n\\n\u0026#39;+this.href);\"\u003e5\u003c/a\u003e • \u003ca href=\"https://t.me/telegram/397\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm(\u0026#39;Open this link?\\n\\n\u0026#39;+this.href);\"\u003e6\u003c/a\u003e • \u003ca href=\"https://t.me/telegram/398\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm(\u0026#39;Open this link?\\n\\n\u0026#39;+this.href);\"\u003e7\u003c/a\u003e • \u003ca href=\"https://t.me/telegram/399\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm(\u0026#39;Open this link?\\n\\n\u0026#39;+this.href);\"\u003e8\u003c/a\u003e • \u003ca href=\"https://t.me/telegram/400\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm(\u0026#39;Open this link?\\n\\n\u0026#39;+this.href);\"\u003e9\u003c/a\u003e • \u003cb\u003eMore\u003c/b\u003e\u003c/p\u003e",
    "views": "1150000",
    "forwarded": {},
    "button": {},
    "link": {
      "description": "Today's update introduces global search for public posts on Telegram, sorting stories into albums and organizing gifts into collections, managing bots via a new stylish mini app -- and so much more.",
      "name": "Telegram",
      "title": "Public Post Search, Story Albums, Gift Collections and More",
      "url": "https://telegram.org/blog/post-search-story-albums-and-more"
    },
    "photo": {},
    "video": {},
    "audio": {},
    "sticker": {},
    "attachment": {},
    "media_poll": {}
  },
  {
    "id": "400",
    "author": "Telegram News",
    "date": "2025-08-18T13:34:04+00:00",
    "user_read_status": "read",
    "text": "Profile Ratings. Profiles now show a numerical rating based on the total volume of successful transactions they've made with Telegram Stars.July Features1 • 2 • 3 • 4 • 5 • 6 • 7 • 8 • 9 • More",
    "html": "\u003cp\u003e\u003cb\u003eProfile Ratings.\u003c/b\u003e Profiles now show a \u003cb\u003enumerical rating\u003c/b\u003e based on the total volume of \u003cb\u003esuccessful transactions\u003c/b\u003e they\u0026#39;ve made with Telegram Stars.\u003cbr/\u003e\u003cbr/\u003eJuly Features\u003cbr/\u003e\u003ca href=\"https://t.me/telegram/392\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm(\u0026#39;Open this link?\\n\\n\u0026#39;+this.href);\"\u003e1\u003c/a\u003e • \u003ca href=\"https://t.me/telegram/393\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm(\u0026#39;Open this link?\\n\\n\u0026#39;+this.href);\"\u003e2\u003c/a\u003e • \u003ca href=\"https://t.me/telegram/394\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm(\u0026#39;Open this link?\\n\\n\u0026#39;+this.href);\"\u003e3\u003c/a\u003e • \u003ca href=\"https://t.me/telegram/395\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm(\u0026#39;Open this link?\\n\\n\u0026#39;+this.href);\"\u003e4\u003c/a\u003e • \u003ca href=\"https://t.me/telegram/396\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm(\u0026#39;Open this link?\\n\\n\u0026#39;+this.href);\"\u003e5\u003c/a\u003e • \u003ca href=\"https://t.me/telegram/397\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm(\u0026#39;Open this link?\\n\\n\u0026#39;+this.href);\"\u003e6\u003c/a\u003e • \u003ca href=\"https://t.me/telegram/398\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm(\u0026#39;Open this link?\\n\\n\u0026#39;+this.href);\"\u003e7\u003c/a\u003e • \u003ca href=\"https://t.me/telegram/399\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm(\u0026#39;Open this link?\\n\\n\u0026#39;+this.href);\"\u003e8\u003c/a\u003e • \u003cb\u003e9\u003c/b\u003e • \u003ca href=\"https://t.me/telegram/401\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm(\u0026#39;Open this link?\\n\\n\u0026#39;+this.href);\"\u003eMore\u003c/a\u003e\u003c/p\u003e",
    "views": "995000",
    "forwarded": {},
    "button": {},
    "link": {},
    "photo": {},
    "video": {
      "caption": "Profile Ratings. Profiles now show a numerical rating based on the total volume of successful transactions they've made with Telegram Stars.July Features1 • 2 • 3 • 4 • 5 • 6 • 7 • 8 • 9 • More",
      "url": "https://cdn1.telesco.pe/file/831335feb8.mp4?token=a84LZctQqGvq_vVnFsp0n38MXoynihJJi0hIhA8Pp1LnlmumgsWOkQWJ8IHvGHJKHizTy4LKPD1owBjlW2BG479ngGHfwtNd09MbnhGUEaTEy78tJpXXoOquVUAZiqXvOS4GK8NcewtgrhPcEvMe-Kp5w2by9fSeuxScAQ-asYxNvmPvLiOMeUHZCH1JIYnqaPAiAhWHcO7Gcs5tK04mi0AyvXnKJS566k7fz1ayx42LTu-vyB1VluJVL3-_2XpBYXfC1ONwcEW7K4NtepyJBfFEb9cGZc5uFj7Pi1N56AxI7IfUTkMfdnwymjuFIZJ8R9BVarnbd05yhhDQuGK_HQ"
    },
    "audio": {},
    "sticker": {},
    "attachment": {},
    "media_poll": {}
  },
  {
    "id": "399",
    "author": "Telegram News",
    "date": "2025-08-18T13:33:41+00:00",
    "user_read_status": "read",
    "text": "Gift Collections. You can now group gifts on your profile or channel into custom collections – based on theme, rarity or other traits.July Features1 • 2 • 3 • 4 • 5 • 6 • 7 • 8 • 9 • More",
    "html": "\u003cp\u003e\u003cb\u003eGift Collections.\u003c/b\u003e You can now \u003cb\u003egroup gifts\u003c/b\u003e on your profile or channel into \u003cb\u003ecustom collections\u003c/b\u003e – based on theme, rarity or other traits.\u003cbr/\u003e\u003cbr/\u003eJuly Features\u003cbr/\u003e\u003ca href=\"https://t.me/telegram/392\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm(\u0026#39;Open this link?\\n\\n\u0026#39;+this.href);\"\u003e1\u003c/a\u003e • \u003ca href=\"https://t.me/telegram/393\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm(\u0026#39;Open this link?\\n\\n\u0026#39;+this.href);\"\u003e2\u003c/a\u003e • \u003ca href=\"https://t.me/telegram/394\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm(\u0026#39;Open this link?\\n\\n\u0026#39;+this.href);\"\u003e3\u003c/a\u003e • \u003ca href=\"https://t.me/telegram/395\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm(\u0026#39;Open this link?\\n\\n\u0026#39;+this.href);\"\u003e4\u003c/a\u003e • \u003ca href=\"https://t.me/telegram/396\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm(\u0026#39;Open this link?\\n\\n\u0026#39;+this.href);\"\u003e5\u003c/a\u003e • \u003ca href=\"https://t.me/telegram/397\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm(\u0026#39;Open this link?\\n\\n\u0026#39;+this.href);\"\u003e6\u003c/a\u003e • \u003ca href=\"https://t.me/telegram/398\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm(\u0026#39;Open this link?\\n\\n\u0026#39;+this.href);\"\u003e7\u003c/a\u003e • \u003cb\u003e8\u003c/b\u003e • \u003ca href=\"https://t.me/telegram/400\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm(\u0026#39;Open this link?\\n\\n\u0026#39;+this.href);\"\u003e9\u003c/a\u003e • \u003ca href=\"https://t.me/telegram/401\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm(\u0026#39;Open this link?\\n\\n\u0026#39;+this.href);\"\u003eMore\u003c/a\u003e\u003c/p\u003e",
    "views": "717000",
    "forwarded": {},
    "button": {},
    "link": {},
    "photo": {},
    "video": {
      "caption": "Gift Collections. You can now group gifts on your profile or channel into custom collections – based on theme, rarity or other traits.July Features1 • 2 • 3 • 4 • 5 • 6 • 7 • 8 • 9 • More",
      "url": "https://cdn1.telesco.pe/file/d42ff443be.mp4?token=ZPMfNgdBr5HQCyvCG5ppcx8u0wmk2d6xdNj2-AHJi5VUhYCuAniY2id3pqYbeqn1_bNgMJZiOoUuhFQGQntRPF4pHuk1N6shqiUyMt9OfxuzTZ7Q4C0Qa12aKUvQxAr6_fSKban8v50VhICItQbFFfio0FxCJqFjqUhHaLVKGJaYlWrDigaQ3NXmM04GrQ6AscD7W2sZiVJ8smpRctEX1SQ8cteSEUDiYwPGM8zM8gymNHeK3sXBk9nf9WkltNfYGRKkQ7dFkv5ipmsXFS9RlFL3CITuw8OfMjHzdODzWRN7_oCEvazB9HXdqfZ90H9Qsk_OrAgIYM3Psr0uR1eIMw"
    },
    "audio": {},
    "sticker": {},
    "attachment": {},
    "media_poll": {}
  },
  {
    "id": "398",
    "author": "Telegram News",
    "date": "2025-08-18T13:33:24+00:00",
    "user_read_status": "read"},{"_note":"Response truncated for documentation purposes"}]
                                                                                                                                                                                                                    
                                                                                                    

频道最新消息 - 代码片段


curl --location --request GET 'https://zylalabs.com/api/9874/telegram+api/18583/channel+latest+messages?channel=telegram' --header 'Authorization: Bearer YOUR_API_KEY' 


    

API 访问密钥和身份验证

注册后,每个开发者都会被分配一个个人 API 访问密钥,这是一个唯一的字母和数字组合,用于访问我们的 API 端点。要使用 Telegram API 进行身份验证,只需在 Authorization 标头中包含您的 bearer token。
标头
标头 描述
授权 [必需] 应为 Bearer access_key. 订阅后,请查看上方的"您的 API 访问密钥"。

简单透明的定价

无长期承诺。随时升级、降级或取消。 免费试用包括最多 50 个请求。

🚀 企业版

起价
$ 10,000/年


  • 自定义数量
  • 自定义速率限制
  • 专业客户支持
  • 实时 API 监控

客户喜爱的功能

  • ✔︎ 仅支付成功请求
  • ✔︎ 7 天免费试用
  • ✔︎ 多语言支持
  • ✔︎ 一个 API 密钥,所有 API。
  • ✔︎ 直观的仪表板
  • ✔︎ 全面的错误处理
  • ✔︎ 开发者友好的文档
  • ✔︎ Postman 集成
  • ✔︎ 安全的 HTTPS 连接
  • ✔︎ 可靠的正常运行时间

Telegram API FAQs

获取频道信息端点返回详细的频道数据,包括ID、标题、描述、验证状态、个人资料图片和订阅者统计信息 获取频道最新消息端点提供最近的消息,包括ID、作者、日期、阅读状态、文本、多媒体内容和相关链接

获取频道信息端点的关键字段包括频道ID 标题 描述 验证状态 和订阅者数量 对于获取频道最新消息端点 关键字段包括消息ID 作者 日期 文本内容 多媒体链接 和阅读状态

响应数据采用JSON格式结构,每个端点返回一个包含相关字段的对象。频道信息的数据在频道属性下分组,而消息数据则组织为一个消息对象的数组,每个对象包含其相应的详细信息

获取频道信息端点提供有关频道属性的见解,如标题、描述和订阅者指标 获取频道最新消息端点访问最新消息,包括文本、多媒体和互动统计数据,允许对频道活动进行全面监控

获取频道信息端点通常需要频道 ID 作为参数 获取频道最新消息端点可能允许诸如频道 ID 和消息数量等参数来自定义返回的数据,使用户能够指定他们想要检索的哪个频道的消息

用户可以分析频道统计数据,以评估受欢迎程度和参与度,而消息数据可以用于趋势分析、内容监控或自动报告。例如,跟踪订阅者的增长趋势或分析消息的参与度可以为内容策略提供有价值的见解

数据准确性通过Telegram平台的实时更新得以维持,确保检索的信息反映了频道和消息的最新状态。定期检查和验证Telegram的数据源有助于维护提供信息的完整性

典型的用例包括监控公共频道活动以进行趋势分析 验证频道真实性以确保品牌安全 以及创建自动化工具用于内容追踪 企业和分析师可以利用这些数据来制定营销策略和增强观众参与度

一般常见问题

Zyla API Hub 就像一个大型 API 商店,您可以在一个地方找到数千个 API。我们还为所有 API 提供专门支持和实时监控。注册后,您可以选择要使用的 API。请记住,每个 API 都需要自己的订阅。但如果您订阅多个 API,您将为所有这些 API 使用相同的密钥,使事情变得更简单。

价格以 USD(美元)、EUR(欧元)、CAD(加元)、AUD(澳元)和 GBP(英镑)列出。我们接受所有主要的借记卡和信用卡。我们的支付系统使用最新的安全技术,由 Stripe 提供支持,Stripe 是世界上最可靠的支付公司之一。如果您在使用卡片付款时遇到任何问题,请通过 [email protected]


此外,如果您已经以这些货币中的任何一种(USD、EUR、CAD、AUD、GBP)拥有有效订阅,该货币将保留用于后续订阅。只要您没有任何有效订阅,您可以随时更改货币。

定价页面上显示的本地货币基于您 IP 地址的国家/地区,仅供参考。实际价格以 USD(美元)为单位。当您付款时,即使您在我们的网站上看到以本地货币显示的等值金额,您的卡片对账单上也会以美元显示费用。这意味着您不能直接使用本地货币付款。

有时,银行可能会因其欺诈保护设置而拒绝收费。我们建议您首先联系您的银行,检查他们是否阻止了我们的收费。此外,您可以访问账单门户并更改关联的卡片以进行付款。如果这些方法不起作用并且您需要进一步帮助,请通过 [email protected]

价格由月度或年度订阅决定,具体取决于所选计划。

API 调用根据成功请求从您的计划中扣除。每个计划都包含您每月可以进行的特定数量的调用。只有成功的调用(由状态 200 响应指示)才会计入您的总数。这确保失败或不完整的请求不会影响您的月度配额。

Zyla API Hub 采用月度订阅系统。您的计费周期将从您购买付费计划的那一天开始,并在下个月的同一日期续订。因此,如果您想避免未来的费用,请提前取消订阅。

要升级您当前的订阅计划,只需转到 API 的定价页面并选择您要升级到的计划。升级将立即生效,让您立即享受新计划的功能。请注意,您之前计划中的任何剩余调用都不会转移到新计划,因此在升级时请注意这一点。您将被收取新计划的全部金额。

要检查您本月剩余多少 API 调用,请参考响应标头中的 "X-Zyla-API-Calls-Monthly-Remaining" 字段。例如,如果您的计划允许每月 1,000 个请求,而您已使用 100 个,则响应标头中的此字段将显示 900 个剩余调用。

要查看您的计划允许的最大 API 请求数,请检查 "X-Zyla-RateLimit-Limit" 响应标头。例如,如果您的计划包括每月 1,000 个请求,此标头将显示 1,000。

"X-Zyla-RateLimit-Reset" 标头显示您的速率限制重置之前的秒数。这告诉您何时您的请求计数将重新开始。例如,如果它显示 3,600,则意味着还有 3,600 秒直到限制重置。

是的,您可以随时通过访问您的账户并在账单页面上选择取消选项来取消您的计划。请注意,升级、降级和取消会立即生效。此外,取消后,您将不再有权访问该服务,即使您的配额中还有剩余调用。

您可以通过我们的聊天渠道联系我们以获得即时帮助。我们始终在线,时间为上午 8 点至下午 5 点(EST)。如果您在该时间之后联系我们,我们将尽快回复您。此外,您可以通过 [email protected]

为了让您有机会在没有任何承诺的情况下体验我们的 API,我们提供 7 天免费试用,允许您免费进行最多 50 次 API 调用。此试用只能使用一次,因此我们建议将其应用于您最感兴趣的 API。虽然我们的大多数 API 都提供免费试用,但有些可能不提供。试用在 7 天后或您进行了 50 次请求后结束,以先发生者为准。如果您在试用期间达到 50 次请求限制,您需要"开始您的付费计划"以继续发出请求。您可以在个人资料中的订阅 -> 选择您订阅的 API -> 定价标签下找到"开始您的付费计划"按钮。或者,如果您在第 7 天之前不取消订阅,您的免费试用将结束,您的计划将自动计费,授予您访问计划中指定的所有 API 调用的权限。请记住这一点以避免不必要的费用。

7 天后,您将被收取试用期间订阅的计划的全额费用。因此,在试用期结束前取消很重要。因忘记及时取消而提出的退款请求不被接受。

当您订阅 API 免费试用时,您可以进行最多 50 次 API 调用。如果您希望超出此限制进行额外的 API 调用,API 将提示您执行"开始您的付费计划"。您可以在个人资料中的订阅 -> 选择您订阅的 API -> 定价标签下找到"开始您的付费计划"按钮。

付款订单在每月 20 日至 30 日之间处理。如果您在 20 日之前提交请求,您的付款将在此时间范围内处理。


相关 API