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.
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 your_script_name.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.