# AviationAPIs METAR Decoder

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

Parses a raw METAR or SPECI aviation weather observation string into structured JSON fields including wind, visibility, clouds, temperature, altimeter, and flight category.

## Facts

- Endpoint: POST https://aviationapis.com/decode-metar?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/aviationapis-metar-decoder-f703623a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MUrV1wTVB7lkIgyGn26md

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-metar-decoder-f703623a -d '<json body>'
```

Example prompt: Decode this raw METAR string for me and tell me the flight category, wind, visibility, and cloud conditions: 'KSFO 021856Z 28014KT 10SM FEW016 19/13 A3004'.

## When to prefer this

Use this endpoint when you have a raw METAR or SPECI string and need it parsed into structured, machine-readable fields — especially for flight planning tools, weather dashboards, pilot briefing apps, or any automation that needs to extract wind, visibility, cloud base, or flight category from unparsed aviation weather text. Prefer this over a general weather API when the raw METAR text is already available and structured extraction is the goal.

## Known failure modes

- Malformed or empty METAR string returns an error or unparseable result
- Missing required 'raw' field in request body causes a 400-level error
- Truncated METAR string may result in null values for unparseable fields
- Non-standard or military METAR formats may not parse correctly
- Network or payment (x402) failure results in no 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 decoded METAR fields: station ID, report type (METAR/SPECI), auto flag, report time, wind speed/direction/gust in knots, visibility in statute miles, cloud layers with cover type and base altitude in feet, temperature and dewpoint in Celsius, altimeter in both inHg and hPa, weather phenomena, CAVOK flag, variable wind range, flight category (VFR/MVFR/IFR/LIFR), and raw input string.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "raw": {
   "type": "string",
   "description": "A raw METAR/SPECI observation string, e.g. 'KSFO 021856Z 28014KT 10SM FEW016 19/13 A3004'"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "raw": "KSFO 021856Z 28014KT 10SM FEW016 19/13 A3004",
  "auto": false,
  "type": "METAR",
  "wind": {
   "gust_kt": null,
   "speed_kt": 14,
   "direction_deg": 280
  },
  "cavok": false,
  "clouds": [
   {
    "type": null,
    "cover": "FEW",
    "base_ft": 1600
   }
  ],
  "temp_c": 19,
  "remarks": null,
  "station": "KSFO",
  "weather": null,
  "dewpoint_c": 13,
  "report_time": "021856Z",
  "altimeter_hpa": 1017,
  "visibility_sm": 10,
  "altimeter_inhg": 30.04,
  "flight_category": "VFR",
  "wind_variable_to_deg": null,
  "wind_variable_from_deg": null
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/aviationapis-metar-decoder-f703623a/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)
