# CoinTracker x402 Weather Forecast

> CoinTracker x402 Weather Forecast is a paid API for AI agents from api.cointracker.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Returns multi-period weather forecasts from the National Weather Service for a given latitude/longitude coordinate pair, accessed via x402 micropayment.

## Facts

- Endpoint: GET https://api.cointracker.com/v1/weather/forecast
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/cointracker-x402-weather-forecast-abf83573
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fz5yRfcU1SAQReojZSpkD

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 cointracker-x402-weather-forecast-abf83573
```

Example prompt: What's the weather forecast for San Francisco right now? The coordinates are 37.7749 latitude and -122.4194 longitude.

## When to prefer this

Choose this endpoint when you need structured, multi-period weather forecast data from the authoritative US government source (National Weather Service/NOAA) and are querying by precise geographic coordinates. It is well-suited for US-centric location forecasting where lat/lon is already known. Prefer over commercial weather APIs when NWS sourcing is preferred or when micropayment-per-call pricing via x402 is acceptable. Note this is labeled experimental and is best used for prototyping or testing x402-paid weather lookups rather than production-grade applications.

## Known failure modes

- Invalid or out-of-range latitude/longitude returns an error — coordinates must be within US coverage area of the National Weather Service
- NWS API upstream outage may cause the endpoint to return no periods or empty data
- Coordinates in ocean or outside NWS grid coverage will fail to resolve to a forecast location
- Payment failure via x402 will result in a 402 response before the forecast is returned
- Missing required query parameters (latitude or longitude) will result in a validation error

## How this service works

Experimental validation of a simple x402-paid API; not a product offering.

## Output

A JSON object containing multi-period weather forecast data sourced from the National Weather Service, including: city and state name for the coordinates, an array of forecast periods each with start/end time, temperature (with unit), wind speed and direction, short and detailed forecast text, precipitation probability, daytime flag, and an icon URL. Also includes the echoed coordinates, fetch timestamp, and experimental/service metadata flags.

## 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"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "latitude",
      "longitude"
     ],
     "properties": {
      "latitude": {
       "type": "number",
       "maximum": 90,
       "minimum": -90
      },
      "longitude": {
       "type": "number",
       "maximum": 180,
       "minimum": -180
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "service",
      "experimental",
      "source",
      "fetchedAt",
      "coordinates",
      "location",
      "periods"
     ],
     "properties": {
      "source": {
       "type": "string",
       "const": "National Weather Service"
      },
      "periods": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "icon": {
          "type": [
           "string",
           "null"
          ],
          "format": "uri"
         },
         "name": {
          "type": [
           "string",
           "null"
          ]
         },
         "endTime": {
          "type": [
           "string",
           "null"
          ],
          "format": "date-time"
         },
         "isDaytime": {
          "type": [
           "boolean",
           "null"
          ]
         },
         "startTime": {
          "type": [
           "string",
           "null"
          ],
          "format": "date-time"
         },
         "windSpeed": {
          "type": [
           "string",
           "null"
          ]
         },
         "temperature": {
          "type": [
           "number",
           "null"
          ]
         },
         "shortForecast": {
          "type": [
           "string",
           "null"
          ]
         },
         "windDirection": {
          "type": [
           "string",
           "null"
          ]
         },
         "temperatureUnit": {
          "type": [
           "string"
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "source": "National Weather Service",
  "periods": [],
  "service": "x402-weather-test",
  "location": {
   "city": "San Francisco",
   "state": "CA"
  },
  "fetchedAt": "2026-09-08T00:00:00Z",
  "coordinates": {
   "latitude": 37.7749,
   "longitude": -122.4194
  },
  "experimental": true
 }
}
```

## More

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