# US Weather Risk API

> US Weather Risk API is a paid API for AI agents from api.weatherriskapi.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-11).

Returns a deterministic 0-100 weather risk score with hazard reasons and severity level for a US location, forecast horizon, and operational profile, derived from National Weather Service data.

## Facts

- Endpoint: POST https://api.weatherriskapi.com/v1/us-weather-risk?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/us-weather-risk-api-f7b2c7ab
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_y-MicY_EFNj5EnAQN0NEq

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 us-weather-risk-api-f7b2c7ab -d '<json body>'
```

Example prompt: What's the weather risk score at latitude 37.7749, longitude -122.4194 for the next 24 hours using the delivery profile?

## When to prefer this

Choose this endpoint when you need a single machine-readable risk number and structured hazard reasons for a US location, rather than raw forecast data you'd have to interpret yourself. It is purpose-built for operational decision-making by AI agents and automation pipelines — ideal when the agent needs to make a go/no-go decision based on weather without building its own multi-factor scoring logic. Prefer it over raw NWS API calls when you need normalized, profile-weighted scores that combine wind, precipitation, temperature, visibility, and alerts into one signal. Best for delivery, logistics, outdoor operations, and travel use cases where interpretable hazard reasons matter as much as the score itself.

## Known failure modes

- Location outside NWS coverage area (non-US coordinates) — API returns an error indicating unsupported location
- NWS upstream data unavailable or stale — freshness fields will indicate 'stale' or missing, risk score may reflect degraded confidence
- Invalid latitude/longitude values outside allowed range — schema validation error
- Unsupported horizonHours value outside the enum set — schema validation error
- Payment failure (insufficient USDC balance) — x402 payment required error before scoring occurs

## How this service works

US operational weather-risk decision API for agents. Submit a US latitude/longitude, 6-72 hour horizon, and operational profile to receive a deterministic 0-100 risk score, level, hazard reasons, freshness, and provenance derived from public National Weather Service forecasts, observations, and alerts where available. Unlike a raw weather forecast, the response combines wind, precipitation, temperature, visibility, severe weather, and data-quality signals into a machine-readable decision input. Successful calls cost 0.005 USDC.

## Output

A JSON object containing: a numeric riskScore (0-100), a riskLevel label (e.g. 'moderate'), an array of reasons each with a hazard code, human-readable summary, evidence details (value, threshold, unit, time window, source), and per-component contribution score; plus a sources array with upstream NWS URLs and retrieval timestamps, and a freshness map indicating staleness of alerts, points, forecast, and observation data.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "profile": {
   "enum": [
    "general",
    "travel",
    "delivery",
    "outdoor"
   ],
   "type": "string",
   "default": "general",
   "description": "Operational weighting: general, travel, delivery, or outdoor."
  },
  "latitude": {
   "type": "number",
   "maximum": 90,
   "minimum": -90,
   "multipleOf": 0.000001,
   "description": "Latitude in decimal degrees for an NWS-supported US location."
  },
  "longitude": {
   "type": "number",
   "maximum": 180,
   "minimum": -180,
   "multipleOf": 0.000001,
   "description": "Longitude in decimal degrees for an NWS-supported US location."
  },
  "horizonHours": {
   "enum": [
    6,
    12,
    24,
    48,
    72
   ],
   "type": "integer",
   "default": 24,
   "description": "Look-ahead window: 6-12 hours for imminent actions, 24 for next-day planning, 48-72 for multi-day screening."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "reasons": [
   {
    "code": "wind",
    "summary": "Forecast wind exceeds the delivery profile threshold.",
    "evidence": {
     "unit": "mph",
     "value": 30,
     "source": "forecast",
     "endTime": "2026-10-04T13:00:00.000Z",
     "sourceId": null,
     "startTime": "2026-10-04T12:00:00.000Z",
     "threshold": "windSpeedMph >= 30"
    },
    "component": "wind",
    "contribution": 25
   }
  ],
  "sources": [
   {
    "url": "https://api.weather.gov/points/38,-122",
    "kind": "points",
    "retrievedAt": "2026-10-04T11:55:00.000Z",
    "upstreamUpdatedAt": null
   }
  ],
  "freshness": {
   "alerts": "fresh",
   "points": "fresh",
   "forecast": "fresh",
   "observation": "fresh"
  },
  "riskLevel": "moderate",
  "riskScore": 36
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/us-weather-risk-api-f7b2c7ab/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.weatherriskapi.com](https://www.zero.xyz/host/api.weatherriskapi.com/llms.txt)
