Home API Tools Posts Hire Me About
Sign In Create Account
Live Free tier included

IP Geolocation & Threat Intel

Look up any IPv4/IPv6 address for geolocation, ISP details, AS info, and threat intelligence including proxy/VPN detection and risk scoring.

IPv4 & IPv6 Proxy/VPN Detection Threat Scoring ISP & AS Data

Try it Free

Enter any IP address and get detailed geolocation and threat intelligence.

Try Free
Supports IPv4 and IPv6 addresses
Result

Enter an IP address and click Lookup

API Documentation

Look up any IPv4 or IPv6 address to get detailed geolocation data, ISP information, AS details, and threat intelligence including proxy/VPN detection, hosting detection, and a threat score.

Endpoint

GET https://www.mahmoudalhabash.com/api/v1/ip-geo?ip={ip_address}

Pass an IP address as a query parameter. The API returns geolocation coordinates, country/city/region, ISP details, AS information, and threat intelligence flags. Leave ip empty to look up the requester's own IP.

Query Parameters

ParameterTypeRequiredDescription
ip string required IPv4 or IPv6 address to look up (e.g. 8.8.8.8 or 2001:4860:4860::8888)

Response Fields

ip The IP address that was looked up
country Full country name (e.g. United States)
country_code ISO 3166-1 alpha-2 code (e.g. US)
region State or region name
city City name
zip Postal / ZIP code
lat Latitude coordinate
lon Longitude coordinate
timezone IANA timezone (e.g. America/Chicago)
isp Internet Service Provider name
org Organization name
as_name Autonomous System name and number
is_proxy Boolean — whether IP is a known proxy or VPN
is_hosting Boolean — whether IP belongs to a hosting/datacenter provider
is_mobile Boolean — whether IP is a mobile carrier
threat_score Threat score from 0 (clean) to 100 (high risk)
threats Array of detected threat types (e.g. ["proxy", "hosting"])

Code Examples

cURL
curl "https://www.mahmoudalhabash.com/api/v1/ip-geo?ip=8.8.8.8"
Response 200 JSON
{ "ip": "8.8.8.8", "country": "United States", "country_code": "US", "region": "California", "city": "Mountain View", "zip": "94035", "lat": 37.386, "lon": -122.0838, "timezone": "America/Los_Angeles", "isp": "Google LLC", "org": "Google Public DNS", "as_name": "AS15169 Google LLC", "is_proxy": false, "is_hosting": true, "is_mobile": false, "threat_score": 0, "threats": [] }
JavaScript (fetch)
const ip = '8.8.8.8'; const res = await fetch( `https://www.mahmoudalhabash.com/api/v1/ip-geo?ip=${ip}` ); const geo = await res.json(); console.log(`${geo.city}, ${geo.country}`); console.log(`Coords: ${geo.lat}, ${geo.lon}`); console.log(`ISP: ${geo.isp}`); if (geo.is_proxy) { console.warn('VPN/Proxy detected!'); } if (geo.threat_score > 50) { console.warn(`High threat: ${geo.threat_score}/100`); }
Python (requests)
import requests resp = requests.get( 'https://www.mahmoudalhabash.com/api/v1/ip-geo', params={'ip': '8.8.8.8'} ) geo = resp.json() print(f"{geo['city']}, {geo['country']}") print(f"ISP: {geo['isp']}") print(f"Proxy: {geo['is_proxy']}") print(f"Threat: {geo['threat_score']}/100") if geo['threats']: print(f"Threats: {', '.join(geo['threats'])}")
PHP (Laravel)
$response = Http::get( 'https://www.mahmoudalhabash.com/api/v1/ip-geo', ['ip' => $request->ip()] ); $geo = $response->json(); // Block suspicious traffic if ($geo['threat_score'] > 70 || $geo['is_proxy']) { abort(403, 'Suspicious traffic detected'); } // Log visitor location Log::info("Visitor from {$geo['city']}, {$geo['country']}");

Error Codes

422 Validation failed — IP address is required and must be a valid IPv4 or IPv6 address
400 Bad request — private/reserved IP addresses are not supported
429 Rate limit exceeded — too many requests
500 Upstream geolocation service unavailable or timeout

Rate Limits

Unlimited — Free during beta

No API key required. Geolocation data is sourced from ip-api.com and refreshed in real-time. Results may be cached server-side for performance.