Telegram channel statistics and summary report generation

XMLans Posted on 2026-02-08 137 Views


Why did I create this project?
The idea came from running a fairly popular Telegram channel and realizing that, although there are many analytics bots available, most of them lack key metrics — like total post views, total shares, average views per post, and the most viewed post of all time.
So, this project was made to fill in those gaps while staying simple and easy to use.

{alert type="info"}
GitHub Repository: https://github.com/xmlans/telegramsummary
If you find it helpful, don’t forget to give it a star!
{/alert}

This Python script automatically generates a summary report of your Telegram channel, just like the one shown below:
Report Example


How to Use

First, make sure you have Python installed on your computer.
If not, download it here: https://www.python.org/downloads/

Then, click the GitHub repository link above, download the ZIP file, and extract it.
Open the extracted folder and install the required dependency with this command:

pip install telethon

Next, go to the Telegram Developer Portal
and get your api_id and api_hash.
Open the tg.py file and replace the placeholders with your credentials.
Make sure to fill in your channel name under channel, and adjust the BATCH_SIZE according to your channel’s message count.
If your channel has over 1,000 messages, increase the batch size slightly to avoid rate limits.
Now, run the script:

python tg.py

Enter your phone number (including country code), then confirm the verification code you’ll receive on Telegram.
After a short while, the program will generate a full performance report.

Hi! I frequently update with various articles about technology, practical tips, and cutting-edge news. I hope it will be helpful to you!
Last updated on 2026-02-08