GeoIP Lookup
Query geographic information for an explicit IP address through DNS or HTTPS.
Explicit Lookup Target
Every GeoIP query includes the IP address to look up. ResolveDB never substitutes the DNS or HTTP source address as the lookup target.
This makes the lookup independent of whether the client uses a recursive resolver, VPN, proxy, or direct DoH connection. A direct DoH connection still reveals its source IP to the HTTPS service in the ordinary way; the privacy property is that this source address is not used as the requested GeoIP value.
DNS Query
Use the geoip operation and an ip- label with IPv4 dots replaced by hyphens:
dig TXT geoip.ip-8-8-8-8.public.v1.resolvedb.net +shortv=rdb1;s=ok;t=data;e=plain;ip=8.8.8.8;cc=US;cn=United States;rg=California;ct=Mountain View;lat=37.386;lon=-122.084;tz=America/Los_Angeles;isp=Google LLCHTTPS Queries
Use the JSON DNS endpoint:
curl --get https://doh.resolvedb.io/resolve \
--data-urlencode "name=geoip.ip-8-8-8-8.public.v1.resolvedb.net" \
--data-urlencode "type=TXT"Or use the dedicated HTTP endpoint:
curl "https://doh.resolvedb.io/geoip?ip=8.8.8.8"The dedicated endpoint returns ordinary JSON rather than the compact DNS field names:
{
"ip": "8.8.8.8",
"country": "United States",
"country_code": "US",
"region": "California",
"city": "Mountain View",
"latitude": 37.386,
"longitude": -122.084,
"timezone": "America/Los_Angeles",
"isp": "Google LLC"
}DNS Fields
| Field | Meaning |
|---|---|
ip | Explicit IP address that was looked up |
cc | ISO 3166-1 country code |
cn | Country name |
rg | Region or state |
ct | City |
lat | Latitude |
lon | Longitude |
tz | Time zone |
isp | Network or ISP name |
Provider coverage varies. Optional location fields may be absent when the
provider cannot determine them. A valid response with no eligible location data
is empty NOERROR (NODATA); provider failure is SERVFAIL. Invalid or missing
explicit targets are FORMERR; forbidden credentials are REFUSED.
The repository now uses shared answering for GeoIP, weather, forecast, and sun
across native DNS and DoH. Requested DNSSEC is supported, and signing failure
returns SERVFAIL. GeoIP has DNS TTL 300; wire DoH uses the effective answer TTL,
while empty/error responses and JSON DNS use HTTP no-store. This implementation
status does not imply a production deployment.
Private Addresses
Private, loopback, link-local, and unique-local addresses are identified without calling an external provider. They return a private-network response with a DNS TTL of 300 seconds.
dig TXT geoip.ip-192-168-1-100.public.v1.resolvedb.net +shortv=rdb1;s=ok;t=data;e=plain;ip=192.168.1.100;cc=--;cn=Private Network;isp=PrivateRelated Location Queries
Weather, forecast, and sun services accept explicit cities, coordinates, IP addresses, and what3words labels:
dig TXT get.london.weather.public.v1.resolvedb.net +short
dig TXT get.51d5074_-0d1278.weather.public.v1.resolvedb.net +short
dig TXT get.ip-8-8-8-8.weather.public.v1.resolvedb.net +short
dig TXT get.w3w-filled-count-soap.weather.public.v1.resolvedb.net +short
dig TXT get.london.sun.public.v1.resolvedb.net +short
dig TXT get.london.forecast.public.v1.resolvedb.net +shortCity, IP, and what3words resolution may call external providers. The same qname therefore identifies the same requested location, but upstream data can change.
Weather returns current fields (tc, tf, cnd, wnd, optional hum) plus
available d1–d3 summaries with TTL 300. Forecast uses TTL 1800 and returns
provider daily values d0–d3 as low/high/condition/precipitation-percent, with
no current-temperature fields. Days are UTC; d0 is today's real provider forecast.
Both include ordinary v=rdb1;s=ok;t=data metadata and the existing flat fields.
Missing daily samples are omitted; unknown precipitation leaves an empty final
component. Forecast remains available without current measurements. Cached daily
offsets advance at UTC midnight and answers containing daily fields cannot cache
past that boundary.
Case-stable b32-/hex- inputs are also supported: GeoIP accepts an encoded
textual IP address, while weather/forecast/sun additionally accept coordinate
JSON. See Parameter Encoding. Direct
coordinate, ip-, and w3w- forms remain available.
Fleet Topology
ResolveDB has three unicast authoritative nameservers in NYC, SFO, and AMS. Recursive resolvers choose among the delegated nameservers; this is not an Anycast or guaranteed nearest-node routing system.
Guidance
- Always provide the IP or location explicitly.
- Use DoH or DoT when query confidentiality matters.
- Handle missing optional fields and provider failures.
- Treat the public RR TTL as a cache-lifetime directive, not a guarantee of source freshness.