FREE TIER — 200 CREDITS

IP Geolocation API

Look up the geographic location of any IP address. Get country, city, timezone, ISP, and coordinates in milliseconds. No signup form — get your API key with a single request.

Live API Demo

Results from real API calls

No API key needed for demo. Production use requires a free key.

// Click "Look Up IP" to see results

What You Get

Full Location Data

Country, country code, region, city, latitude, longitude, and postal code for any IPv4 or IPv6 address.

Network Information

ISP name, organization, AS number, and connection type. Identify VPNs, proxies, and hosting providers.

Timezone & Currency

IANA timezone identifier, UTC offset, and local currency code. Perfect for localization.

Batch Lookups

Look up 100 IPs in a single request. Ideal for log analysis, fraud detection, and bulk processing.

Distance Calculation

Calculate the distance between two IPs or coordinates. Returns distance in km and miles.

Auto-Detect

Call the endpoint without an IP to automatically detect and geolocate the caller's IP address.

API Endpoints

MethodEndpointDescription
GET/api/geo/{ip}Geolocate a single IP address
GET/api/geo/meGeolocate the caller's IP
GET/api/geo/batch?ips=1.1.1.1,8.8.8.8Batch lookup (up to 100 IPs)
GET/api/geo/timezone/{ip}Get timezone info for an IP
GET/api/geo/distance?from=...&to=...Distance between two IPs

Code Examples

# Look up an IP address
curl "https://agent-gateway-kappa.vercel.app/api/geo/8.8.8.8" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Auto-detect your own IP
curl "https://agent-gateway-kappa.vercel.app/api/geo/me" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Batch lookup
curl "https://agent-gateway-kappa.vercel.app/api/geo/batch?ips=1.1.1.1,8.8.8.8,208.67.222.222" \
  -H "Authorization: Bearer YOUR_API_KEY"
const API_KEY = 'YOUR_API_KEY';
const BASE = 'https://agent-gateway-kappa.vercel.app';

// Look up any IP
const res = await fetch(`${BASE}/api/geo/8.8.8.8`, {
  headers: { 'Authorization': `Bearer ${API_KEY}` }
});
const data = await res.json();

console.log(data.city);      // "Mountain View"
console.log(data.country);   // "United States"
console.log(data.timezone);  // "America/Los_Angeles"
import requests

API_KEY = "YOUR_API_KEY"
BASE = "https://agent-gateway-kappa.vercel.app"

# Look up any IP
r = requests.get(
    f"{BASE}/api/geo/8.8.8.8",
    headers={"Authorization": f"Bearer {API_KEY}"}
)
data = r.json()

print(data["city"])      # Mountain View
print(data["country"])   # United States
print(data["timezone"])  # America/Los_Angeles

Use Cases

Content Localization

Detect visitor location to show local currency, language, shipping options, or region-specific content automatically.

Fraud Detection

Compare user-claimed location with IP geolocation. Flag mismatches for payment processing and account security.

Analytics & Insights

Map where your users come from. Build geographic heatmaps and understand traffic patterns by region.

Compliance (GDPR/CCPA)

Identify user jurisdiction to apply correct privacy regulations and display appropriate consent notices.

Frequently Asked Questions

Is the IP Geolocation API free?
Yes. You get 200 free credits on signup (no credit card needed). Each geolocation lookup costs 1 credit. Paid plans start at $1 for 500 additional credits via USDC or XMR.
Do I need an API key?
Yes, but getting one takes 5 seconds. Send a POST request to /api/keys/create and you'll receive your API key instantly. No email, no signup form, no credit card.
What data does each lookup return?
Each lookup returns: IP address, country, country code (ISO 3166), region, city, latitude, longitude, timezone (IANA), ISP, organization, and AS number.
Can I look up multiple IPs at once?
Yes. The batch endpoint (/api/geo/batch) accepts up to 100 IP addresses in a single request, returning geolocation data for all of them. Each IP in the batch costs 1 credit.
How accurate is the geolocation data?
Country-level accuracy is 99%+. City-level accuracy is approximately 80-90%, depending on the IP range and ISP. Data is sourced from multiple geolocation databases and updated regularly.
What is the rate limit?
120 requests per minute per API key. For higher limits, contact us or use multiple keys. The batch endpoint is the most efficient way to process large volumes.

Get Your Free API Key

200 free credits. No signup form. No credit card. Start geolocating IPs in seconds.

Get Started Free