Data API Help

The Data API Builder uses the Swagger UI Tool to allow users to build their own queries and test them. When you click on a section "GET URL", it expands out to give some brief documentation of the script plus a list of parameters that can tailor the output.

Try It Out

In order to test the API, click on the "Try It Out" button. This will make each of the selectors and entry boxes active. In many cases, there will be examples available so you can select one if you are not clear on what to enter. Once the parameters are entered, click on the "Execute" button.The response will show up below. The "Response body" is the data. The "Response headers" is extra information sent back from the server. The Builder will also give a sample "curl" string (wget would be similar) and the "Request URL" if you were wanting to put this into the browser's address bar to test.

API Parameter Documentation

METARs

/cgi-bin/data/metar.php?url_options...

Here is a list of the URL options:

  • ids=id[,id...] - list of stations to query (default is @TOP).
  • output={data|condense|board} - output type (default is data).
  • format={raw|decoded|html|xml|iwxxm|json} - output format (default is raw).
  • version=ver - version of output (for IWXXM, default is 3)
  • taf={on|off} - whether to include TAF (default is off).
  • hours=hours - hours back to search (default is the latest).
  • date=yyyymmdd_hhnn - end date (default is current).
  • latest=min - search for latest min minutes of data (def is off).
  • order=type - order to output (def is -obs - newest to oldest).
  • bbox=minLat,lonLon,maxLat,maxLon - bounding box to filter sites (def is none).

The IDs are:

  • a list of ICAO 4 letter IDs
  • a state prefixed with a @ as in "@OH"
  • a country prefixed with an # as in "#CA" for Canada
  • a preset region:
    • @TOP - top 39 airports in US
    • @TOPE - top airports in the eastern US
    • @TOPC - top airports in the central US
    • @TOPW - top airports in the western US
    • @ZSE, @ZOA, etc - selected airports in the Seattle or Oakland ARTCC (each ARTCC can be used)
    • @USE, @USN, @USS, @USW, @USP - major airports in the each region US (those that report TAFs)

The formats are:

  • raw - original text data (TAC)
  • decoded - text output of decoded data
  • html - HTML formatted output of decoded data
  • xml - XML output based on dataserver schema
  • iwxxm - Standard IWXXM output from decoded data
  • json - JSON formatted output of deceded data

The order is:

  • obs - by observation time, oldest to newest
  • -obs - by observation time, newest to oldest (def)
  • ids,obs - by ICAO Id and then by observation time
  • ids,-obs - by ICAO Id and then by observation time, newest to oldest

TAFs

Here is a list of the URL options:

  • ids=id[,id...] - list of stations to query (default is @TOP).
  • output={data|condense|board} - output type (default is data).
  • format={raw|decoded|html|xml|iwxxm|json} - output format (default is raw).
  • metar={on|off} - whether to include METAR (default is off).
  • date=yyyymmdd_hhnn - end date (default is current).
  • time={issue|valid} - type of time search (default is issue time).
  • latest=min - search for latest min minutes of data (def is off).
  • order=type - order to output (def is -obs - newest to oldest).
  • bbox=minLat,lonLon,maxLat,maxLon - bounding box to filter sites (def is none).

PIREPs

Here is a list of the URL options:

  • id=id - Specifies the stations to center the retrieval
  • distance=radius - Specifies the distance from the station to retrieve
  • format={raw|decoded} - Specifies the format of output as either raw data or decoded output. The default is raw.
  • age=hours - Specifies the age of the reports in number of hours to show. The default is 1.5.
  • type={all|turb|icing|wx} - Specifies the type of report. The default is all.
  • date=yyyymmddhhnn - This selects a specific date and time to display. ADDS saves several days of report data so this can be used to get older data. The default is current.

Example: /cgi-bin/data/pirep.php?id=KDEN&format=decoded&distance=300

CONUS AIRMETs/SIGMETs

Here is a list of the URL options:

  • type={all|conv|turb|icing|ifr} - This specifies the type of SIGMET to display.
    • all - All hazards on plot (Default)
    • conv - Only convective SIGMETs and outlooks
    • turb - Only turbulence AIRMETs/SIGMETs
    • icing - Only icing AIRMETs/SIGMETs
    • ifr - Only IFR and mountain obscuration AIRMETs
  • region={all|bos|mia|chi|dfw|slc|sfo} - This specifies the region the SIGMET is valid for.
    • all - All regions (Default)
    • bos - NE - Boston
    • mia - SE - Miami
    • chi - NC - Chicago
    • dfw - SC - Dallas Fort Worth
    • slc - MT - Salt Lake City
    • sfo - WC - San Francisco

International SIGMETs

Here is a list of the URL options:

  • type={all|conv|turb|ice|mtw|sand|trop|ash} - This specifies the type of SIGMET to display. The default is all.
    • all - All hazards on plot (Default)
    • conv - Only convective SIGMETs and outlooks
    • turb - Only turbulence SIGMETs
    • ice - Only icing SIGMETs
    • ifr - Only IFR and mountain obscuration SIGMETs
    • sand - Only dust and sand storm SIGMETS
    • trop - Only tropical SIGMETS
    • ash - Only volcanic ash SIGMETs
  • region={all|asia|aust|afr|eur|namer|samer|pac} - This specifies the region the SIGMET is valid for. The default is all.
    • all - All regions (Default)
    • asia - Asian region. FIR ICAO identifier starts with O,R,U,V,Z
    • aust - Australian region. FIR ICAO identifier starts with A,W,Y
    • afr - African region. FIR ICAO identifier starts with D,F,G,H
    • eur - European region. FIR ICAO identifier starts with B,E,L
    • namer - North American region. FIR ICAO identifier starts with C,K,M,T
    • samer - South American region. FIR ICAO identifier starts with S
    • pac - Pacific region. FIR ICAO identifier starts with P,R,N

