METAR / SPECI (ICAO)
Required roles:
AIS PIB API— Roles
Base endpoint:https://ais-pib-api.ibosoft.net.tr:2087/opmet-decoder-metar-speci-icao
Reference documents: ICAO Doc 10157 PANS-MET, Ed. 1 (27/11/25) · ICAO Doc 8400 PANS-ABC, Ed. 9, Amend. 33 (8/11/18) · ICAO Annex 3, Ed. 20, Amend. 79 (5/11/20)
Attribution: showibonav.aeroor "Decoded by Ibosoft" wherever decoded output is displayed
Data sources: none — decodes the message supplied in the request.
Last updated: 17 OCT 2026About the reference documents: Related Documents and Resources
Decodes a METAR or SPECI report into readable fields, following the PANS-MET template strictly. Optionally returns machine-readable values (parsed) and the position of every decoded token in the message (positions).
To get reports to decode, see METAR / SPECI. For U.S. format reports use METAR / SPECI (FAA); MET Format Check tells which decoder fits an aerodrome.
Endpoints
POST /opmet-decoder-metar-speci-icao/decode?pre_2021=false&parsed=false
Content-Type: application/json
{ "raw": "<METAR or SPECI text>" }
Parameters
| Parameter | In | Default | Description |
|---|---|---|---|
raw |
body | — | Report text, at least 10 characters. Line breaks, extra spaces, lower case and a final = are accepted. |
pre_2021 |
query | false |
true: decode with the provisions in force until 3 November 2021 — Annex 3, Ed. 20, Amend. 79 (adds the State of the runway group, removed by Amend. 80) |
parsed |
query | false |
true: add the parsed object with machine-readable values |
How the template is processed
The decoder reads the message against PANS-MET Table A2-2, element by element, in template order:
- Field names and wording come from the template and the related PANS-MET paragraphs: each output key is the element name of the template; values use the template's terms and units; trend box headers use the meanings of Table A2-3 and the definitions of 4.2.3. Abbreviations are expanded as defined in PANS-MET and PANS-ABC (Doc 8400).
- M (mandatory) elements are always in the output. If an element is missing, or its value does not fit the template, it is
null([]for lists). - C (conditional) and O (optional) elements are in the output only when present in the message.
- Lists: elements that can repeat are arrays, one entry per group —
Runway visual range(one per runway, up to four),Present weather,Recent weather,Cloud(one per layer). - Trend forecast (O): each change group (
NOSIG,BECMG,TEMPO) becomes one box inforecast_groups, with a header (label) and only the elements it contains. Trend groups never mix into the observed values or intoparsed. - Strict template: a value that does not follow the template is not guessed. It is listed under
Undecodable elements; neighbouring undecodable groups form one entry (e.g.RMK RWY36 240/16). Remarks (RMK …) are not part of the template and always appear there. - Special cases:
NILends the report (M elementsnull); withCAVOK, visibility readsCAVOK (…)and cloud is[]; wind00000isCalm; visibility9999is10 km or more.
For the full list of elements and their templates, see PANS-MET Table A2-2.
Response
Example — PANS-MET Example A2-1:
METAR YUDO 221630Z 24004MPS 0600 R12/1000U DZ FG SCT010 OVC020 17/16 Q1018 BECMG TL1700 0800 FG BECMG AT1800 9999 NSW
{
"Type of report": "METAR",
"Location indicator": "YUDO",
"Time of observation": "Day 22, 16:30 UTC",
"Surface wind": "04 m/s from 240°T",
"Visibility": "600 m",
"Runway visual range": ["R12/1000 m upward tendency"],
"Present weather": ["Drizzle", "Fog"],
"Cloud": ["Scattered [3/8, 4/8] at 1000 ft AAL", "Overcast [8/8] at 2000 ft AAL"],
"Air temperature": "17°C",
"Dew-point temperature": "16°C",
"Pressure values": "QNH 1018 hPa",
"forecast_groups": [
{
"label": "Trend Forecast: Becoming - until 17:00 UTC - (The change is forecast to commence at the beginning of the trend forecast period and be completed by 17:00 UTC) (Note: …)",
"label_start": 75, "label_end": 87,
"Visibility": "800 m",
"Weather": ["Fog"]
},
{
"label": "Trend Forecast: Becoming - at 18:00 UTC - (The change is forecast to occur at 18:00 UTC (specified time)) (Note: …)",
"label_start": 96, "label_end": 108,
"Visibility": "10 km or more",
"Weather": ["Nil significant weather"]
}
],
"marker_positions": [{"start": 75, "end": 87}, {"start": 96, "end": 108}],
"positions": [{"start": 0, "end": 5}, "…"],
"raw": "METAR YUDO 221630Z …"
}
| Key | Description |
|---|---|
| element keys | Decoded elements, in template order |
forecast_groups |
Trend boxes (only when the report has a trend): label, label_start/label_end (header span in the message) and the box elements |
marker_positions |
Header spans of the trend boxes |
Undecodable elements |
Groups that do not follow the template (only when there are any) |
positions |
Character spans {start, end} in the normalized message (single spaces, upper case, no final =), one per decoded value in output order, then one per undecodable entry. Use them to highlight the source token of each value. When one token gives two values (e.g. 17/16 → air and dew-point temperature) the span is repeated. |
raw |
The message as received |
parsed |
Only with parsed=true (see below) |
parsed
Machine-readable values of the observation (never of the trend):
| Field | Type | Description |
|---|---|---|
utc_day, utc_time |
int, string | Day and time of observation ("HHMM") |
wind_direction |
int, "variable", null |
Degrees true; "variable" for VRB; null for calm or missing |
wind_speed, wind_speed_unit |
int, string | Speed and "KT" / "MPS" |
wind_gust_speed, wind_gust_speed_unit |
int, string | Gust, if reported |
wind_variable_direction_1, wind_variable_direction_2 |
int | Extremes of the directional variation (nnnVnnn) |
visibility |
string | Decoded visibility |
lowest_cloud_base, lowest_cloud_base_unit |
int, string | Lowest cloud base in "FT" (vertical visibility excluded) |
special_condition |
string | "CAVOK" or null |
qnh, qnh_unit |
float, string | QNH and "hPa" |
temperature, dewpoint (+ _unit) |
float, string | °C |
All fields are null when the value is not in the report.
Errors
| Code | Meaning |
|---|---|
400 |
The message could not be parsed at all; detail explains why |
422 |
raw is missing or shorter than 10 characters |
An undecodable group is not an error: the response is 200 and the group is listed under Undecodable elements.