# Foundry NWS Forecast

> Foundry NWS Forecast is a paid API for AI agents from foundry-par007-machine-revenue-mainnet.inference-chip-index.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-17).

Resolves a US latitude/longitude coordinate to the current National Weather Service forecast, returning a bounded number of forecast periods with source freshness metadata.

## Facts

- Endpoint: POST https://foundry-par007-machine-revenue-mainnet.inference-chip-index.workers.dev/v2/official/nws-forecast
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/foundry-nws-forecast-2f34bda7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lsuvmI-4N-Cl27vY0Ft3H

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 foundry-nws-forecast-2f34bda7 -d '<json body>'
```

Example prompt: What's the NWS forecast for the next 4 periods at latitude 39.7456, longitude -97.0892? Pull the official National Weather Service data for that location.

## When to prefer this

Prefer this endpoint when you need official US government NWS forecast data for a specific geographic point identified by latitude/longitude. Choose this over general weather APIs when you need authoritative NOAA-sourced forecasts with explicit provenance, attribution, and freshness metadata. Ideal for agents that need to prove the forecast came from an official source, or when operating in a context where open-data government attribution is required.

## Known failure modes

- Coordinates outside the US or US territories may return no forecast data (NWS only covers US)
- Invalid latitude/longitude values (outside -90/90 or -180/180) will be rejected by schema validation
- Periods value exceeding 14 or below 1 will be rejected
- NWS upstream API unavailability may result in errors or stale cached data
- Coordinates in ocean or remote areas without NWS grid coverage may return empty results
- Payment failure (x402) will block access before forecast is returned

## How this service works

Pay-per-request evidence and data tools: CSV validation and reconciliation, DNS/email configuration evidence, and bounded official weather, earthquake, vehicle, company and study records. Exact USDC prices, explicit JSON contracts and source provenance. No mailbox, ownership, medical or safety guarantees.

## Output

Returns a JSON object containing the queried coordinates and period count, forecast periods normalized from NWS data, source attribution (NOAA/NWS), freshness metadata including retrieval timestamp and cache age, the upstream NWS API URL, and provenance details including license and terms. The normalizedResult array contains the bounded forecast periods requested.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "periods": {
   "type": "integer",
   "default": 6,
   "maximum": 14,
   "minimum": 1
  },
  "latitude": {
   "type": "number",
   "maximum": 90,
   "minimum": -90
  },
  "longitude": {
   "type": "number",
   "maximum": 180,
   "minimum": -180
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "route": "nws-forecast",
  "result": {
   "query": {
    "periods": 4,
    "latitude": 39.7456,
    "longitude": -97.0892
   },
   "source": "National Weather Service",
   "freshness": {
    "state": "CURRENT_RETRIEVAL",
    "retrievedAt": "2026-09-06T00:00:00Z",
    "cacheAgeSeconds": 0,
    "maximumCacheSeconds": 30,
    "recordAgeIsNotRetrievalAge": true
   },
   "sourceUrl": "https://api.weather.gov",
   "observedAt": "2026-09-06T00:00:00Z",
   "provenance": {
    "license": "Open data free for any purpose; attribution and non-endorsement required",
    "termsUrl": "https://www.weather.gov/disclaimer",
    "truncated": false,
    "attribution": "NOAA / National Weather Service; normalized by Foundry; no endorsement",
    "limitations": [
     "Synthetic example only; identifiers and null values illustrate fields, not a live observation."
    ],
    "modifications": "Selected factual fields, normalized names and bounded result count; no source ownership claimed.",
    "upstreamCalls": 1,
    "documentationUrl": "https://www.weather.gov/documentation/services-web-api"
   },
   "sourceUpdatedAt": null,
   "normalizedResult": [
    {
     "name": null,
     "number": null,
     "endTime": null,
     "isDaytime": null,
     "startTime": null,
     "windSpeed": null,
     "temperature": null,
     "shortForecast": null,
     "windDirection": null,
     "temperatureUnit": null
    }
   ],
   "sourceProcessedAt": null,
   "rawSourceIdentifiers": []
  },
  "observed_at": "2026-09-06T00:00:00Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/foundry-nws-forecast-2f34bda7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from foundry-par007-machine-revenue-mainnet.inference-chip-index.workers.dev](https://www.zero.xyz/host/foundry-par007-machine-revenue-mainnet.inference-chip-index.workers.dev/llms.txt)
