Telegram Bot icon

Telegram Bot

Interact with the Telegram Bot API – send messages, manage chats, handle payments, and more

Actions101

Chat → Get Chat Member Count

AI-generated

Summary

Retrieves the total member count of a specified Telegram chat.

Inputs

  • chat_id (required) — Unique identifier for the target chat or its username (e.g., @channelusername).

Output shape

a number (the member count) returned as the result field of the Telegram API response

If the underlying API call fails, an error is thrown; results are usually wrapped in the API's result object.

Examples

Example 1: Count members in a public channel

chat_id: @mychannel

Example 2: Count members in a private group

chat_id: 123456789

Example 3: Get member count of a supergroup

chat_id: "-1001234567890"

Links

Discussion