Add tomorrow, day after tomorrow, and 7-day weekly forecast examples. Expand Open-Meteo section with daily and hourly forecast endpoints. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2.3 KiB
2.3 KiB
| name | description | homepage | metadata | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| weather-forecasts | Get current weather and forecasts (no API key required). | https://wttr.in/:help |
|
Weather
Two free services, no API keys needed.
wttr.in (primary)
Quick one-liner:
curl -s "wttr.in/London?format=3"
# Output: London: ⛅️ +8°C
Compact format:
curl -s "wttr.in/London?format=%l:+%c+%t+%h+%w"
# Output: London: ⛅️ +8°C 71% ↙5km/h
Full forecast (3 days):
curl -s "wttr.in/London?T"
Querying by time range
Current weather only:
curl -s "wttr.in/London?0&format=3"
Today's forecast:
curl -s "wttr.in/London?1&T"
Tomorrow's forecast:
curl -s "wttr.in/London?2&T"
# Shows today + tomorrow; extract the second day
Day after tomorrow:
curl -s "wttr.in/London?T"
# Default output shows 3 days (today, tomorrow, day after tomorrow)
Next 7 days (weekly forecast) — use Open-Meteo:
curl -s "https://api.open-meteo.com/v1/forecast?latitude=51.5&longitude=-0.12&daily=temperature_2m_max,temperature_2m_min,weathercode&timezone=auto&forecast_days=7"
Format codes
%c condition · %t temp · %h humidity · %w wind · %l location · %m moon
Tips
- URL-encode spaces:
wttr.in/New+York - Airport codes:
wttr.in/JFK - Units:
?m(metric)?u(USCS) - Language:
?lang=ja(Japanese),?lang=zh(Chinese), etc. - PNG:
curl -s "wttr.in/Berlin.png" -o /tmp/weather.png
Open-Meteo (fallback / extended forecasts, JSON)
Free, no key, good for programmatic use and longer-range forecasts.
Current weather:
curl -s "https://api.open-meteo.com/v1/forecast?latitude=51.5&longitude=-0.12¤t_weather=true"
7-day daily forecast (min/max temp, weather code):
curl -s "https://api.open-meteo.com/v1/forecast?latitude=51.5&longitude=-0.12&daily=temperature_2m_max,temperature_2m_min,weathercode,precipitation_sum&timezone=auto&forecast_days=7"
Hourly forecast for the next 2 days:
curl -s "https://api.open-meteo.com/v1/forecast?latitude=51.5&longitude=-0.12&hourly=temperature_2m,weathercode,precipitation&timezone=auto&forecast_days=2"
Find coordinates for a city, then query. Returns JSON with temp, windspeed, weathercode.