https://ip.nored.su/api
/api
Returns geolocation and ASN info for the requester's IP address.
No parameters required.
/api?ip={address}
Returns geolocation and ASN info for a specific IPv4 or IPv6 address.
| Parameter | Type | Description |
|---|---|---|
ip |
string | IPv4 or IPv6 address to look up |
| Field | Type | Description |
|---|---|---|
status |
string | success, error, or not_found |
ip |
string | The queried IP address |
data.country |
string | ISO 3166-1 country code (e.g. US) |
data.country_name |
string | Full country name |
data.region |
string | State or region name |
data.city |
string | City name |
data.latitude |
float | Latitude coordinate |
data.longitude |
float | Longitude coordinate |
data.zip_code |
string | Postal / ZIP code |
data.timezone |
string | UTC offset (e.g. -07:00) |
data.asn |
string | Autonomous System Number |
data.as |
string | AS name / organization |
* Not all fields are returned for every IP. Only available data is included.
# Look up your own IP
curl https://ip.nored.su/api
# Look up a specific IP
curl https://ip.nored.su/api?ip=8.8.8.8
fetch('https://ip.nored.su/api?ip=8.8.8.8')
.then(res => res.json())
.then(data => {
console.log(data.data.country); // "US"
console.log(data.data.city); // "Mountain View"
});
$response = file_get_contents('https://ip.nored.su/api?ip=1.1.1.1');
$data = json_decode($response, true);
echo $data['data']['country_name']; // "Australia"
import requests
r = requests.get('https://ip.nored.su/api?ip=8.8.8.8')
data = r.json()
print(data['data']['city']) # "Mountain View"
{
"status": "success",
"ip": "8.8.8.8",
"data": {
"country": "US",
"country_name": "United States of America",
"region": "California",
"city": "Mountain View",
"latitude": 37.38605,
"longitude": -122.08385,
"zip_code": "94043",
"timezone": "-07:00",
"asn": "15169",
"as": "GOOGLE"
}
}
{
"status": "error",
"message": "Invalid or missing IP address",
"ip": "not-an-ip"
}
{
"status": "not_found",
"ip": "0.0.0.0",
"message": "No data found for this IP"
}
| Code | Meaning |
|---|---|
200 |
Success — data returned |
400 |
Bad request — invalid or missing IP |
404 |
Not found — no data for the given IP |
500 |
Server error — database lookup failed |
Content-Type: application/jsonX-Forwarded-For to detect the real client IP