# 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/tools/telegram
- Handle: `@telegram`
- Category: [Social](https://fous.com/tools/category/social)
- Source website: https://t.me
- Last verified: Sep 29, 2026

## Methods

### Get channel

Operation `get_channel`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

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 completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

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 | `"🤝 Telegram has become the sponsor of Codeforces — the largest competitive programming platform in the world. \n\n ⚡Cod` | Plain text of the post, including link labels. |
| `posts[].views` | integer or null | `1740000` | 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/durov/548"` | Link to the post. |
| `posts[].posted_at` | string | `"2026-09-11T16:04:02+00:00"` | Post date and time in UTC, ISO 8601. |
| `posts[].post_number` | integer | `548` | 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": "durov"
}
```

**Example output**

```json
{
  "posts": [
    {
      "text": "🤝 Telegram has become the sponsor of Codeforces — the largest competitive programming platform in the world. \n\n ⚡CodeForces organizes over 100 coding contests every year and has 4 million contestants…",
      "views": 1740000,
      "edited": false,
      "post_link": "https://t.me/durov/548",
      "posted_at": "2026-09-11T16:04:02+00:00",
      "post_number": 548,
      "photo_thumbnail_links": [],
      "video_thumbnail_links": [],
      "forwarded_from_channel": null
    },
    {
      "text": "💸 In just one month, Telegram has awarded over $2,222,000 to some of the brightest minds on our planet.\n\n🎨 This week alone we distributed $222,000 among the winners of our two latest competitions — …",
      "views": 2670000,
      "edited": false,
      "post_link": "https://t.me/durov/547",
      "posted_at": "2026-09-06T17:40:39+00:00",
      "post_number": 547,
      "photo_thumbnail_links": [],
      "video_thumbnail_links": [],
      "forwarded_from_channel": null
    },
    {
      "text": "🏳️ Gram Wallet in Telegram is ready and is now accessible to a select group of users.\n\n🤩 We'll be gradually rolling it out to our billion+ users over the next couple of weeks.\n\n⚡️ Thanks to the vali…",
      "views": 3070000,
      "edited": false,
      "post_link": "https://t.me/durov/546",
      "posted_at": "2026-08-31T16:30:15+00:00",
      "post_number": 546,
      "photo_thumbnail_links": [],
      "video_thumbnail_links": [
        "https://cdn4.telesco.pe/file/sfcrd9n26vxWi3fTaC_cajXM7gE-kJPRncNIpDZIFIdw0SVYzOymYxZT1ZYSdHpztgvpAn5VBW-9h8M2_ETilIWo7rNu9r8Cl2Km0HXtg2C33F18S2sN45n_IZkRblUH5dw8RZG179zt2sIR0zlkCdkBjjRFHR4Run-_gR6qpIk…"
      ],
      "forwarded_from_channel": null
    }
  ]
}
```

## Quick start

Replace `YOUR_API_KEY` with a Fous API key. To create one, open Developers at the bottom of Fous Studio, turn on Developer mode, then go to API keys (https://app.fous.com/keys). Change the values in `input` to run the same tool on new data.

```bash
curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 180 \
  -H "Authorization: Bearer YOUR_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.
import json
import urllib.error
import urllib.request

api_key = "YOUR_API_KEY"

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=180) 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.
const apiKey = "YOUR_API_KEY";

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(180_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);
```

## Use from an AI assistant

Connect this tool to Claude Code, Claude Desktop, Cursor, VS Code, Codex and any MCP client as its own MCP server. Each method is a typed tool whose arguments are the method’s input.

- Server URL: `https://api.fous.com/mcp/tools/telegram`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `get_channel`: Get channel. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `list_channel_posts`: List channel posts. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `fous_get_run`: the result of a run that was still going, by its `request_id`. Free.

Claude Code:

```bash
claude mcp add --scope user --transport http fous-telegram https://api.fous.com/mcp/tools/telegram --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"
```

To give the assistant every tool, connect `https://api.fous.com/mcp`: it finds one with `fous_search_tools` and runs it with `fous_run_tool`. Setup for other clients: https://fous.com/llms-full.txt.

## 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

### Can I run it with my own inputs?

Yes. Change the inputs in Studio and press Run, or send new inputs from your code, or ask a connected AI assistant.

### Can I call this Telegram tool as an API?

Yes. Send a POST request to /v1/query with your Fous API key and the inputs, and get JSON back.

### How much does it cost?

Each completed run costs 1 credit. Failed runs without a completed receipt are free; completed work can remain charged if delivery is interrupted. 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. Some results are reused for up to 24 hours, and results that use your account or key are never reused. It was last verified 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/tools/youtube.md): YouTube returns public video, caption, comment and channel details, company channels, and the latest weekly Top Songs chart; inferred dates and some counts may be approximate.
- [Threads API](https://fous.com/tools/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/tools/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/tools/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/tools/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/tools/tumblr.md): Tumblr blogs and posts.
- [Medium API](https://fous.com/tools/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/tools/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 tools](https://fous.com/tools/category/social)
