IP Geolocation
/api/me
No Auth RequiredThis is the one you came here for. Hit this endpoint and it tells you everything about your IP. Your location, your ISP, whether you’re on a VPN, whether you’re on mobile. All of it. One request. No API key. No signup. No “free tier with 100 requests per month” garbage.
Your browser (or server, or script, or toaster) makes a GET request. The edge function reads the requester’s IP, looks it up, and hands back a fat JSON object. That’s it. That’s the whole thing.
Parameters
This endpoint takes no parameters. It auto-detects the IP of whoever is making the request. You don’t need to tell it who you are. It already knows.
Response Fields
| Field | Type | Description |
|---|---|---|
ip | string | Your public IP address (IPv4 or IPv6) |
country | string | Full country name, e.g. "United States" |
countryCode | string | ISO 3166-1 alpha-2 code, e.g. "US" |
region | string | State or province name |
regionCode | string | Region abbreviation, e.g. "CA" for California |
city | string | City name |
zip | string | Postal or ZIP code |
lat | number | Latitude |
lon | number | Longitude |
timezone | string | IANA timezone, e.g. "America/Los_Angeles" |
isp | string | Internet Service Provider name |
org | string | Organization name (often same as ISP for residential) |
as | string | Autonomous System number and name |
asName | string | AS name only |
rdns | string | Reverse DNS hostname, if available |
mobile | boolean | Whether this looks like a mobile/cellular connection |
proxy | boolean | Whether a proxy or VPN is detected |
hosting | boolean | Whether this IP belongs to a hosting/datacenter provider |
Example Request
curl
curl https://whatismyip.technology/api/me
Python
import requests
response = requests.get("https://whatismyip.technology/api/me")
data = response.json()
print(f"Your IP: {data['ip']}")
print(f"Location: {data['city']}, {data['region']}, {data['country']}")
print(f"VPN detected: {data['proxy']}")
JavaScript
const response = await fetch("https://whatismyip.technology/api/me");
const data = await response.json();
console.log(`Your IP: ${data.ip}`);
console.log(`Location: ${data.city}, ${data.region}, ${data.country}`);
console.log(`VPN detected: ${data.proxy}`);
Example Response
{
"ip": "203.0.113.42",
"country": "United States",
"countryCode": "US",
"region": "California",
"regionCode": "CA",
"city": "San Francisco",
"zip": "94102",
"lat": 37.7749,
"lon": -122.4194,
"timezone": "America/Los_Angeles",
"isp": "Comcast Cable Communications",
"org": "Comcast Cable Communications",
"as": "AS7922 Comcast Cable Communications, LLC",
"asName": "COMCAST-7922",
"rdns": "c-203-0-113-42.hsd1.ca.comcast.net",
"mobile": false,
"proxy": false,
"hosting": false
}
Runtime and Caching
This runs on the Edge runtime, which means it executes at the CDN node closest to the user. Fast. Really fast.
The response uses Cache-Control: no-store. Every request gets a fresh lookup. This matters because your IP can change (switching networks, VPN toggling, carrier NAT rotation). Caching would defeat the whole purpose.
CORS
Wide open. Access-Control-Allow-Origin: * on every response. Call it from any domain, any browser, any origin. No preflight drama for simple GET requests.
This means you can drop a fetch() call into any webpage and it just works. No proxy server needed. No backend relay. Straight from the browser.
Common Use Cases
“What’s my IP?” The classic. Build a simple tool, embed it in a dashboard, stick it in a CLI script. One fetch and you’re done.
Geo-targeting content. Show users content based on their country or city. Redirect EU users to a GDPR page. Show local pricing. Whatever you need.
VPN and proxy detection. The proxy field tells you if the user is behind a VPN, proxy, or Tor exit node. The hosting field tells you if the IP belongs to a cloud provider (which usually means a bot or a server, not a human).
Analytics enrichment. Log the IP, look up the geo data, enrich your analytics. You know the drill.
Notes and Edge Cases
The lat and lon fields are approximate. They point to the general area of the IP, not the user’s front door. For most IPs, accuracy is city-level. For mobile connections, it can be off by quite a bit.
The rdns field will be an empty string if no reverse DNS record exists. Many residential ISPs set one, but not all. Don’t rely on it being present.
The mobile field is a best guess based on the ASN. It’s pretty good for major carriers but not perfect. Same goes for proxy. VPN detection is an arms race, and no lookup service catches everything.
If you’re behind a corporate NAT, you’ll see the corporate exit IP, not your machine’s local IP. That’s how the internet works. The API sees what it sees.
IPv6 addresses work fine. The response format is identical regardless of IP version. The ip field will contain whatever address your request came from.