Get accurate location data from any IP address. City-level precision, real-time updates, and all lookups processed in-house for maximum privacy.
All lookups are processed locally using our own geolocation database. No data is sent to third parties.
curl https://yourdomain.com/api.php/ip
const res = await fetch('/api.php/ip'); const data = await res.json(); console.log(data);
<?php $response = file_get_contents('https://yourdomain.com/api.php/ip'); $data = json_decode($response, true); print_r($data);
{
"success": true,
"ip": "203.45.167.89",
"type": "IPv4",
"country": "United States",
"country_code": "US",
"region": "California",
"city": "San Francisco",
"latitude": 37.7749,
"longitude": -122.4194,
"timezone": "America/Los_Angeles",
"isp": "Cloudflare, Inc.",
"asn": "AS13335"
}
curl https://yourdomain.com/api.php/ip/8.8.8.8?fields=ip,country,city,isp
{
"ips": ["8.8.8.8", "1.1.1.1", "9.9.9.9"],
"fields": ["ip", "country", "city"] // optional
}
{
"success": true,
"count": 3,
"results": [
{ "ip": "8.8.8.8", "country": "United States", "city": "Mountain View" },
{ "ip": "1.1.1.1", "country": "Australia", "city": "Sydney" },
{ "ip": "9.9.9.9", "country": "Switzerland", "city": "Zurich" }
]
}
Test the API directly in your browser. All requests go through your local PHP backend.
// Click "Run Test" or a preset to make a request