Get detailed IP address information including location, ISP, and network details
The IP Info API provides comprehensive information about IP addresses including geolocation, ISP details, timezone, and network information. Perfect for analytics, security, and user experience enhancement.
/api/v1/ip
/api/v1/ip/info
/api/v1/ip/lookup
| Parameter | Type | Required | Description |
|---|---|---|---|
ips |
array | Yes | Array of IP addresses to lookup (both IPv4 and IPv6 supported) |
{
"ip": "203.0.113.1",
"ipv4": "203.0.113.1",
"ipv6": null,
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)...",
"timestamp": "2025-07-16T10:30:00.000Z",
"headers": {
"accept-language": "en-US,en;q=0.9",
"cf-ipcountry": "US",
"x-forwarded-for": "203.0.113.1"
},
"location": {
"country": "United States",
"country_code": "US",
"region": "California",
"city": "Los Angeles",
"latitude": 34.0522,
"longitude": -118.2437,
"timezone": "America/Los_Angeles",
"isp": "Example ISP Inc",
"organization": "Example Organization",
"as": "AS12345 Example AS Network",
"query": "203.0.113.1"
},
"source": "ip-api.com"
}
GET https://hisham-zahid.online/api/v1/ip
GET https://hisham-zahid.online/api/v1/ip/info
POST https://hisham-zahid.online/api/v1/ip/lookup
Content-Type: application/json
{
"ips": ["8.8.8.8", "1.1.1.1", "2001:4860:4860::8888"]
}
// Get current visitor IP info
fetch('https://hisham-zahid.online/api/v1/ip')
.then(response => response.json())
.then(data => {
console.log('IP:', data.ip);
console.log('Location:', data.location.city, data.location.country);
console.log('ISP:', data.location.isp);
});
// Batch lookup
fetch('https://hisham-zahid.online/api/v1/ip/lookup', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
ips: ['8.8.8.8', '1.1.1.1']
})
})
.then(response => response.json())
.then(data => console.log(data));
# Get your IP info
curl https://hisham-zahid.online/api/v1/ip
# Batch lookup
curl -X POST https://hisham-zahid.online/api/v1/ip/lookup \
-H "Content-Type: application/json" \
-d '{"ips": ["8.8.8.8", "1.1.1.1"]}'
Request successful, IP information returned
Invalid request format or missing required parameters
{"error": "Please provide an array of IP addresses"}
Invalid IP address provided
{
"ip": "invalid.ip.address",
"error": "Invalid IP address"
}
Server error occurred while processing request
{"error": "Internal server error"}
The API checks headers in the following order to find the real client IP:
Location data is sourced from reliable IP geolocation providers: