API documentation / Telegram

Telegram API

Read any public Telegram channel as JSON: subscriber count, name, description and more.

The SocialLens API is one generic API: you call an endpoint by data type and pass platform=telegram. The response schema is the same across every network. Authenticate with a Bearer key from /keys; start with 250 free reads, no card. Full reference, credits, rate limits and errors are on the main docs.

Telegram is read as a public channel: the subscriber count comes through profile. There is no post, follower list or comments endpoint yet.

Public profile

GET/v1/profile

Reads the public Telegram profile and returns normalized counters and identity (including the follower count).

bash
curl "https://api.sociallens.dev/v1/profile?username=telegram&platform=telegram" \
  -H "Authorization: Bearer sk_live_your_key"
python · requests
import requests
res = requests.get(
    "https://api.sociallens.dev/v1/profile",
    params={ "username": "telegram", "platform": "telegram" },
    headers={"Authorization": "Bearer sk_live_your_key"},
)
data = res.json()
node · fetch
const res = await fetch("https://api.sociallens.dev/v1/profile?username=telegram&platform=telegram", {
  headers: { Authorization: "Bearer sk_live_your_key" },
});
const data = await res.json();
php
$ch = curl_init("https://api.sociallens.dev/v1/profile?username=telegram&platform=telegram");
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ["Authorization: Bearer sk_live_your_key"],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);

See also, guides on the blog: Follower Count API: One Request for Every Major Social Network, Data365 and EnsembleData Alternatives, and all guides.

Back to the full API documentation