IP Geolocation API

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.

GEThttps://apibox.io.vn/v1/ip/{ip}
Network & Validation▶ Try it online

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.

Parameters

NameInTypeRequiredDefault
ippathstringnoIPv4 or IPv6 address, in the path (/v1/ip/8.8.8.8) or as ?ip=. Omit it to look up your own IP.

Example

curl "https://apibox.io.vn/v1/ip/8.8.8.8" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "ip": "8.8.8.8",
  "version": 4,
  "country_code": "US",
  "country": "United States",
  "flag": "🇺🇸",
  "is_eu": false,
  "calling_code": "+1",
  "continent": "North America",
  "region": "California",
  "city": "Mountain View",
  "latitude": 37.4223,
  "longitude": -122.085,
  "asn": 15169,
  "organization": "Google LLC",
  "source": "db-ip.com lite",
  "database_version": "2026-11"
}

Use cases

  • Pre-select the country and currency in sign-up and checkout forms
  • Show “what is my IP” and location on a support page
  • Flag logins from unusual countries or hosting providers
  • Enrich server logs and analytics with country and ISP

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.

Related APIs

Start with 1,000 free requests every month. Get free API key →