How GeoIP databases actually work (and why city-level is fuzzy)
Where geolocation data comes from, what accuracy_radius really means, why free and commercial databases disagree, and how often they update.
Three sources of location data
IP geolocation is assembled from:
- Registry data — RIR records say which country a block was allocated to.
- Network topology — where a prefix is announced and how routes are shaped.
- Ground truth — surveys, mobile app telemetry, probes, and crowdsourced corrections.
Different vendors weight these differently. That is why two databases can disagree by hundreds of kilometres on the same address.
What accuracy_radius means
MaxMind publishes an accuracy_radius per record: a rough radius (km) around the estimated point. A 5 km radius suggests a city-level estimate; 500 km means the record is essentially country-level with a city guessed from the largest population centre.
This is the single most useful field for honest display: "Berlin, ±50 km" is more truthful than "Berlin" alone.
Why free and paid disagree
- Commercial feeds buy ISP-level agreements and probe networks that free data cannot afford.
- Free data is usually derived from the same registries, so it agrees on country and disagrees on city.
- Anycast and CDN infrastructure breaks location assumptions entirely (see our anycast article).
Update cadence
Registry data changes daily; city-level estimates change slowly. MaxMind ships GeoLite2 updates weekly and commercial databases more often. If a record is older than two weeks, treat city-level fields as stale.
How to judge a location claim
Ask three questions:
- Does the vendor publish an accuracy radius?
- Does the database type match the use case (country vs city)?
- Is the source free or commercially maintained — and does the vendor say which?
A city name without a radius is a guess presented as a fact.