# AviationAPIs METAR

> AviationAPIs METAR 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).

Fetches the latest METAR (aviation weather observation) for a given airport by ICAO code, including wind, visibility, clouds, temperature, altimeter, and flight category.

## Facts

- Endpoint: POST https://aviationapis.com/metar
- 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-metar-5fbaf25c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4qqQ4feaFmupUJ2LmpUk-

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-5fbaf25c -d '<json body>'
```

Example prompt: What are the current flight conditions at San Francisco International — specifically the wind, visibility, cloud ceiling, and whether it's VFR or IFR right now? The ICAO code is KSFO.

## When to prefer this

Use this endpoint when you need real-time, decoded aviation weather observations (METAR) for a specific airport identified by its ICAO code. Prefer this over TAF endpoints when you need current conditions rather than forecasts, and over general weather APIs when you need aviation-specific data like flight category, altimeter setting, and cloud coverage in aviation standard units. Best for pilot briefing tools, flight planning assistants, dispatch systems, or any agent that needs to answer 'what are conditions like right now at airport X?'

## Known failure modes

- Invalid or non-existent ICAO code returns an error response
- Station has no recent METAR report (remote or inactive airport)
- Payment failure via x402 protocol prevents data retrieval
- Network timeout if the upstream METAR data source is unavailable
- Malformed request body (e.g. ICAO code not exactly 4 letters) returns validation error

## How this service works

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

## Output

Returns a JSON object containing the raw METAR string, decoded fields including wind speed/direction/gust in knots, visibility in statute miles, cloud layers with coverage and base altitude in feet, temperature and dewpoint in Celsius, altimeter in hPa, flight category (e.g. VFR, MVFR, IFR, LIFR), and timestamps for when the observation was made and fetched.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "icao": {
   "type": "string",
   "pattern": "^[A-Za-z]{4}$",
   "description": "4-letter ICAO airport code (e.g. 'KSFO', 'EGLL', 'RJTT')"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "raw": "KSFO 021856Z 28014KT 10SM FEW016 19/13 A3004",
  "icao": "KSFO",
  "name": "San Francisco Intl",
  "wind": {
   "gust_kt": null,
   "speed_kt": 14,
   "direction_deg": 280
  },
  "clouds": [
   {
    "cover": "FEW",
    "base_ft": 1600
   }
  ],
  "temp_c": 19,
  "weather": null,
  "dewpoint_c": 13,
  "fetched_at": "2026-06-02T18:58:11.000Z",
  "observed_at": "2026-06-02T18:56:00Z",
  "altimeter_hpa": 1017,
  "visibility_sm": 10,
  "flight_category": "VFR"
 }
}
```

## More

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