📍

IP Geolocation Lookup

Resolve an IP address to its geographic location with city-level accuracy

GET 3 credits /v1/geo/ip-lookup
curl "https://geo.toolkitapi.io/v1/geo/ip-lookup?ip=8.8.8.8"
import httpx

resp = httpx.get(
    "https://geo.toolkitapi.io/v1/geo/ip-lookup?ip=8.8.8.8",
)
print(resp.json())
const resp = await fetch("https://geo.toolkitapi.io/v1/geo/ip-lookup?ip=8.8.8.8", {
});
const data = await resp.json();
console.log(data);
# See curl example
Response 200 OK
{
  "ip": "8.8.8.8",
  "country": "United States",
  "country_code": "US",
  "city": "Mountain View",
  "region": "California",
  "region_code": "CA",
  "postal_code": "94035",
  "latitude": 37.386,
  "longitude": -122.0838,
  "timezone": "America/Los_Angeles",
  "continent": "North America",
  "continent_code": "NA",
  "asn": 15169,
  "asn_name": "GOOGLE"
}

Try It Live

Live Demo

Description

Resolve an IP address to its geographic location with city-level accuracy

How to Use

1

1. Pass the IP address you want to look up in the `ip` query parameter.

2

2. Send a GET request — no additional configuration is needed.

3

3. Inspect the response for `country`, `city`, `latitude`, and `longitude` to determine the approximate location.

4

4. Use the `timezone` field to localise timestamps or the `asn_name` to identify the hosting provider.

About This Tool

Use IP Geolocation Lookup to resolve any public IPv4 or IPv6 address into a physical location. The response includes city, region, country, coordinates, timezone, and ASN information powered by MaxMind GeoIP databases.

This is useful for content localisation, fraud detection, analytics enrichment, and compliance workflows where you need to know the approximate origin of a request.

The endpoint rejects private, loopback, and reserved IP ranges since they cannot be geolocated.

Why Use This Tool

Frequently Asked Questions

How accurate is the geolocation data?
City-level accuracy is typically within 25–50 km for most IP addresses. Country-level accuracy exceeds 99%. Results depend on MaxMind GeoIP database coverage, which is updated regularly.
Can I look up private or local IP addresses?
No. Private (10.x, 192.168.x), loopback (127.x), and reserved IP ranges are rejected with a 400 error because they have no geographic meaning.
Does this endpoint support IPv6?
Yes. Both IPv4 and IPv6 public addresses are supported.

Start using IP Geolocation Lookup now

Get your free API key and make your first request in under a minute.