In the USA, I like the National Weather Service direct APIs. I wish I could get more granular forecast data, both in time and space, but they forecast dewpoint/humidity, which is really nice.
Yes, I am using a handful of different APIs. My full terminal weather setup deserves its own blog post... but until then, here are some zsh snippets, scripts, and curls to get you started.
Rough weather information for next days and hours:
# Find zone with curl https://api.weather.gov/points/40.5878,-103.0694
ZONE=${ZONE:-CAZ508}
echo "Forecast for zone $ZONE"
curl -s -A MyWeather/1.0 https://api.weather.gov/zones/forecast/$ZONE/forecast \
| jq -r '.properties.periods[] | [.name, .detailedForecast] | join("\t")' \
| column -t -s $'\t'
# Find grid with same curl
GRID=${GRID:-MTR/93,131}
echo ""
echo "Next 24 hours for grid $GRID"
curl -s -A MyWeather/1.0 https://api.weather.gov/gridpoints/$GRID/forecast/hourly \
| jq --arg date $(date -Is) -r '.properties.periods[] | select(.startTime >= $date) | [(.startTime), ((.temperature|tostring) + " " + .temperatureUnit), (.windSpeed + " @ " + .windDirection), .shortForecast] | join("\t")' \
| column -t -s $'\t' \
| head -n 24
Weather discussion script (also using regexps to parse HTML):
Here's the script I use to access that API but it is still under active development and is pretty tailored for my situation. Please forgive jankiness. Give it LAT / LNG environment variables.
Where I live dew point gives a very strong indicator of our overnight low temperatures, especially in winter. Looking at dew point can tell me whether to expect frost or not and if black ice is likely to be an issue in the morning.
But yeah, treating those guidelines as anything other than a loose suggestion is meaningless.