Telegram API

Public Telegram channel profiles and message history with stable schemas.

Base URL: https://api.endpointry.com/v1/telegram. All endpoints require Bearer authentication and return the standard response envelope. This reference is generated from the same schemas the gateway enforces at runtime.

GET/v1/telegram/channel

Get a public channel

Returns a public channel by username: title, description, subscriber count, verification badge and avatar. Returns `404 NOT_FOUND` when no public channel uses that username. Records are cached briefly and shared with `/messages`.

Query parameters
channel*stringThe public channel username, without the leading @.
Response fields (data)
channel*object
id*integer
username*string
url*string · uri
title*string
description*string | nullThe channel bio, when it has one.
type*stringThe kind of chat this username resolves to.
verified*boolean
subscribers*integerSubscriber count as Telegram reports it.
image_url*string · uri | nullThe channel avatar at the highest resolution offered.
Response meta

Platform fields, identical on every endpoint — what they mean.

curl "https://api.endpointry.com/v1/telegram/channel" \
  -H "Authorization: Bearer sk_live_..."
const res = await fetch("https://api.endpointry.com/v1/telegram/channel", {
  headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});

if (!res.ok) {
  const problem = await res.json();
  throw new Error(`${problem.code}: ${problem.detail} (${problem.request_id})`);
}
const { data, meta } = await res.json();
import os, requests

res = requests.get(
    "https://api.endpointry.com/v1/telegram/channel",
    headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
    timeout=15,
)
body = res.json()
if res.status_code != 200:
    raise RuntimeError(f"{body['code']}: {body['detail']} ({body['request_id']})")
data, meta = body["data"], body["meta"]
200 · application/json
{
  "meta": {
    "request_id": "req_7729f93d3facf68ff83e5c50",
    "as_of": "2026-08-02T12:00:00.000Z",
    "cache": "MISS"
  },
  "data": {
    "channel": {
      "id": 1005640892,
      "username": "telegram",
      "url": "https://t.me/telegram",
      "title": "Telegram News",
      "description": "The official Telegram on Telegram. Much recursion. Very Telegram. Wow.",
      "type": "channel",
      "verified": true,
      "subscribers": 9929948,
      "image_url": "https://cdn1.telesco.pe/file/OlYOPa0mOv6odATduwSNDRktKzZ7zDgL.jpg"
    }
  }
}

GET/v1/telegram/messages

Get channel messages

Returns a public channel's messages, newest first, up to 100 per response. Each message carries its permalink, publish time, view count, plain text and a safe-subset HTML rendering, plus whatever it attached: photos and albums, videos, stickers, files with their type and duration, polls with per-option shares, and the origin of a forwarded post. Pagination walks backwards through the channel with `meta.pagination.next_cursor`, ending with `null` at the first message.

Query parameters
channel*stringThe public channel username, without the leading @.
limit*integerMessages to return, newest first (1–100).
cursorstringOpaque cursor from `meta.pagination.next_cursor` of a previous response.
Response fields (data)
messages*array<object>
id*integer
url*string · uri
date*string · date-time
author*string | null
text*string | nullThe message as plain text, with line breaks preserved.
html*string | nullThe message with its original formatting, limited to a safe subset of tags (b, i, u, s, a, code, pre, br, span) and, on links, href alone.
views*integer | nullView count as Telegram reports it; rounded for large numbers.
forwarded_from*object | null
channel*string | null
title*string | null
message_id*integer | null
url*string · uri | null
link_preview*object | null
url*string · uri
title*string | null
name*string | nullThe site name Telegram resolved.
description*string | null
image_url*string · uri | null
photos*array<object>
url*string · uri
permalink*string · uriLink to this item, which differs from the message for album items.
album*booleanWhether the photo is part of a grouped album.
videos*array<object>
url*string · uri
sticker*object | null
url*string · uri
mime_type*string | null
document*object | null
kind*"video" | "audio" | "voice" | "image" | "sticker" | "file"
file_name*string | null
mime_type*string | null
size*integer | nullSize in bytes.
duration*integer | nullSeconds, for audio and video.
width*integer | null
height*integer | null
poll*object | null
question*string
multiple_choice*boolean
voters*integerTotal votes. Telegram rounds large counts, so this is approximate above ~1000.
options*array<object>
text*string
percent*numberShare of the vote, 0–100.
Response meta

Platform fields, identical on every endpoint — what they mean.

curl "https://api.endpointry.com/v1/telegram/messages" \
  -H "Authorization: Bearer sk_live_..."
const res = await fetch("https://api.endpointry.com/v1/telegram/messages", {
  headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});

if (!res.ok) {
  const problem = await res.json();
  throw new Error(`${problem.code}: ${problem.detail} (${problem.request_id})`);
}
const { data, meta } = await res.json();
import os, requests

res = requests.get(
    "https://api.endpointry.com/v1/telegram/messages",
    headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
    timeout=15,
)
body = res.json()
if res.status_code != 200:
    raise RuntimeError(f"{body['code']}: {body['detail']} ({body['request_id']})")
data, meta = body["data"], body["meta"]
200 · application/json
{
  "meta": {
    "request_id": "req_7729f93d3facf68ff83e5c50",
    "as_of": "2026-08-02T12:00:00.000Z",
    "cache": "MISS",
    "pagination": {
      "next_cursor": "MzAwYzM4ZTU6NDUz",
      "limit": 20,
      "returned": 1
    }
  },
  "data": {
    "messages": [
      {
        "id": 454,
        "url": "https://t.me/telegram/454",
        "date": "2026-07-19T17:58:20.000Z",
        "author": "Telegram News",
        "text": "For all the details on these new features, check out our blog:\nhttps://telegram.org/blog/communities-editor-invisible-messages",
        "html": "<p>For all the details on these new features, check out our blog:<br><a href=\"https://telegram.org/blog/communities-editor-invisible-messages\">https://telegram.org/blog/communities-editor-invisible-messages</a></p>",
        "views": 1090000,
        "forwarded_from": null,
        "link_preview": {
          "url": "https://telegram.org/blog/communities-editor-invisible-messages",
          "title": "Rich Text Editor, Communities, Ephemeral Messages in Groups",
          "name": "Telegram",
          "description": "Introducing a rich text editor to format and generate text.",
          "image_url": null
        },
        "photos": [],
        "videos": [],
        "sticker": null,
        "document": null,
        "poll": null
      }
    ]
  }
}