The reason there are APIs is that this is constantly changing.
Be aware that you get what you pay for. Even MaxMind offers a paid tier.
It also depends on your needs - are you geolocating servers, users, or infrastructure? Most suppliers focus on users.
Some just scrape registry data, which would put all of Level4 (infrastructure) in British Columbia. Mobile users are another world, there you have to go through the telecoms (geolocating the NAT is little help).
It also matters where your interest lies. Providers are better in some countries than others.
Back when I cared about this, I used a measurement network to measure round-trip-times, and found most providers to have >10% error (violating speed-of-light).
The reason there are APIs is that this is constantly changing.
Be aware that you get what you pay for. Even MaxMind offers a paid tier.
It also depends on your needs - are you geolocating servers, users, or infrastructure? Most suppliers focus on users. Some just scrape registry data, which would put all of Level4 (infrastructure) in British Columbia. Mobile users are another world, there you have to go through the telecoms (geolocating the NAT is little help).
It also matters where your interest lies. Providers are better in some countries than others.
Back when I cared about this, I used a measurement network to measure round-trip-times, and found most providers to have >10% error (violating speed-of-light).