[ learn ]

What is IP geolocation and how is it built?

Updated · 4 min read

Short answer

IP geolocation is the estimate of where an IP address is being used, usually the country, region and city, plus the network that runs it. No location is stored in the address itself: geolocation databases build it by combining registry records, ISP geofeeds, network measurements and corrections, and update it as addresses move.

What it is used for

Sites and apps use IP location to pick a default language, currency or shop, show nearby content, fill in country fields, count visitors by region, enforce licensing regions, and as one signal in fraud checks. It works at the level of networks and cities, not people: see how accurate IP geolocation is.

Where the data comes from

  • Registry records. The five regional registries publish which organisation holds each block and in which country (via WHOIS and RDAP). This is reliable for the country of registration, but a multinational may register everything at its head office.
  • BGP routing data. Which ASN announces each prefix, from public route collectors. It tells you who actually uses a block today.
  • ISP geofeeds. Many networks publish a simple CSV listing each prefix with its country, region and city (RFC 8805), and can link it from their registry records (RFC 9092). This is often the best source for city-level data.
  • Network measurements. Latency (ping times) from servers at known locations limits how far away an address can be; traceroutes and reverse DNS names, which often contain city or airport codes, add hints.
  • Consent-based and partner data. Some providers combine anonymous location reports from apps or services, given with user consent, with the IP they came from.
  • Corrections. ISPs, companies and users report errors, which providers check and apply.

How a database is built

Providers merge these sources prefix by prefix, weigh them by reliability, and resolve conflicts: a geofeed saying Penang beats a registry record saying Kuala Lumpur, and a latency of 2 ms from a Singapore server rules out a claim of Frankfurt. The result is a table of IP ranges, each with a location, an accuracy estimate and network details. Because addresses are reassigned and traded, it is rebuilt continuously, often weekly or daily.

dklyIPdatabase does not build its own measurements. It combines data from established geolocation and threat providers, caches the results, and serves them through one free API. It does not track visitors to derive locations.

The fields our API returns

GroupFields
locationcontinent, country (code, name, capital, flag, calling code…), region, city, postal, latitude, longitude
time_zoneid such as Asia/Kuala_Lumpur, abbreviation, offset, in_daylight_saving, current_time
currencycode, name, symbol and formatting
connectionasn, organization, domain, route, type
carrier, companyMobile operator and the organisation using the address, when known
securityis_vpn, is_proxy, is_tor, is_cloud_provider, is_threat and more

Any field can be null when unknown. Coordinates are the centre of an area, not a precise point. The full list and a sample response are in the documentation; for a quick look without a key, open /json for your own address.

Built-in limits

Geolocation reflects where the network hands traffic to the internet. Mobile users behind CGNAT, satellite users, company VPN users and anyone on a VPN or proxy will appear somewhere else, sometimes in another country. That is why the security fields matter: an is_vpn flag explains a surprising location.

Try it

See your own result on What is my IP?, or look up any address with the IP lookup, such as 8.8.8.8. Prefix pages such as 8.8.8.0/24 show where the addresses in a block have been seen. From code:

curl -H "X-API-Key: YOUR_KEY" "https://ipinfo.dkly.net/api/?ip=8.8.8.8"

[ FAQ ]

Frequently asked questions

Does an IP address contain its location?

No. An IP address is just a number. The location comes from databases that map address ranges to places, built from registry records, ISP data and network measurements.

What is a geofeed?

A geofeed is a simple file an ISP or network publishes, listing each of its IP prefixes with the country, region and city where it is used. The format is defined in RFC 8805, and geolocation providers read it to improve accuracy.

How often does IP geolocation data change?

Continuously. Address blocks are reassigned, traded and moved between cities, so providers update their data often, weekly or even daily. Changes can still take weeks to reach every database.

Can IP geolocation find a person?

No. It shows roughly where a network operates, usually to country or city level. Identifying the customer behind an address requires the ISP's records, which are released only under legal process.

Last updated · All articles · API docs