Telegram public channel API
Name, description, avatar, verification, member count and media counters of a public channel or group, read from Telegram's public web preview (no Telegram account).
- Cost
- 1 credit
- Cached repeats
- 0 creditssend max_age_days, results kept 30 days
- Failed requests
- 0 credits
- Status
- Betashape may still gain fields
Private and invite-only chats are not supported.
You send one of handle or url.
Request
Send your key in the x-api-key header.
curl -G "https://api.socialscrape.io/v1/telegram/channel" \
-H "x-api-key: $SOCIALSCRAPE_API_KEY" \
--data-urlencode 'handle=durov'import os
import requests
params = {
"handle": "durov",
}
res = requests.get(
"https://api.socialscrape.io/v1/telegram/channel",
headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
params=params,
timeout=60,
)
body = res.json()
if body["ok"]:
print(body["data"])
else:
print(body["error"]["code"], body["error"]["message"])const url = new URL("https://api.socialscrape.io/v1/telegram/channel");
url.search = new URLSearchParams({
handle: "durov",
}).toString();
const res = await fetch(url, {
headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();
if (body.ok) {
console.log(body.data);
} else {
console.error(body.error.code, body.error.message);
}{
"nodes": [
{
"name": "SocialScrape Telegram public channel",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
0,
0
],
"parameters": {
"method": "GET",
"url": "https://api.socialscrape.io/v1/telegram/channel",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "handle",
"value": "durov"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
"value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
}
]
}
}
}
],
"connections": {}
}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
handle | string | one of | Channel username, without @. Also accepted as username. |
url | url | one of | Channel URL (t.me/<name>). |
Every request also accepts trim, raw and max_age_days.
Response
Sample from a recorded response, shortened. Values are public data, not yours.
{
"ok": true,
"credits_charged": 1,
"credits_remaining": 4999,
"cached": false,
"cached_at": null,
"request_id": "req_08e7e0a500aac8057ac41e6f",
"data": {
"object": "community",
"platform": "telegram",
"id": null,
"url": "https://t.me/durov",
"kind": "channel",
"name": "durov",
"title": "Pavel Durov",
"description": "Founder of Telegram.",
"avatar_url": "https://cdn4.telesco.pe/file/E1fT1nGQ1lDmNdTpfhudwrMtUB-bHaQjPg9dJWmN5KP932jw4thhnQURK4_DTwLtKMB7u9r6HqRQSNTZSDpohG0KFjyvUfvqBOMBoBgotUycPBIRIdO6jbVgVFfa2R8D...",
"banner_url": null,
"member_count": 10201685,
"online_count": null,
"is_nsfw": null,
"is_private": null,
"verified": true,
"created_at": null,
"extra": {
"link_count": 200,
"member_count_text": "10.2M",
"photo_count": 102,
"video_count": 47
}
},
"cursor": null,
"has_more": null
}Fields
One Community in data.
A field the platform does not give is null, never made up. Extra platform details are in extra.
| Field | Type | Always | Notes |
|---|---|---|---|
object | "community" | ||
platform | Platform | yes | |
id | string or null | ||
url | string or null | ||
kind | "subreddit" or "group" or "community" or "channel" or "unknown" | ||
name | string or null | the slug, "python" for r/python | |
title | string or null | ||
description | string or null | ||
avatar_url | string or null | ||
banner_url | string or null | ||
member_count | integer or null | ||
online_count | integer or null | ||
is_nsfw | boolean or null | ||
is_private | boolean or null |
Show the other 3 fields
| Field | Type | Always | Notes |
|---|---|---|---|
verified | boolean or null | the platform's verified badge (Telegram channels) | |
created_at | string (ISO 8601 date-time) or null | ||
extra | object or null |
Full field list in the reference for this endpoint and the data models. Errors are listed under Errors.
Questions
Which errors can it return?
invalid_params (do not retry), unsupported_url (do not retry), not_found (do not retry). Account and platform errors from the errors list can also happen. A failure always costs 0 credits.
Is there an SDK call for it?
The preview Python client has client.telegram.channel(...) and the TypeScript client client.telegram.channel(). Both return the same envelope as the HTTP API. The packages are not published yet; plain HTTP works today in any language.
Can an AI agent call it?
Yes. The MCP server reaches every built endpoint, with the same prices.