> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webrouter.net/llms.txt
> Use this file to discover all available pages before exploring further.

# US National Weather Service

> Official US forecasts (7-day and hourly), active weather alerts and station observations from the National Weather Service API (api.weather.gov).

![](https://mintcdn.com/webrouter/JBFYvcRI1PVnd4YX/logo/data-apis/nws.webp?fit=max\&auto=format\&n=JBFYvcRI1PVnd4YX\&q=85\&s=1fe6386934fda19c8825022f82c1cf2d)

[Web Catalog · Environment](https://docs.webrouter.net/data-apis.md?category=environment)

No key needed

Endpoints

7

Auth

None

[Vendor docs](https://www.weather.gov/documentation/services-web-api)

## Setup

| Variable | | What it is |
| - | - | - |
| `NWS_USER_AGENT` | optional | The User-Agent NWS requires to identify your application, ideally with a website or contact email, e.g. '(myweatherapp.com, [contact@myweatherapp.com](mailto:contact@myweatherapp.com))'. |

Put them in your environment or `.env`; [Data APIs](https://docs.webrouter.net/vendors.md) 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

GET

Look up a location's forecast grid

The forecast office, grid x/y, forecast URLs, nearby stations and zones for a latitude/longitude.

[Open](#nws-points-get)

GET

Get the 7-day forecast

Twelve-hour day and night forecast periods for seven days, with text forecasts.

[Open](#nws-forecast-get)

GET

Get the hourly forecast

Hour-by-hour forecast periods for seven days.

[Open](#nws-forecast-hourly)

GET

List active weather alerts

Watches, warnings and advisories in effect, filtered by state, point, zone, event or severity.

[Open](#nws-alerts-active)

GET

Get a station's latest observation

The most recent observed temperature, wind, pressure, humidity and conditions at a station.

[Open](#nws-observations-latest)

GET

List a station's recent observations

Observations at a station over a time range; only the last seven days are kept.

[Open](#nws-observations-list)

GET

List stations near a grid point

Observation stations usable for a forecast grid point, nearest first.

[Open](#nws-gridpoint-stations)

### Look up a location's forecast grid

GET

`/points/{latitude},{longitude}`

`nws.points.get`

The forecast office, grid x/y, forecast URLs, nearby stations and zones for a latitude/longitude.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`latitude` required</td><td>number</td><td>path</td><td>Latitude, up to 4 decimals. Example `39.7456`</td></tr>
    <tr><td>`longitude` required</td><td>number</td><td>path</td><td>Longitude, up to 4 decimals. Example `-97.0892`</td></tr>
  </tbody>
</table>

[Vendor docs](https://www.weather.gov/documentation/services-web-api) · Same job: [WeatherAPI.com](https://docs.webrouter.net/data-apis/weatherapi.md#weatherapi-search)

```python Python theme={null}
router.call_data_api("nws.points.get", {'latitude': 39.7456, 'longitude': -97.0892})
```

```text MCP theme={null}
call_data_api(endpoint="nws.points.get", params={"latitude": 39.7456, "longitude": -97.0892})
```

### Get the 7-day forecast

GET

`/gridpoints/{wfo}/{x},{y}/forecast`

`nws.forecast.get`

Twelve-hour day and night forecast periods for seven days, with text forecasts.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`wfo` required</td><td>string</td><td>path</td><td>Forecast office id (gridId from points.get). Example `TOP`</td></tr>
    <tr><td>`x` required</td><td>integer</td><td>path</td><td>Grid X. Example `31`</td></tr>
    <tr><td>`y` required</td><td>integer</td><td>path</td><td>Grid Y. Example `80`</td></tr>
    <tr><td>`units`</td><td>string</td><td>query</td><td>us (default) or si. One of `us`, `si`</td></tr>
  </tbody>
</table>

[Vendor docs](https://www.weather.gov/documentation/services-web-api) · Same job: [Open-Meteo](https://docs.webrouter.net/data-apis/openmeteo.md#openmeteo-forecast-get), [OpenWeather](https://docs.webrouter.net/data-apis/openweather.md#openweather-forecast-get), [Precip](https://docs.webrouter.net/data-apis/precip.md#precip-forecast), [Tomorrow.io](https://docs.webrouter.net/data-apis/tomorrow-io.md#tomorrow-io-weather-forecast), [WeatherAPI.com](https://docs.webrouter.net/data-apis/weatherapi.md#weatherapi-forecast)

```python Python theme={null}
router.call_data_api("nws.forecast.get", {'wfo': 'TOP', 'x': 31, 'y': 80})
```

```text MCP theme={null}
call_data_api(endpoint="nws.forecast.get", params={"wfo": "TOP", "x": 31, "y": 80})
```

### Get the hourly forecast

GET

`/gridpoints/{wfo}/{x},{y}/forecast/hourly`

`nws.forecast.hourly`

Hour-by-hour forecast periods for seven days.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`wfo` required</td><td>string</td><td>path</td><td>Forecast office id. Example `TOP`</td></tr>

    <tr>
      <td>
        `x`

        required
      </td>

      <td>
        integer
      </td>

      <td>
        path
      </td>

      <td>
        Grid X.
      </td>
    </tr>

    <tr>
      <td>
        `y`

        required
      </td>

      <td>
        integer
      </td>

      <td>
        path
      </td>

      <td>
        Grid Y.
      </td>
    </tr>

    <tr><td>`units`</td><td>string</td><td>query</td><td>us (default) or si. One of `us`, `si`</td></tr>
  </tbody>
</table>

[Vendor docs](https://www.weather.gov/documentation/services-web-api) · Same job: [Open-Meteo](https://docs.webrouter.net/data-apis/openmeteo.md#openmeteo-forecast-get), [OpenWeather](https://docs.webrouter.net/data-apis/openweather.md#openweather-forecast-get), [Precip](https://docs.webrouter.net/data-apis/precip.md#precip-forecast), [Tomorrow.io](https://docs.webrouter.net/data-apis/tomorrow-io.md#tomorrow-io-weather-forecast), [WeatherAPI.com](https://docs.webrouter.net/data-apis/weatherapi.md#weatherapi-forecast)

### List active weather alerts

GET

`/alerts/active`

`nws.alerts.active`

Watches, warnings and advisories in effect, filtered by state, point, zone, event or severity.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`area`</td><td>string</td><td>query</td><td>State/territory or marine area code; not with point, region or zone. Example `KS`</td></tr>
    <tr><td>`point`</td><td>string</td><td>query</td><td>latitude,longitude; not with area, region or zone. Example `39.7456,-97.0892`</td></tr>

    <tr>
      <td>
        `zone`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Forecast or county zone id.
      </td>
    </tr>

    <tr>
      <td>
        `region`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Marine region code.
      </td>
    </tr>

    <tr><td>`region_type`</td><td>string</td><td>query</td><td>land or marine. One of `land`, `marine`</td></tr>

    <tr>
      <td>
        `event`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Event name, e.g. Tornado Warning.
      </td>
    </tr>

    <tr>
      <td>
        `code`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Event code.
      </td>
    </tr>

    <tr><td>`status`</td><td>string</td><td>query</td><td>Status. One of `actual`, `exercise`, `system`, `test`, `draft`</td></tr>
    <tr><td>`message_type`</td><td>string</td><td>query</td><td>Message type. One of `alert`, `update`, `cancel`</td></tr>
    <tr><td>`urgency`</td><td>string</td><td>query</td><td>Urgency. One of `immediate`, `expected`, `future`, `past`, `unknown`</td></tr>
    <tr><td>`severity`</td><td>string</td><td>query</td><td>Severity. One of `extreme`, `severe`, `moderate`, `minor`, `unknown`</td></tr>
    <tr><td>`certainty`</td><td>string</td><td>query</td><td>Certainty. One of `observed`, `likely`, `possible`, `unlikely`, `unknown`</td></tr>
  </tbody>
</table>

[Vendor docs](https://www.weather.gov/documentation/services-web-api) · Same job: [Environment and Climate Change Canada (GeoMet-OGC-API)](https://docs.webrouter.net/data-apis/eccc-geomet.md#eccc-geomet-alerts-list), [WeatherAPI.com](https://docs.webrouter.net/data-apis/weatherapi.md#weatherapi-alerts)

```python Python theme={null}
router.call_data_api("nws.alerts.active", {'area': 'KS', 'point': '39.7456,-97.0892'})
```

```text MCP theme={null}
call_data_api(endpoint="nws.alerts.active", params={"area": "KS", "point": "39.7456,-97.0892"})
```

### Get a station's latest observation

GET

`/stations/{stationId}/observations/latest`

`nws.observations.latest`

The most recent observed temperature, wind, pressure, humidity and conditions at a station.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`stationId` required</td><td>string</td><td>path</td><td>Observation station id (from points.get's observationStations). Example `KTOP`</td></tr>

    <tr>
      <td>
        `require_qc`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        Only quality-controlled observations.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://www.weather.gov/documentation/services-web-api) · Same job: [Amap (Gaode) Web Service](https://docs.webrouter.net/data-apis/amap.md#amap-weather), [FlightAware AeroAPI](https://docs.webrouter.net/data-apis/flightaware.md#flightaware-airports-weather), [OpenWeather](https://docs.webrouter.net/data-apis/openweather.md#openweather-weather-current), [Tomorrow.io](https://docs.webrouter.net/data-apis/tomorrow-io.md#tomorrow-io-weather-realtime), [WeatherAPI.com](https://docs.webrouter.net/data-apis/weatherapi.md#weatherapi-current)

```python Python theme={null}
router.call_data_api("nws.observations.latest", {'stationId': 'KTOP'})
```

```text MCP theme={null}
call_data_api(endpoint="nws.observations.latest", params={"stationId": "KTOP"})
```

> [!NOTE]
>
> * Values are SI with a unitCode on each (wmoUnit:degC, km\_h-1...), whatever units the forecast uses.

### List a station's recent observations

GET

`/stations/{stationId}/observations`

`nws.observations.list`

Observations at a station over a time range; only the last seven days are kept.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`stationId` required</td><td>string</td><td>path</td><td>Observation station id. Example `KTOP`</td></tr>

    <tr>
      <td>
        `start`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Start time, ISO 8601.
      </td>
    </tr>

    <tr>
      <td>
        `end`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        End time, ISO 8601.
      </td>
    </tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Max observations.
      </td>
    </tr>

    <tr>
      <td>
        `cursor`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Pagination cursor.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://www.weather.gov/documentation/services-web-api) · Same job: [Environment and Climate Change Canada (GeoMet-OGC-API)](https://docs.webrouter.net/data-apis/eccc-geomet.md#eccc-geomet-climate-daily), [NASA POWER](https://docs.webrouter.net/data-apis/nasapower.md#nasapower-daily-point), [Open-Meteo](https://docs.webrouter.net/data-apis/openmeteo.md#openmeteo-archive-get), [OpenWeather](https://docs.webrouter.net/data-apis/openweather.md#openweather-onecall-timemachine), [ACIS (NOAA Regional Climate Centers)](https://docs.webrouter.net/data-apis/rcc-acis.md#rcc-acis-station-data), [Tomorrow.io](https://docs.webrouter.net/data-apis/tomorrow-io.md#tomorrow-io-weather-recent-history)

```python Python theme={null}
router.call_data_api("nws.observations.list", {'stationId': 'KTOP'})
```

```text MCP theme={null}
call_data_api(endpoint="nws.observations.list", params={"stationId": "KTOP"})
```

### List stations near a grid point

GET

`/gridpoints/{wfo}/{x},{y}/stations`

`nws.gridpoint.stations`

Observation stations usable for a forecast grid point, nearest first.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `wfo`

        required
      </td>

      <td>
        string
      </td>

      <td>
        path
      </td>

      <td>
        Forecast office id.
      </td>
    </tr>

    <tr>
      <td>
        `x`

        required
      </td>

      <td>
        integer
      </td>

      <td>
        path
      </td>

      <td>
        Grid X.
      </td>
    </tr>

    <tr>
      <td>
        `y`

        required
      </td>

      <td>
        integer
      </td>

      <td>
        path
      </td>

      <td>
        Grid Y.
      </td>
    </tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Max stations.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://www.weather.gov/documentation/services-web-api) · Same job: [Environment and Climate Change Canada (GeoMet-OGC-API)](https://docs.webrouter.net/data-apis/eccc-geomet.md#eccc-geomet-stations-climate), [ACIS (NOAA Regional Climate Centers)](https://docs.webrouter.net/data-apis/rcc-acis.md#rcc-acis-stations-search)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.