IP Info API
The IP Information API allows you to retrieve comprehensive geographical and network details for any visiting IP address. This API does not require authentication and can be called directly.
Endpoint
GET /api/v1/ip-info
Integration Examples
PHP (cURL)
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://yourdomain.com/api/v1/ip-info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Python (Requests)
import requests
url = "https://yourdomain.com/api/v1/ip-info"
response = requests.request("GET", url)
print(response.text)
Node.js (Fetch)
fetch("https://yourdomain.com/api/v1/ip-info")
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:', err));
Response Example
{
"status": "success",
"data": {
"ip": "8.8.8.8",
"is_vpn_proxy": false,
"vpn_type": null,
"country": "United States",
"city": "Mountain View",
"region": "California",
"timezone": "America/Los_Angeles",
"latitude": 37.386,
"longitude": -122.0838,
"isp": "Google LLC",
"asn": 15169
}
}