Hi everyone! I'm on the hunt for a free or low-cost API or a downloadable database that provides geolocation data for countries, states/provinces/regions, and cities/towns. I'm not interested in detailed address lookups or location tracking, but I do want to create an interface where users can input their country, region, and city. It would also be great if I could calculate distances between different locations. Any recommendations? Thanks a lot for your help!
5 Answers
Nominatim is a fantastic option for free and open-source geocoding. You can use their API for light usage, or even host your own instance if needed—it's what OpenStreetMap uses.
You might want to check out OpenStreetMap or GeoNames. They're both great resources for geolocation data.
If you're okay with using an API, the Google Maps API is pretty intuitive. You can enter an entire address and it calculates distances and provides location data without a hitch.
For U.S. data specifically, the Census Bureau has some really solid datasets available in geoJson format. Definitely a resource worth checking out!
MaxMind offers a free downloadable database for geolocation. You can grab it from their site for IP geolocation data!
Related Questions
Cloudflare Origin SSL Certificate Setup Guide
How To Effectively Monetize A Site With Ads