# Weather Alerts by State (NWS)

> Weather Alerts by State (NWS) is a paid API for AI agents from api.maxwellinternational.ai, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-02).

Returns current National Weather Service weather alerts for a specified US state, including event type, severity, urgency, onset/end times, and affected areas.

## Facts

- Endpoint: GET https://api.maxwellinternational.ai/v1/weather/alerts-by-state?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/weather-alerts-by-state-nws-99ff0d7a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-3g3dfFnsTrMhvfq-zlcd

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability weather-alerts-by-state-nws-99ff0d7a
```

Example prompt: Can you pull the current NWS weather alerts for Colorado and tell me if there's anything severe or urgent I should know about?

## When to prefer this

Choose this endpoint when you need official, authoritative NWS weather alert data scoped to a specific US state, including structured metadata like severity, urgency, certainty, and affected county-level areas. Prefer it over general weather APIs when you need emergency alert details (watches, warnings, outlooks) rather than forecasts or current conditions.

## Known failure modes

- Invalid or unrecognized state name/slug returns an error or empty alert list
- NWS upstream API unavailability may result in stale cache data or error response
- State with no active alerts returns an empty alerts array with count 0
- Malformed query parameters may return a 400 or validation error
- Rate limiting or payment failure (x402) blocks the request

## How this service works

Active NWS alerts for one US state or territory (full name, e.g. Colorado): event, severity, urgency, certainty, headline, area, onset and end times. From the NWS (US and territories), cached and refreshed about every 3 hours; a location not yet cached answers 404, is not charged, and is queued.

## Output

Returns a JSON object containing the state name, NWS area code, a list of active weather alerts (each with event type, headline, severity, urgency, certainty, onset/end times, and affected area description), alert count, cache hit/miss status, and the timestamp the data was generated. Sourced from the official NWS API.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "sku": "weather.alerts",
  "cache": "hit",
  "count": 1,
  "match": true,
  "state": "Colorado",
  "alerts": [
   {
    "id": "urn:oid:2.49.0.1.840.0.ce67801ec73048f07c44dd0418c6a50edd1c8fdc.001.1",
    "ends": "2026-09-30T06:00:00-06:00",
    "event": "Hydrologic Outlook",
    "onset": "2026-09-25T14:21:00-06:00",
    "urgency": "Future",
    "areaDesc": "Archuleta, CO; Dolores, CO; Gunnison, CO; Hinsdale, CO; La Plata, CO; Montezu...",
    "headline": "Hydrologic Outlook issued September 25 at 2:21PM MDT by NWS Grand Junction CO",
    "severity": "Unknown",
    "certainty": "Possible"
   }
  ],
  "country": "United States",
  "stateSlug": "colorado",
  "generatedAt": "2026-09-26T04:01:03.586Z",
  "nwsAreaCode": "CO",
  "sourceClass": "official-api"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/weather-alerts-by-state-nws-99ff0d7a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.maxwellinternational.ai](https://www.zero.xyz/host/api.maxwellinternational.ai/llms.txt)
