Live data from Hacker News

Show HN: A New, Clean Geolocation API

ipdata.co

111–120 of 168 posts

Re: Show HN: A New, Clean Geolocation API

#111
post #108

How accurate can you get with an IP address? I seems like it could act as a fallback if the geolocation web api is blocked. I have a side project[0] that uses the geolocation api to post to Slack and seems to be pretty accurate, even on mobile. Maybe I'll try this as a fallback. [0]: https://github.com/styfle/geoslack

Geoslack looks really cool!! Using it as a fallback when location isn't allowed via the browser or if within an app from GPS would be a valid and common usecase!

I'd say you can pretty much trust it up to the country level and greater region, more specific than that the results will not always be highly accurate.

Re: Show HN: A New, Clean Geolocation API

#112

Earlier quoted context omitted.

I think the issue is that with the rise of VPNs, you're now looking at >1% of users being from a mislabelled country.

It's more than that, for some countries.

Usually right because people from these countries are trying to evade location-based discrimination and privacy infringement

Re: Show HN: A New, Clean Geolocation API

#114
post #72

Tangential but I find it funny that such a simple service has libraries for so many different languages. Is one simple HTTP call and JSON deserialization that hard? Personally I'd be more concerned about bringing yet another 3rd party module (leftpad, security, maintenance) than doing GET + JSON.parse but maybe convenience is what's most important.

They only have one official library (python); all the language examples are just showing how to do an HTTP call to the service

Re: Show HN: A New, Clean Geolocation API

#115

> Get the following datapoints from any IP address; Again :-( I just wonder if people will ever stop making assumptions about others given their IP address or hair colours and divide the Internet on these slippery grounds. The only legitimate and valid way to determine the client's location automatically is the browser or the OS geolocation API, and for the language it is the HTTP_ACCEPT_LANGUAGE header. The fact I h…

Of course IP geolocation is terrible for language selection, but that doesn't make passive rough location information useless in general. What if, for example, you want to show someone nearby flights? You could ask them to enter their zip, or you could save them a step and make suggestions based on their geolocation. They could update the location if they wanted information on somewhere else or if you got the location wrong, and that's worse case 1 step, and best case no steps - you improved your UX!

Re: Show HN: A New, Clean Geolocation API

#116
post #108

How accurate can you get with an IP address? I seems like it could act as a fallback if the geolocation web api is blocked. I have a side project[0] that uses the geolocation api to post to Slack and seems to be pretty accurate, even on mobile. Maybe I'll try this as a fallback. [0]: https://github.com/styfle/geoslack

Here's a guide on doing exactly that - falling back to IP geolocation when browser geolocation is blocked (or unavailable): https://ipinfo.io/developers/replacing-getcurrentposition

Re: Show HN: A New, Clean Geolocation API

#119

By the way, it would be nice to also include ISO 3166-2 state code (e.g. US-AL for Alabama, AU-TAS for Tasmania, TZ-26 for Manyara etc).

That sounds like a great idea, I'll consider adding this, is there a specific use case for this format?

Re: Show HN: A New, Clean Geolocation API

#120

> Get the following datapoints from any IP address; Again :-( I just wonder if people will ever stop making assumptions about others given their IP address or hair colours and divide the Internet on these slippery grounds. The only legitimate and valid way to determine the client's location automatically is the browser or the OS geolocation API, and for the language it is the HTTP_ACCEPT_LANGUAGE header. The fact I h…

Of course IP geolocation is terrible for language selection, but that doesn't make passive rough location information useless in general. What if, for example, you want to show someone nearby flights? You could ask them to enter their zip, or you could save them a step and make suggestions based on their geolocation. They could update the location if they wanted information on somewhere else or if you got the locatio…

The problem is when people fail to distinguish "helpful assumptions" from "actual facts"... I have just today gutted some worse-than-useless GeoIP functionality from a form that was facing customers of our organization so it could guess at their country, language, and city without asking.

BI guys put in the feature request some years ago so they could make pretty maps (but ultimately take no actionable steps based on these), and call center were then taking these guesses as facts (think getting a call and having someone chummy ask "Hey, how's the weather in " in the wrong language...). What's worse is we then added some user-facing fields asking for the location information, and it was impossible to tell apart user-supplied info from the IP-derived info!

It took fighting with BA and BI, but we finally decided it was stupid and were able to simply remove it. (BI will have to "fix their maps" by doing their own assumptions, outside of the application)

Post reply on HN