Free IP Geolocation API
No API key. No signup. No credit card. CORS is open, so you can call it straight from a browser. Returns geolocation, ISP, ASN, and proxy/VPN/Tor detection for any IPv4 or IPv6 address.
Quick Start
Your own address, as JSON:
curl https://whatsmyip.now/api/v1/my-ip
{"ip": "203.0.113.42"}
Full detail for any address:
curl https://whatsmyip.now/api/v1/lookup/8.8.8.8
Endpoints
| Endpoint | Method | Returns | Rate limit |
|---|---|---|---|
/api/v1/my-ip | GET | The caller's public IP address | 60 / min |
/api/v1/lookup/<ip> | GET | Geolocation, ISP, ASN, proxy detection | 30 / min |
/api/v1/lookup | POST | Same, with the address in a JSON body | 30 / min |
/api/v1/health | GET | Service status | unlimited |
Response Fields
| Field | Type | Notes |
|---|---|---|
ip | string | The address queried |
city, region, country | string | Approximate — see accuracy below |
latitude, longitude | number | Centroid of the inferred area, not a precise position |
isp | string | Network operator |
asn | string | Autonomous System announcing the prefix |
timezone | string | IANA timezone identifier |
is_vpn, is_proxy, is_tor, is_hosting | boolean | Best-effort detection, not a guarantee |
Examples
JavaScript
const r = await fetch('https://whatsmyip.now/api/v1/lookup/1.1.1.1');
const data = await r.json();
console.log(data.country, data.isp);
Python
import requests
r = requests.get('https://whatsmyip.now/api/v1/lookup/1.1.1.1', timeout=10)
print(r.json()['country'])
Batch, via POST
curl -X POST https://whatsmyip.now/api/v1/lookup \
-H 'Content-Type: application/json' \
-d '{"ip": "8.8.8.8"}'
Accuracy and Limits
- Country is correct over 99% of the time; city is right roughly 50-80% of the time. Why city-level geolocation is unreliable
- Rate limits are per IP address. If you need more, get in touch rather than rotating addresses.
- No authentication means no usage tracking — we do not log the addresses you look up.
- Proxy and VPN flags are heuristics based on address ownership, not proof.
- Use is subject to the Terms of Service. Attribution is appreciated but not required.
Errors
| Status | Meaning |
|---|---|
400 | Missing or malformed address |
429 | Rate limit exceeded — back off and retry |
200 with an error field | The address was valid but could not be resolved |