Setup
Put them in your environment or
.env; Data APIs covers the other ways.
Notes
- Keyless, but every request needs a User-Agent identifying the application; set NWS_USER_AGENT.
- Rate limits exist but are not published; an over-limit error clears, typically within 5 seconds. Retry after a pause.
- Forecasts are by grid, not by lat/lon: call points.get first, then use properties.gridId, gridX and gridY (or the forecast URLs it returns). The grid of a location can change, so re-check points now and then.
- US territory only. Times are ISO 8601 with offset; temperatures are Fahrenheit unless units=si.
Endpoints
Look up a location’s forecast grid
Get the 7-day forecast
Get the hourly forecast
List active weather alerts
Get a station’s latest observation
- Values are SI with a unitCode on each (wmoUnit:degC, km_h-1…), whatever units the forecast uses.