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.