I like the UI generating the URL to send to the API vs just a PDF of all of the possible key/value pairs to generate manually. A little above&beyond for most APIs I've used personally. Its effort not lost on me.
I've been using the GeoLite2 [0] downloadable database as a fallback for CoreLocation in my macOS app for changing monitor brightness based on the sun position [1].
I respect and appreciate no API key being needed, but how will you prevent excessive usage? I'll just say that it's been a battle on my end to stop people abusing APIs I deploy. It's why we can't have nice things.
The API responded to me over IPv6 so while the consumer market will take time to get over to full IPv6 you can still setup your server today to offer IPv4/6 to your users and connect to this API via IPv6 which will eliminate you getting blocked in a CGNAT blast radius.
For a data point, as a user, I think requiring an API key is fine if the process to create and use a key is simple. Having to use one to prevent abuse is fair enough.
It's a problem if the code runs client-side and so there's no way to hide the key. I've run into this problem making widgets for the old OS X dashboard, and Javascript Pebble apps.
As others pointed out, blocking IP addresses is an option. Blocking access based on the HTTP Origin header is also possible. I hope I can go on for some time without being to restrictive. With a fairly quick API that can scale with cheap VMs it should be feasible to keep it running at low expenses even at higher utilisation.
You weather guys on here might also want to talk to the oikolab dude who posted on HN 9 months ago - I was thinking of incorporating weather data into my trading models so he graciously granted an API key but haven't had time much to use it viably as you kind of have to know what you're doing/how you intend to map trading outcomes and causal first-order effects on the climate grid to actual events that can be traded on. Didn't put it to much use amidst a bunch of competing priorities but the API seems extremely high resolution.
Comments (147) 35 threads
Earlier commentsI hope to improve the UX a bit further with a city-search for example. Unfortunately I am lacking a good geocoding API for that.
What wikidata objects are you referring to?
Continue this thread — 1 reply
https://openweathermap.org/api/geocoding-api
Pretty generous free tier, and paid options seem pretty reasonable.
[1]: https://github.com/Leftium/ultra-weather#specify-a-location
It works well and with zero maintenance if you use their auto-updating Docker image [2].
[0] https://dev.maxmind.com/geoip/geolite2-free-geolocation-data
[1] https://lunar.fyi
[2] https://hub.docker.com/r/maxmindinc/geoipupdate
As others pointed out, blocking IP addresses is an option. Blocking access based on the HTTP Origin header is also possible.
I hope I can go on for some time without being to restrictive. With a fairly quick API that can scale with cheap VMs it should be feasible to keep it running at low expenses even at higher utilisation.
site: oikolab.com
HN user: a_square_peg
[1] https://www.home-assistant.io/integrations/#weather
All comments shown.
Couldn't load more comments. Check your connection and try again.