Reference
Everything on the page is one request away.
Every datum shown by the lookup is also available as plain text or JSON. No keys, no sign-up; just curl.
01
Quick start
Ask for your address and its location. Plain-text routes are meant for shell scripts, the JSON routes for everything else.
curl https://ipreveal.me/api/ip
curl https://ipreveal.me/api/json/all
curl https://ipreveal.me/api/json/lookup/8.8.8.8Add -6 or -4 to curl to force an address family and see the other address you have.
02
Endpoints
All endpoints are GET. The first group describes the caller, so the answer depends on who asks; the lookup routes describe any public address.
Plain text
| Path | Returns | Copy curl examplecurl |
|---|---|---|
| GET /api/ip | Your IP address | |
| GET /api/geo | "City, Country" for your IP | |
| GET /api/ua | Your User-Agent | |
| GET /api/asn | "AS15169 Google LLC" | |
| GET /api/lookup/{ip} | One line for any public IP: address | place | ASN |
JSON
| Path | Returns | Copy curl examplecurl |
|---|---|---|
| GET /api/json/ip | { ip, version } | |
| GET /api/json/geo | Geolocation object (see below) | |
| GET /api/json/ua | { user_agent } | |
| GET /api/json/asn | { ip, version, asn, as_organization } | |
| GET /api/json/all | Everything about your request | |
| GET /api/json/lookup/{ip} | { ip, version, geo, asn } for any public IP |
03
Response shapes
Fields that have no value are omitted rather than sent empty. Coordinates are approximate, city-level estimates; accuracy_radius_km is the database vendor’s own radius when it provides one.
GET /api/json/geo
{
"ip": "8.8.8.8",
"city": "Mountain View",
"country": "United States",
"country_code": "US",
"region": "California",
"region_code": "CA",
"postal_code": "94035",
"latitude": 37.386,
"longitude": -122.084,
"timezone": "America/Los_Angeles",
"asn": 15169,
"as_organization": "GOOGLE",
"is_eu": false,
"accuracy_radius_km": 1000
}GET /api/json/lookup/8.8.8.8
{
"ip": "8.8.8.8",
"version": 4,
"geo": { "ip": "8.8.8.8", "city": "Mountain View", "country_code": "US", "…": "…" },
"asn": { "asn": 15169, "as_organization": "GOOGLE" }
}GET /api/json/all
Reports only an allowlist of request headers (User-Agent, Accept, Accept-Language, Accept-Encoding) as the API received them, behind the proxy layer.
{
"ip": "203.0.113.7",
"user_agent": "curl/8.7.1",
"geo": { "ip": "203.0.113.7", "…": "…" },
"request_headers": { "Accept": "*/*", "User-Agent": "curl/8.7.1" },
"meta": {
"request_id": "…",
"timestamp": "2026-12-01T10:24:37.123456789Z",
"cached": false,
"version": "…"
}
}Values above are illustrative; real answers depend on the current GeoLite2 release.
04
Status codes
Errors on JSON routes are JSON; plain-text routes use the same status codes.
| Code | Meaning | Body |
|---|---|---|
| 200 | OK | Plain text or JSON as listed above. |
| 400 | Not an IP address (lookup routes) | {"error":"invalid ip"} |
| 422 | Private, loopback, link-local, multicast, unspecified or CGNAT (100.64.0.0/10) address | {"error":"reserved address"} |
| 429 | Rate limit exceeded. Wait for Retry-After seconds. | {"error":"rate_limit_exceeded","message":"Too many requests","retry_after":12,"limit":100,"window":"1m0s"} |
| 500 | Database lookup failed | {"error":"geoip_lookup_failed","message":"Failed to lookup geolocation","request_id":"…"} |
| 503 | ASN database not loaded, or the rate limiter is down and configured to fail closed | {"error":"asn database unavailable"} or {"error":"service_unavailable",…} |
05
Rate limits
Requests are limited per client IP with a sliding window kept in Redis. The default is 100 requests per 60 seconds; it is a deployment setting, so read the headers instead of hard-coding it. Every response carries:
X-RateLimit-Limit: requests allowed per windowX-RateLimit-Remaining: requests left in the current windowX-RateLimit-Reset: Unix time (seconds) when the window resetsRetry-After: seconds to wait, on 429 responses only
HTTP/2 429
retry-after: 12
x-ratelimit-limit: 100
x-ratelimit-remaining: 0
x-ratelimit-reset: 1796120712
content-type: application/jsonObserve the limit and back off when you see a 429; hammering a limited endpoint just extends your wait.
06
Caching
Lookup responses depend only on the address in the path, so they are sent with Cache-Control: public, max-age=3600 and cached by the Varnish layer in front of the API. Endpoints that describe the caller are never cached. A cache hit is answered by Varnish without reaching the API at all.