Nws Get Forecast
nws_get_forecastGet the weather forecast for a US location. Returns either named 12-hour periods (default) or hourly breakdowns.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cursor | No | Opaque continuation token from a previous response's nextCursor, to retrieve the next 48 periods. Omit for the first page. Every call re-fetches the forecast, so consecutive periods are contiguous within one response; NWS reissues forecasts through the day, so a later call can window a regenerated period array. | |
| hourly | No | If true, returns hourly forecast (48 one-hour periods per page, ~156 available) instead of 12-hour named periods (14 periods). Hourly includes dewpoint and relative humidity. | |
| latitude | Yes | Latitude in decimal degrees (e.g., 47.6062). | |
| longitude | Yes | Longitude in decimal degrees (e.g., -122.3321). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Forecast mode: "hourly" or "7-day" | |
| error | No | Present when the call failed. Absent on success. | |
| shown | No | Number of forecast periods in this page (at most 48). | |
| notice | No | Set when periods remain beyond this page, or when the supplied cursor points past the end of the period array. | |
| periods | No | Forecast periods | |
| location | No | Resolved location metadata | |
| nextCursor | No | Opaque token for the next page of periods — pass it back as `cursor`. Omitted when this is the last page. | |
| totalCount | No | Total forecast periods available upstream before the page window was applied — NOT the number in this page, which is shown. Compare it against shown to tell whether periods were withheld. | |
| generatedAt | No | When the forecast was generated (ISO 8601) |