IP Finder Bot is a Telegram bot 🤖 that provides detailed information about IP addresses 🌍, including geographical location 📍, Internet Service Provider (ISP), and more. It supports both IPv4 and IPv6 addresses and offers functionalities through direct messages 💬 and inline queries 🔍.
- IP Address Lookup: Enter an IP address to get detailed information 🔎.
- IPv4 and IPv6 Support: Handles both IPv4 and IPv6 address formats 🔄.
- Geographical Information: Provides details like country 🏳️, city 🏙, region, and postal code 📬.
- ISP Information: Retrieves the Internet Service Provider associated with the IP 🌐.
- Interactive Map: Shares a static map pinpointing the IP address location 🗺, generated using the LocationIQ Maps API.
- Inline Query Support: Use the bot in any conversation through inline queries 🔍.
- Privacy Focused: Does not store user queries 🛡.
The bot generates map images for IP locations using the LocationIQ Maps API:
- Obtain an API key by signing up for a free LocationIQ account 🔑.
- Use the Static Map service by constructing a URL with the location's latitude and longitude, and your API key 📍.
https://maps.locationiq.com/v3/staticmap?key=YOUR_LOCATIONIQ_API_KEY¢er=LATITUDE,LONGITUDE&zoom=16&size=600x600&markers=icon:large-blue-cutout|LATITUDE,LONGITUDE
Replace YOUR_LOCATIONIQ_API_KEY
, LATITUDE
, and LONGITUDE
with your LocationIQ API key and the geographical coordinates.
Set Environmentals variable before deploy. - Instructions
To use this bot, you need to have Python installed on your machine along with some specific libraries. Follow the steps below to set up and run the bot:
- Python 3.6 or newer 🐍
- A Telegram Bot Token 🤖 (obtained from BotFather)
- An IPinfo API token 🔑 (obtain from IPinfo)
pyrogram
- A modern, elegant, and asynchronous Telegram MTProto API framework 🚀.ipinfo
- For fetching IP details 🌍.requests
- For making HTTP requests 🌐.
- Clone this repository or download the script 📁.
- Install the required Python libraries using pip:
pip install pyrogram ipinfo requests
- Create a
config.py
file in the same directory as the script with the following content, replacingYOUR_API_ID
,YOUR_API_HASH
,YOUR_BOT_TOKEN
, andYOUR_IPINFO_ACCESS_TOKEN
with your actual details:class con: API_ID = 'YOUR_API_ID' # Your API ID (as a string) 🆔 API_HASH = 'YOUR_API_HASH' # Your API Hash (as a string) 🔐 BOT_TOKEN = 'YOUR_BOT_TOKEN' # Your Bot Token (as a string) 🤖 IP_API = 'YOUR_IPINFO_ACCESS_TOKEN' # Your IPinfo Access Token (as a string) 🔑
- Run the bot 🏃♂️:
python main.py
- Start the Bot: Send
/start
to see the welcome message 🚀. - Find IP Information: Send any IP address 📧.
- Inline Query: Type
@YourBotUsername IP_ADDRESS
in any chat 🔍.
Access the original bot here.