If you haven’t yet hear of Igor Chubin’s wttr.in weather forecast micro service, go and give it a try. What’s even better, it’s got a well documented API and it’s just simple to use.

Examples using curl on the command line:

$ curl -s wttr.in/?format=1
⛅️  +17°C
$ curl -s wttr.in/?format=2
⛅️  🌡️+17°C 🌬️↗6km/h
$ curl -s wttr.in/?format=3
Düsseldorf, Germany: ⛅️  +17°C
$ curl -s wttr.in/?format=4
Düsseldorf, Germany: ⛅️  🌡️+17°C 🌬️↗6km/h

It automatically tries to derive your location using a GeoIP database so you could also add a location:

$ curl -s wttr.in/Deepcar?format=4
Deepcar: ⛅️  🌡️+13°C 🌬️↗24km/h

Due to it’s simplicity it can be easily integrated as Mattermost or Slack slash-commands, or in weeechat as an alias, just like I do:

/exec -norc curl -s wttr.in/?format=3

Extra nifty stuff:

$ curl -s 'wttr.in/{Duesseldorf,Eschborn,Porto}?format=3'
Duesseldorf: ⛅️  +17°C
Eschborn: ⛅️  +21°C
Porto: ☀️   +16°C