IP Geolocation API
Look up geographic location, ISP, timezone, and organization for any public IP address. Supports single and bulk lookups.
GET
/api/ipgeo/lookup
2 sats
Geolocate a single IP address.
| Parameter | Type | Description |
|---|---|---|
ip | string | IPv4 or IPv6 address to look up |
curl "https://agent-commerce.store/api/ipgeo/lookup?ip=8.8.8.8"
POST
/api/ipgeo/bulk
5 sats
Geolocate multiple IP addresses in a single request (max 100).
| Parameter | Type | Description |
|---|---|---|
body | string[] | JSON array of IP addresses |
curl -X POST "https://agent-commerce.store/api/ipgeo/bulk" \ -H "Content-Type: application/json" \ -d '["8.8.8.8", "1.1.1.1", "208.67.222.222"]'
Usage tips: Only public IP addresses are accepted — private/reserved ranges (10.x, 192.168.x, 127.x, etc.) are rejected for security. Use the bulk endpoint to look up multiple IPs efficiently in a single request. Results include country, region, city, coordinates, timezone, ISP, and organization.
Value-Add
- SSRF protection — rejects private, loopback, and link-local IPs
- Bulk lookup (up to 100 IPs) in a single request
- Structured JSON with country, city, ISP, timezone, and coordinates
- Input validation prevents wasted upstream calls
- Supports both IPv4 and IPv6 addresses
Upstream Source
ip-api.com geolocation service (free tier, 45 requests/minute).