25 November 2025

Open-Source: Telegram ads collector

maps.png

Telegram does not provide an API to get ad campaign statistics. I faced the same problem, so I built a tool and decided to share it with you.

Download code from GitHub

  1. Create a Postgres database.
  2. Add your credentials to the .env file.
  3. Set the stats-collection frequency in the *.timer file.
  4. Install the Python environment using requirements.txt.
  5. Run the program.

The program will create three tables in your database, scrape data from ads.telegram.org, and insert it into the tables automatically.

Daniil Kovekh
Daniil Kovekh
Data & Full Stack Engineer