G-AIRMETs

Here is a list of the URL options:

    Center Weather Advisories

    Here is a list of the URL options:

    • loc={all|cwsu} - This specifies the CWSU that issued the CWA. The default is all.
    • hazard={all|ts|turb|ice|ifr} - This specifies the hazard. The default is all.

    FB Wind Temperature Data

    Here is a list of the URL options:

    • region={all|bos|mia|chi|dfw|slc|sfo|alaska|hawaii|other_pac} - This selects the specific region to display.
    • level={low|high} - This selects the level.
    • fcst={06|12|24} - This selects the forecast time.

    Area Forecast (OCONUS Only)

    /cgi-bin/data/areafcst.php?url_options...

    Here is a list of the URL options:

    • region=region - This selects the specific region to display. The regions are:
      • aknorth - Alaska North
      • akcentral - Alaska Central
      • akaleutian - Alaska Aleutian
      • aksouthwest - Alaska Southwest
      • aksouth - Alaska South
      • aksoutheast - Alaska Southeast
      • akpanhandle - Alaska Panhandle
      • carib - Caribbean
      • gulf - Gulf of Mexico
      • hawaii - Hawaii

    Area Forecast Discussions

    /cgi-bin/data/fcstdisc.php?url_options...

    Here is a list of the URL options:

    • cwa=WFO - This selects the specific WFO to display. The default is KEAX.
    • type=[afd|af] - The product type: afd is the aviation section only, af is the full discussion. Default is afd
    • date=yyyymmdd_hhnn - Valid date. Default is current.
    • region=reg - Display regional area forecast instead. See areafcst.php.

    Station Info

    /cgi-bin/data/stationinfo.php?url_options...

    Here is a list of the URL options:

    • ids=id,... - list of stations to query
    • bbox=minLat,minLon,maxLat,maxLon - bounding box to filter sites (def is none).
    • format=type - output format: decoded,json,xml

    Airport Info

    /cgi-bin/data/airport.php?url_options...
    • ids=id,... - list of stations to query
    • bbox=minLat,minLon,maxLat,maxLon - bounding box to filter sites (def is none).
    • format=type - output format: decoded, json, geojson
    • filter=type - filter type
      type=prior - progressive disclosure based on type of airport
    • density=num - adjustment to filter (-1 = less, 1 = more)
    • zoom=level - zoom level for filtering

    Navigational Aid Info

    /cgi-bin/data/navaid.php?url_options...
    • ids=id,... - list of stations to query
    • bbox=minLat,minLon,maxLat,maxLon - bounding box to filter sites (def is none)."
    • format=type - output format: decoded, json, geojson
    • filter=type - filter type
      type=prior - progressive disclosure based on type of airport
    • density=num - adjustment to filter (-1 = less, 1 = more)
    • zoom=level - zoom level for filtering

    Navigational Fix Info

    /cgi-bin/data/fix.php?url_options...
    • ids=id,... - list of stations to query
    • bbox=minLat,minLon,maxLat,maxLon - bounding box to filter sites (def is none).
    • format=type - output format: decoded, json, geojson
    • filter=type - filter type
      type=prior - progressive disclosure based on type of airport
    • density=num - adjustment to filter (-1 = less, 1 = more)
    • zoom=level - zoom level for filtering

    Features Info

    /cgi-bin/data/feature.php?url_options...
    • bbox=minLat,minLon,maxLat,maxLon - bounding box to filter sites (def is none).
    • format=type - output format: decoded, json, geojson
    • filter=type - filter type
      type=prior - progressive disclosure based on type of airport
    • density=num - adjustment to filter (-1 = less, 1 = more)
    • zoom=level - zoom level for filtering

    Obstacle Info

    /cgi-bin/data/obstacle.php?url_options...
    • bbox=minLat,minLon,maxLat,maxLon - bounding box to filter sites (def is none).
    • format=type - output format: decoded, json, geojson
    • filter=type - filter type
      type=prior - progressive disclosure based on type of airport
    • density=num - adjustment to filter (-1 = less, 1 = more)
    • zoom=level - zoom level for filtering

    Dataserver

    /cgi-bin/data/dataserver.php?url_options...

    Here is a list of the URL options:

    • dataSource=type - source of data: metars, tafs, airsigmets, gairmets, stationinfo
    • requestType=string - type of request: retrieve
    • stationString=id,... - list of stations to query
    • startTime=date - start time of query
    • endTime=date - end time of query
    • hoursBeforeNow=hours - number of hours before now to query
    • format=type - output format (xml, csv)
    • mostRecent=true|false - output only most recent of any station
    • mostRecentForEachStation=constraint|postfilter - output most recent for each station. Constraint uses mostRecent flag in database, postfilter searches for most recent after query
    • minLat=lat -
    • maxLat=lat -
    • minLon=lon -
    • maxLon=lon - Specifies bounding box
    • radialDistance=dist;lon,lat - Specifies bounding box by lat,lon and radial distance in sm