Telegram channel API
A public Telegram channel, group or bot by username: title, bio, photo, verified flag, the exact subscriber count and, for channels with a web preview, the chat id and media counts, shaped like the Bot API Chat object.
GET /v1/telegram/channels/{handle}1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/telegram/channels/durov",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "chat": { "id": -1001006503122, "type": "channel", "username": "durov", "title": "Pavel Durov", "description": "Founder/CEO/Owner of Telegram.\n\nFounder of TON/Gram.\n\nHalf-part troll.", "description_html": "Founder/CEO/Owner of Telegram.<br/><br/>Founder of TON/Gram.<br/><br/>Half-part troll.", "photo_url": "https://cdn4.telesco.pe/file/giGREwvvCjoIPlu650R_umINNZFdtX_okOxvJKGsSRVPmzKcSTuE0plhTOYXaqGFwbEJpJ03hOnZL7ljvkDawT2vY2O…", "is_verified": true, "is_scam": false, "is_fake": false, "subscriber_count": 9877227, "online_count": null, "counters": { "photos": 106, "videos": 47, "links": 203 }, "has_preview": true, "url": "https://t.me/durov" }}Parameters
| Name | Type | Description |
|---|---|---|
handlepath · required | string | Channel username, with or without the @, or a t.me link. Example: durov. |
Response fields
200 with a TelegramChatResponse, in the shape of the Telegram Bot API’s Chat and Message objects.
| Field | Type | Description |
|---|---|---|
chat | TelegramChat |
Status codes
| Status | Meaning |
|---|---|
200 | The chat. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | No public Telegram chat or post by that name. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | Telegram is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
Questions
Does it work for private channels?
No. Only public chats with a username; invite links need an account.
Telegram is a trademark of Telegram FZ-LLC. We are not affiliated with or endorsed by Telegram.