Track and analyze IP addresses using two powerful geolocation APIs with detailed location data
IP-Tracker provides two independent IP geolocation methods that query different APIs to retrieve comprehensive geographic and network information about any IP address. Both methods automatically save results and provide Google Maps integration for visual location confirmation.
The primary method uses the free ip-api.com service, which provides extensive information without strict rate limits for non-commercial use.API Endpoint:http://ip-api.com/json/{ip_address}
def geolocalizar_ip_metodo1(ip_address): """Método 1: Usando ip-api.com (gratuito, sin límite estricto)""" url = f'http://ip-api.com/json/{ip_address}' response = requests.get(url, timeout=10) if response.status_code == 200: data = response.json() if data.get('status') == 'fail': return None # Create timestamped file timestamp = datetime.now().strftime("%Y%m%d_%H%M%S") nombre_archivo = f"IP_{ip_address}_{timestamp}.txt" # Save results with all fields # Display on screen and return data return data
This method provides the most detailed information including ISP, organization, and AS (Autonomous System) data.
The alternative method uses ipinfo.io, a reliable service that provides clean, structured geolocation data.API Endpoint:https://ipinfo.io/{ip_address}/json
Allowing immediate visual verification of the location
Best practice: Use Method 1 for detailed ISP/AS information and Method 2 when you need hostname resolution. For critical lookups, use comparison mode to verify consistency.