IP Geolocation API

Look up geographic location and network information for any IPv4 or IPv6 address.

Endpoint

MethodPathDescription
GET/api/v1/geo/{ip}Look up an IP address

Try It

Example Request

bash
curl -H "X-API-Key: wxa_yourkey" https://wxaintel.wxapros.com/api/v1/geo/8.8.8.8

Example Response

json
{
  "ip": "8.8.8.8",
  "country_code": "US",
  "region": "California",
  "city": "Mountain View",
  "latitude": 37.422,
  "longitude": -122.085,
  "timezone": "America/Los_Angeles",
  "asn": 15169,
  "as_org": "GOOGLE",
  "confidence": 0.4
}

Response Codes

StatusDescription
200Success
401Missing or invalid API key
403Key doesn't have required scope
429Rate limit exceeded
502Backend service unavailable

Code Examples

python
import requests

response = requests.get(
    "https://wxaintel.wxapros.com/api/v1/geo/8.8.8.8",
    headers={"X-API-Key": "wxa_yourkey"}
)
data = response.json()
print(f"{data['city']}, {data['country_code']}")
javascript
const response = await fetch(
  "https://wxaintel.wxapros.com/api/v1/geo/8.8.8.8",
  { headers: { "X-API-Key": "wxa_yourkey" } }
);
const data = await response.json();
console.log(`${data.city}, ${data.country_code}`);