A Telegram bot that reports your public IP address with detailed geolocation — country flag, city, ISP, timezone, and coordinates — all behind a few tappable buttons.
| Feature | Description |
|---|---|
| 📍 IP Detection | Shows your current public IP |
| 🇺🇸 Country + Flag | Country name with emoji flag |
| 🏙️ Location Details | City, region, and timezone |
| 📡 Network Info | Internet Service Provider (ISP) |
| 🗺️ Map Integration | Open the location on OpenStreetMap / Google Maps |
| 🔄 Real-time Refresh | Re-fetch info anytime |
| 🎯 Simple UX | Inline buttons and plain commands |
Main interface
👋 Hello, User!
Your current IP: 123.45.67.89
🇺🇸 Country: United States
🏙️ City: New York
Select an action:
[🔄 Refresh Info] [📊 Full Details]
[📍 Show on Map]
Full details
📍 Your IP Information
🌐 IP Address: 123.45.67.89
🇺🇸 Country: United States
🏙️ City: New York
🗺️ Region: New York
🕐 Timezone: America/New_York
📡 ISP: Comcast Cable
📍 Coordinates: 40.7128, -74.0060
🌍 Open in Google Maps
- Python 3.7+
- A Telegram account
- A bot token from @BotFather
git clone https://github.com/CraftStick/IPBot-telegram.git
cd IPBot-telegram
pip install -r requirements.txtcp config.example.py config.pyOpen config.py and paste the token you got from @BotFather:
BOT_TOKEN = "123456:ABC-DEF..."python bot.pyCommands
| Command | Description |
|---|---|
/start |
Start the bot and show the main menu |
/info |
Get full IP information |
/help |
Show the help message |
Buttons
| Button | Action |
|---|---|
| 🔄 Refresh Info | Re-fetch IP data |
| 📊 Full Details | Extended information |
| 📍 Show on Map | Open location on a map |
API
Powered by ip-api.com — a free IP geolocation service.
- No API key required for basic usage
- Rate limit: 45 requests/minute (per source IP)
Dependencies
| Package | Purpose |
|---|---|
pyTelegramBotAPI |
Telegram Bot API wrapper |
requests |
HTTP client for API calls |
requirements.txt:
pyTelegramBotAPI
requests
IPBot-telegram/
├── bot.py # Main bot application
├── requirements.txt # Python dependencies
├── config.example.py # Example configuration
├── README.md # Documentation
└── .gitignore # Git ignore rules
| Problem | Fix |
|---|---|
Unauthorized on start |
Token in config.py is wrong or missing |
No response from /start |
Check the bot is running and the machine has internet access |
| Geolocation is empty | You may have hit the ip-api rate limit — wait a minute |
Contributions are welcome!
- Fork the repository
- Create a feature branch —
git checkout -b feature/AmazingFeature - Commit your changes —
git commit -m 'Add AmazingFeature' - Push the branch —
git push origin feature/AmazingFeature - Open a Pull Request
Licensed under the MIT License — see the LICENSE file for details.
- GitHub: @CraftStick
- Repository: IPBot-telegram
- Report Issues: GitHub Issues
Если было полезно — поставь ⭐, это очень помогает!
If you found this useful, consider leaving a ⭐ — it helps a lot!