IP Address Lookup

Get geolocation and network info for any IP address.

All examples use BASE_URL — set it to your deployment URL.
GET/api/ip
Get geolocation info for the server's public IP.
const BASE_URL = "http://localhost:3000"; const res = await fetch(`${BASE_URL}/api/ip`); const data = await res.json(); // → { success: true, query: "203.0.113.1", country: "United States", // regionName: "California", city: "San Jose", timezone: "America/Los_Angeles", // isp: "Example ISP", ... }
GET/api/ip/:ip
Lookup a specific IP address.
const res = await fetch(`${BASE_URL}/api/ip/8.8.8.8`); const data = await res.json(); // → { success: true, query: "8.8.8.8", country: "United States", // city: "Ashburn", isp: "Google LLC", ... }