A Python-based tool that tracks the geographical location of a phone number and visualizes it on an interactive map.
- Extract country/region information from phone numbers
- Identify carrier/service provider
- Get geographical coordinates (latitude and longitude)
- Generate an interactive map with location marker
- Export map as HTML file
- phonenumbers - Phone number parsing and validation
- opencage - Geocoding API for coordinate conversion
- folium - Interactive map generation with Leaflet.js
Before running this project, make sure you have Python installed on your system.
- Clone this repository:
git clone https://github.com/yourusername/phone-location-tracker.git
cd phone-location-tracker- Install required dependencies:
pip install phonenumbers
pip install opencage
pip install foliumThis project uses OpenCage Geocoding API. You'll need to:
- Sign up for a free API key at OpenCage
- Replace the API key in
location_tracker.py:
key = 'YOUR_API_KEY_HERE'- Open
location_tracker.pyand modify the phone number:
number = "+8801973445094" # Replace with your target number- Run the script:
python location_tracker.py-
The script will:
- Print the country/region
- Print the carrier name
- Print the coordinates (latitude, longitude)
- Generate
mylocation.htmlwith an interactive map
-
Open
mylocation.htmlin your web browser to view the location on the map.
phone-location-tracker/
β
βββ location_tracker.py # Main Python script
βββ mylocation.html # Generated map output
βββ README.md # Project documentation
- Phone Number Parsing: Uses the
phonenumberslibrary to parse and validate the phone number - Location Extraction: Extracts country/region information from the phone number
- Carrier Detection: Identifies the mobile carrier/service provider
- Geocoding: Converts location name to geographical coordinates using OpenCage API
- Map Generation: Creates an interactive map with Folium and marks the location
- This tool provides approximate location based on phone number country code and region
- Accuracy depends on the phone number format and available data
- The location shown is typically the country or region, not the exact GPS location
- Respect privacy laws and regulations in your jurisdiction
- This tool is for educational purposes only
Bangladesh
Grameenphone
24.4769288 90.2934413
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
This project is licensed under the MIT License - see the LICENSE file for details.
Shofi Ahmed
- GitHub: @shofiahmed69
Give a βοΈ if this project helped you!