Free IP Lookup Online
Look up the country, region, city, coordinates, ASN and ISP of any IPv4 or IPv6 address – or your own IP – in one fast JSON call.
Result
Press “Run” to see the result.
The IP Geolocation API returns location and network data for an IPv4 or IPv6 address: country code and name, flag emoji, EU membership, international calling code, continent, region, city, latitude/longitude, autonomous system number (ASN) and organisation (ISP or hosting company). Call /v1/ip/8.8.8.8 or /v1/ip?ip=8.8.8.8.
Without an IP the API describes the caller’s own address using Cloudflare’s edge data, which adds postal code and timezone – perfect for a “what is my IP” feature or to pre-fill a country selector. Private, loopback, link-local and other reserved addresses are recognised and returned with reserved: true and the range name instead of a location.
Arbitrary IPs are looked up in the DB-IP Lite database (IP geolocation by DB-IP, licensed CC BY 4.0), city-level precision, refreshed monthly; results are cached for 24 hours. As with every IP database, city-level results are approximate, while country and ASN are highly accurate.
Use this in your code
curl "https://apibox.io.vn/v1/ip/8.8.8.8" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch('https://apibox.io.vn/v1/ip/8.8.8.8', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
},
});
const data = await res.json();
console.log(data);import requests
res = requests.get(
"https://apibox.io.vn/v1/ip/8.8.8.8",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/ip/8.8.8.8');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));API documentation → Get a free API key
FAQ
How do I get my own public IP address?
Call /v1/ip with no ip parameter. The response contains the IP the request came from plus its country, city, timezone and ASN as seen by Cloudflare.
How accurate is IP geolocation?
Country is correct for the vast majority of addresses and ASN/organisation comes from routing data. City and coordinates are approximate (often the ISP’s hub), and VPNs or mobile carriers can place users far from their real location.
Does it support IPv6?
Yes, both IPv4 and IPv6 are supported, including IPv4-mapped IPv6 addresses such as ::ffff:8.8.8.8.