Python Telegram bot for lookups

📅️ Published:

🔄 Updated:

🕔 1 min read ∙ 208 words

Occasionally I’ve been on Telegram in a few ham radio chats and wanted to lookup a call sign via Not seeing any options, I decided to write my own.

Some chats I’m in have other bots that query QTH or other sources, but their results/database don’t seem as complete as

So I wrote my own python telegram bot that queries

The code is available on GitLab at, pytelehambot

The code isn’t in the best condition, and I’m continuing to work on cleaning it up.

But it works!

It responds to inline queries like: @nameofbot in a private chat, or in a private message via /lookupviaQRZ <callsign>

In order to use this code, you need two things:

Please note, this likely only works on Linux. I’ve only tested it on Debian 12 (so far) using Python 3.11.2 in a python virtual environment.

To run it, open up tmux and execute the script and just let it idle there.

Right now, it logs output to standard out (stdout), but soon I’ll move that to the log files.

I hope some folks find this helpful.

73, K8VSY

💬 Comment: