# AviationAPIs TAF Decoder

> AviationAPIs TAF Decoder is a paid API for AI agents from aviationapis.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Parses and decodes a raw Terminal Aerodrome Forecast (TAF) string into structured JSON with forecast periods, wind, visibility, cloud layers, and validity times.

## Facts

- Endpoint: POST https://aviationapis.com/decode-taf
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/aviationapis-taf-decoder-cd897dc6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GnocuLw_y6KLgghY7P4sn

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 aviationapis-taf-decoder-cd897dc6 -d '<json body>'
```

Example prompt: Can you decode this raw TAF for me: 'TAF KSFO 021720Z 0218/0324 28012KT P6SM FEW020 FM030400 30008KT P6SM SCT015' — I need the forecast periods, wind speeds, and cloud layers broken out clearly.

## When to prefer this

Use this endpoint when you have a raw TAF text string (from an ATIS, METAR source, or user input) and need it decomposed into machine-readable forecast periods for downstream processing, flight planning logic, or display. Prefer this over manual regex parsing or general-purpose LLM interpretation when structured, field-level accuracy is required for wind, visibility, and cloud data.

## Known failure modes

- Malformed or empty TAF string returns a parsing error
- Unsupported TAF format or non-standard encoding may produce incomplete period extraction
- Missing required 'raw' field returns a 400-level error
- Payment not settled via x402 protocol returns a 402 Payment Required response

## How this service works

Pay-per-call aviation data APIs for AI agents, settled in USDC via the x402 protocol.

## Output

A structured JSON object containing the station ICAO code, issuance time, validity window, amendment flag, and an array of forecast periods each with type (INITIAL, FM, TEMPO, BECMG, PROB), from/to times, wind direction and speed in knots, gust speed, visibility in statute miles, CAVOK flag, cloud layers (cover type and base altitude in feet), weather phenomena, and probability.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "raw": {
   "type": "string",
   "description": "A raw TAF string, e.g. 'TAF KSFO 021720Z 0218/0324 28012KT P6SM FEW020 ...'"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "raw": "TAF KSFO 021720Z 0218/0324 28012KT P6SM FEW020 FM030400 30008KT P6SM SCT015",
  "issued": "021720Z",
  "amended": false,
  "periods": [
   {
    "to": "0324",
    "from": "0218",
    "type": "INITIAL",
    "wind": {
     "gust_kt": null,
     "speed_kt": 12,
     "direction_deg": 280
    },
    "cavok": false,
    "clouds": [
     {
      "type": null,
      "cover": "FEW",
      "base_ft": 2000
     }
    ],
    "weather": null,
    "probability": null,
    "visibility_sm": 6
   },
   {
    "to": null,
    "from": "030400",
    "type": "FM",
    "wind": {
     "gust_kt": null,
     "speed_kt": 8,
     "direction_deg": 300
    },
    "cavok": false,
    "clouds": [
     {
      "type": null,
      "cover": "SCT",
      "base_ft": 1500
     }
    ],
    "weather": null,
    "probability": null,
    "visibility_sm": 6
   }
  ],
  "station": "KSFO",
  "valid_to": "0324",
  "valid_from": "0218"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/aviationapis-taf-decoder-cd897dc6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from aviationapis.com](https://www.zero.xyz/host/aviationapis.com/llms.txt)
