6 ms·
Show HN: Free and easy geoip API thanks to Cloudflare and Heroku
- paulrosenzweig 10y agoWill Cloudflare cache the same response for different countries?
- jasonlingx 10y agoIt shouldn't.
- rgbrgb 10y agoWhat's the response? Just country name? I've been using this recently to suggest locations when users set up a feed: https://freegeoip.net/ https://freegeoip.net/ It uses MaxMind data.
- gruez 10y agoCountry name only
- Eun 10y agoI did something similar: https://ifcfg.me https://ifcfg.me Also via json: https://ifcfg.me/json https://ifcfg.me/json
- ionwake 10y agoWhat is the rate limit for use on your service? I have a demo I keep trying to get onto HN but it falls over when it hits the front page.
- packetized 10y agoHuge fan. Use this nearly daily in my terminal opening screen; nice and quick to tell you where are, net-wise.
- nodesocket 10y agoHow did you get LAN-Addresses and Internet Service Provider? Is this on GitHub by chance?
- stephenr 10y agoFor most people's uses, the AS Number & info for an IP is sufficient. I suspect perhaps s/he's using an older/outdated GeoIP database/service as the AS Number returned for my IP is wrong. The LAN address lookup (which doesn't work on Safari) is utilising a security hole in WebRTC.
- sudhirj 10y agoBuilt this based on Google App Engine geolocation headers. http://www.runway7.net/blip http://www.runway7.net/blip
- ionwake 10y agoAre coords returned ? Is it possible to get them?
- vivekv 10y agoI run http://ipof.in http://ipof.in which provides data in various formats
- benjmn 10y agoRely on this for my client's websites : https://ipapi.co https://ipapi.co Bigger free tier + https
- nodesocket 10y agoYour GeoIP response is bundled into a single array? That seems incredibly hard to parse and groc. "geoip": [ 0, 37.7957, -122.4209, "California", "San Francisco", "United States" ],
- NetStrikeForce 10y agoSome services will geolocate you by looking at your DNS server's geolocation, so when you try to resolve their endpoint www.example.com you'll get back an IP address pointing to the closest datacenter. How do you know how is your DNS server geolocated? I made a tiny proof of concept of a DNS reflector with a little extra: $ dig +short whoami.fluffcomputing.com txt Or in Windows: nslookup -type=txt whoami.fluffcomputing.com Or in PowerShell: (Resolve-DnsName -Type txt -Name whoami.fluffcomputing.com).strings The DB used is MaxMind's GeoLite2; so the system is as (in)accurate as the DB might be. If you just request an A record you'll get just your DNS server IP address as other services do (e.g. whois.akamai.net).
- contingencies 10y agoTo me, the whole idea of this API is an anti-pattern: embedding Javascript in a website to make an entirely new GeoIP lookup from a third party host is wasteful and unreliable. If you want GeoIP details in served JS, the details should be served from an existing host on the initial page load where you can centrally manage availability/maintenance/etc. If you are doing nodeJS or something server side, then it would be quicker to call out to established command line tools and cut out an entire internet round trip.
- jasonlingx 10y agoCould you elaborate what you mean by "If you want GeoIP details in served JS, the details should be served from an existing host on the initial page load where you can centrally manage availability/maintenance/etc."?
- stephenr 10y agoI know "negative" comments are discouraged for Show HN, but seriously who is using this type of thing? I'm really not sure I understand the point of things like this, besides "make every possible library/unix tool a service". What's next, "sprintf as a service"? Maybe just "println as a service". You make a request, and it returns the same string with "\n" appended. The MaxMind GeoLite database will give you quite a lot more information than this does, with a single call to the library, and can be delivered as part of your main page response if necessary. The MaxMind GeoLite database also isn't reliant on CloudFlare to work.
- jasonlingx 10y agoThis is for static websites.
- priitmaxx 10y agoDoes anyone know if AWS supports this?
- stephenr 10y agoIp to rough location (to city level usually) can be done via the maxmind geolite database. Api support exists for most languages, and calls are almost instantaneous. So any computing resource where you can install the maxmind database and library "supports" GeoIP lookups.