# Delx Commerce Weather Forecast API

> Delx Commerce Weather Forecast API is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Returns a multi-period US weather forecast for a given latitude/longitude coordinate using NOAA National Weather Service data, billed per call via USDC on Base or Solana.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/weather-forecast?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-weather-forecast-api-b09aacd7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dRpVIzb6xSMzfueNGynSp

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 delx-commerce-weather-forecast-api-b09aacd7 -d '<json body>'
```

Example prompt: What's the weather forecast for Washington DC — give me the next 5 periods using coordinates 38.9072, -77.0369.

## When to prefer this

Choose this endpoint when you need a no-signup, pay-per-call US weather forecast backed directly by NOAA/NWS data, especially in agentic or automated workflows where API key management is undesirable and verifiable USDC micropayments via x402 are acceptable. It is ideal for US-only coverage use cases where official government forecast data is preferred over commercial weather providers.

## Known failure modes

- Coordinates outside US coverage (NOAA only covers the continental US, Alaska, Hawaii, and territories) return an error
- Timeout exceeded if NWS API is slow — timeout parameter caps at 8 seconds
- Invalid latitude (outside -90 to 90) or longitude (outside -180 to 180) rejected with validation error
- Periods parameter outside 1–10 range rejected
- Payment failure via x402 if USDC balance is insufficient or wallet is not configured
- NWS upstream outage causes failed or delayed response

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

Returns a JSON object containing an array of forecast periods (up to 10), each with period name, number, start/end times, daytime flag, temperature in Fahrenheit, and a short forecast description. Also includes metadata: cache hit/miss status, coverage area (US only), provider attribution (NOAA/NWS), echoed coordinates, and a URL to the raw NWS grid forecast.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "periods": {
   "type": "integer",
   "default": 5,
   "maximum": 10,
   "minimum": 1
  },
  "timeout": {
   "type": "integer",
   "default": 8,
   "maximum": 8,
   "minimum": 2
  },
  "latitude": {
   "type": "number",
   "maximum": 90,
   "minimum": -90
  },
  "longitude": {
   "type": "number",
   "maximum": 180,
   "minimum": -180
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "cache": "miss",
   "schema": "delx/weather-forecast/v1",
   "periods": [
    {
     "name": "Today",
     "number": 1,
     "endTime": "2026-08-01T18:00:00-04:00",
     "isDaytime": true,
     "startTime": "2026-08-01T12:00:00-04:00",
     "temperature": 87,
     "shortForecast": "Mostly Sunny",
     "temperatureUnit": "F"
    },
    {
     "name": "Tonight",
     "number": 2,
     "endTime": "2026-08-02T06:00:00-04:00",
     "isDaytime": false,
     "startTime": "2026-08-01T18:00:00-04:00",
     "temperature": 70,
     "shortForecast": "Mostly Clear",
     "temperatureUnit": "F"
    }
   ],
   "coverage": "US",
   "provider": "National Weather Service (NOAA)",
   "attribution": "Forecast data supplied by the National Weather Service; see provider_url for source and coverage.",
   "coordinates": {
    "latitude": 38.9072,
    "longitude": -77.0369
   },
   "forecast_url": "https://api.weather.gov/gridpoints/LWX/96,70/forecast",
   "provider_url": "https://www.weather.gov/",
   "periods_returned": 2,
   "periods_requested": 2
  },
  "tool_name": "get_weather_forecast_nws"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-weather-forecast-api-b09aacd7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
