from Hacker News

Ask HN: Where to download IP Geolocation CSV/txt file

by _Understated_ on 10/14/21, 6:16 PM with 3 comments

As the title says, I'm trying to do some analysis on web data and I need a list of IP ranges and their corresponding geo locations. Doesn't matter if they are integers, CIDR notation, ranges or whatever.

I've looked for ages and all I can find are API's, not downloads.

I only need something as close as mapping an IP to a country and region/state, I don't need anything that maps to Postal Codes or streets or anything that granular. So as an example an IP would show that a user came from Texas, USA or UK, England or UK, Scotland, not the street where they live or anything. I'd even take mapping IP's to cities if that's all I can get but no closer than that, however, I can always remove any data that is closer to the ground if needed.

This is a hobby project, so I can't afford much if I have to pay, which I'm happy to do.

Any ideas where I can get such a thing?

  • by mac3n on 10/14/21, 7:39 PM

    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).

  • by detaro on 10/14/21, 6:23 PM