# Telegram API

> Telegram returns public channel details and recent posts through a workflow and API.

Telegram, also called TG, uses Get channel to return public channel details from a channel name or t.me link.

- Page: https://fous.com/workflows/telegram
- Handle: `@telegram`
- Category: [Social](https://fous.com/workflows/category/social)
- Source website: https://t.me
- Last verified: Sep 29, 2026
- Fous is not affiliated with Telegram.

## Methods

### Get channel

Operation `get_channel`, version 1. 1 credit per call.

Get the title, username, description, subscriber total, verification, photo and public media totals for a public Telegram channel. Media totals can be rounded when Telegram abbreviates them; missing totals are null. Private channels, groups, bots and people are not supported.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `channel` | string | yes | `"durov"` | Public channel name with or without @, or its t.me link, such as durov, @durov, or t.me/durov. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "channel"
  ],
  "properties": {
    "channel": {
      "type": "string",
      "description": "Public channel name with or without @, or its t.me link, such as durov, @durov, or t.me/durov.",
      "examples": [
        "durov",
        "t.me/telegram",
        "TelegramTips"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "channel": "durov"
    },
    {
      "channel": "t.me/telegram"
    },
    {
      "channel": "TelegramTips"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `username` | string | `"@durov"` | The channel username with @. |
| `file_count` | integer or null |  | Files shown in the public preview; may be rounded if abbreviated. |
| `link_count` | integer or null | `200` | Links shown in the public preview; may be rounded if abbreviated. |
| `description` | string or null | `"Founder of Telegram."` | Channel description, or null when not provided. |
| `is_verified` | boolean | `true` | Whether the public channel displays a verified badge. |
| `photo_count` | integer or null | `102` | Photos shown in the public preview; may be rounded if abbreviated. |
| `video_count` | integer or null | `46` | Videos shown in the public preview; may be rounded if abbreviated. |
| `channel_link` | string | `"https://t.me/durov"` | The channel t.me page link. |
| `channel_title` | string | `"Pavel Durov"` | The channel title. |
| `subscriber_count` | integer | `10594012` | Exact number of subscribers from the public profile. |
| `channel_photo_link` | string or null | `"https://cdn4.telesco.pe/file/dvlDi8HZMZcm2m0WSzi_v3KAH7ndzd_FKRLAlcycWXQiRkvGdkuo8cuoGMZeJ8XwOT-r_HagOBIW4MtqmJCEd8Rumw` | Channel profile photo URL, or null if absent. |

**Example input**

```json
{
  "channel": "durov"
}
```

**Example output**

```json
{
  "username": "@durov",
  "file_count": null,
  "link_count": 200,
  "description": "Founder of Telegram.",
  "is_verified": true,
  "photo_count": 102,
  "video_count": 46,
  "channel_link": "https://t.me/durov",
  "channel_title": "Pavel Durov",
  "subscriber_count": 10594012,
  "channel_photo_link": "https://cdn4.telesco.pe/file/dvlDi8HZMZcm2m0WSzi_v3KAH7ndzd_FKRLAlcycWXQiRkvGdkuo8cuoGMZeJ8XwOT-r_HagOBIW4MtqmJCEd8RumwOzG5NfNtMXVdMOd2kQc9UkLPrrLJzCdsVcP3sxiyma_ugCTk3TpxLiMztEMwezf_9KYc5VjS5Bhx1QKQc…"
}
```

### List channel posts

Operation `list_channel_posts`, version 1. 1 credit per call.

List the latest posts from a public Telegram channel, including text, posting time, views, edits, forwarded source, media thumbnails and post links. View counts are approximate when the preview abbreviates them; only posts visible on public channel previews are included.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `channel` | string | yes | `"durov"` | Public channel username with or without @, or its t.me link, for example durov. |
| `max_results` | integer | no | `45` | Maximum number of recent posts to return, for example 40. Up to 100. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "channel"
  ],
  "properties": {
    "channel": {
      "type": "string",
      "description": "Public channel username with or without @, or its t.me link, for example durov.",
      "examples": [
        "durov",
        "https://t.me/TelegramTips",
        "@gram"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 20,
      "maximum": 100,
      "minimum": 1,
      "description": "Maximum number of recent posts to return, for example 40. Up to 100.",
      "x-fous-developer": true,
      "examples": [
        45,
        5,
        100
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "channel": "durov"
    },
    {
      "channel": "https://t.me/TelegramTips",
      "max_results": 45
    },
    {
      "channel": "@gram",
      "max_results": 5
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `posts` | array |  | Channel posts in newest-first order. |
| `posts[].text` | string | `"🌍 This summer will see the largest rollout of a non-custodial crypto wallet in human history.\n\n⚡️Instant zero-fee cr` | Plain text of the post, including link labels. |
| `posts[].views` | integer or null | `333000` | Displayed view count converted to an approximate whole number, or null when unavailable. |
| `posts[].edited` | boolean | `false` | Whether the preview marks this post as edited. |
| `posts[].post_link` | string | `"https://t.me/gram/2389"` | Link to the post. |
| `posts[].posted_at` | string | `"2026-07-21T14:41:46+00:00"` | Post date and time in UTC, ISO 8601. |
| `posts[].post_number` | integer | `2389` | Channel post number. |
| `posts[].photo_thumbnail_links` | array |  | Links to photo thumbnails. |
| `posts[].video_thumbnail_links` | array |  | Links to video thumbnails. |
| `posts[].forwarded_from_channel` | string or null | `"Pavel Durov"` | Name shown as the forwarded source, or null. |

**Example input**

```json
{
  "channel": "@gram",
  "max_results": 5
}
```

**Example output**

```json
{
  "posts": [
    {
      "text": "🌍 This summer will see the largest rollout of a non-custodial crypto wallet in human history.\n\n⚡️Instant zero-fee crypto transactions for over a billion users are about to become reality.\n\n💎 We're b…",
      "views": 333000,
      "edited": false,
      "post_link": "https://t.me/gram/2389",
      "posted_at": "2026-07-21T14:41:46+00:00",
      "post_number": 2389,
      "photo_thumbnail_links": [],
      "video_thumbnail_links": [],
      "forwarded_from_channel": "Pavel Durov"
    },
    {
      "text": "💎 Toncoin → Gram\n\nThe rebranding is in progress 🔥",
      "views": 727000,
      "edited": false,
      "post_link": "https://t.me/gram/2388",
      "posted_at": "2026-06-15T14:37:51+00:00",
      "post_number": 2388,
      "photo_thumbnail_links": [],
      "video_thumbnail_links": [],
      "forwarded_from_channel": null
    },
    {
      "text": "Channel photo updated",
      "views": null,
      "edited": false,
      "post_link": "https://t.me/gram/2387",
      "posted_at": "2026-06-15T14:26:56+00:00",
      "post_number": 2387,
      "photo_thumbnail_links": [],
      "video_thumbnail_links": [],
      "forwarded_from_channel": null
    }
  ]
}
```

## Quick start

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@telegram",
  "visibility": "public",
  "operation": "get_channel",
  "version": 1,
  "input": {
    "channel": "durov"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

body = json.loads("{\n  \"api\": \"@telegram\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_channel\",\n  \"version\": 1,\n  \"input\": {\n    \"channel\": \"durov\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=120) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_000),
  body: JSON.stringify({
  "api": "@telegram",
  "visibility": "public",
  "operation": "get_channel",
  "version": 1,
  "input": {
    "channel": "durov"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

Or describe the data in plain language: send `{"api":"@telegram","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## Use cases

- Review public channel descriptions and subscriber totals
- Compare subscriber counts across public channels
- Track recent posts and approximate views
- Find post links and posting times
- Collect public post text and media thumbnails

## FAQ

### Is Fous affiliated with Telegram?

No. Fous is not affiliated with Telegram. This workflow reads the public t.me website and returns its data.

### How much does it cost?

Each run costs 1 credit. With pay-as-you-go, a credit costs 1¢; monthly plans cost less per credit.

### Do I need a Telegram account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from t.me when you run it; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check on Sep 29, 2026.

### How many subscribers does a public channel have?

Get channel returns the exact subscriber count from the public profile.

### What has a public channel posted recently?

List channel posts returns recent posts visible on public channel previews, newest first.

### Which public channels display a verified badge?

Get channel returns whether a public channel displays a verified badge.

## Related

- [YouTube API](https://fous.com/workflows/youtube.md): YouTube returns public video, caption, comment, channel and upload details, plus the latest weekly Top Songs chart; inferred dates and some counts may be approximate.
- [Threads API](https://fous.com/workflows/threads.md): Threads provides public profiles and posts, including recent posts, engagement and replies; private or login-only content is excluded, and replies may be limited to 10.
- [Mastodon API](https://fous.com/workflows/mastodon.md): Mastodon provides public profiles and recent public posts, including hashtag posts, but excludes private and unlisted posts and may limit visibility to accounts known to mastodon.social or a selected server.
- [Instagram API](https://fous.com/workflows/instagram.md): Instagram provides public photos, videos, profiles, exact headline counts, bio links, and profile pictures, plus recent public posts and reels; some profiles or posts require login, and view counts may be unavailable.
- [Substack API](https://fous.com/workflows/substack.md): Substack returns public newsletters and recent public post details or text; paid posts expose previews or metadata, and some custom-domain newsletters may be unavailable.
- [Tumblr API](https://fous.com/workflows/tumblr.md): Tumblr blogs and posts.
- [Medium API](https://fous.com/workflows/medium.md): Medium returns public writer, publication, and topic articles, including newest posts and weekly popular picks, plus readable article text; member-only stories remain limited to visible previews.
- [Reddit API](https://fous.com/workflows/reddit.md): Reddit returns searchable public posts, community feeds/details, user profiles and recent activity, posts with up to 200 comments; unavailable content limits results; Top defaults weekly.
- [All Social workflows](https://fous.com/workflows/category/social)
