# NWS Weather Alerts by US State

> NWS Weather Alerts by US State is a paid API for AI agents from agent402.tools, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-12).

Returns active National Weather Service alerts for a given US state as structured JSON, including event type, severity, headline, affected areas, and onset/expiry times.

## Facts

- Endpoint: GET https://agent402.tools/api/weather-alerts?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/nws-weather-alerts-by-us-state-bd28349e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HNnjFU9b-gaD7tr8NMKIE

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 nws-weather-alerts-by-us-state-bd28349e
```

Example prompt: Pull all active National Weather Service alerts for Texas right now — give me the event type, severity, headline, affected areas, and when each alert starts and expires.

## When to prefer this

Use this endpoint when you need real-time, structured US government weather alert data for a specific state without requiring an API key. Ideal for monitoring active severe weather events, building safety dashboards, or triggering automations based on NWS alert activity. Prefer over scraping NWS directly since this returns clean JSON.

## Known failure modes

- Invalid or unrecognized state code returns an error or empty result
- No active alerts for the state returns an empty array
- NWS upstream API downtime may cause failures or stale data
- Missing required 'area' query parameter returns a 400-level error

## How this service works

Active National Weather Service alerts for a US state as clean JSON: event, severity, headline, affected areas, onset/expiry. Live government data, no key.

## Output

A JSON array of active NWS alert objects for the specified US state, each containing: event type (e.g. 'Tornado Warning'), severity level, human-readable headline, list of affected areas/counties, and onset/expiry timestamps. Data is sourced live from the US government with no API key required.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "area": "CA"
  }
 }
}
```

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "area"
     ],
     "properties": {
      "area": {
       "type": "string",
       "description": "Two-letter US state/territory code, e.g. CA, TX, FL"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "area",
      "count",
      "alerts"
     ],
     "properties": {
      "area": {
       "type": "string"
      },
      "count": {
       "type": "integer"
      },
      "alerts": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "areas": {
          "type": "string"
         },
         "event": {
          "type": "string"
         },
         "onset": {
          "type": "string"
         },
         "expires": {
          "type": "string"
         },
         "headline": {
          "type": "string"
         },
         "severity": {
          "type": "string"
         }
        }
       }
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "area": "CA",
  "count": 2,
  "alerts": [
   {
    "areas": "…",
    "event": "Red Flag Warning",
    "onset": "2026-06-12T12:00:00-07:00",
    "expires": "…",
    "headline": "…",
    "severity": "Severe"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/nws-weather-alerts-by-us-state-bd28349e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
