FlightAware

Live Flight Tracking.

Join FlightAware (Free Registration) | Forgot Username/Password Cancel
US Flag 


 

Airport Tracker/Info


-or-


 

FlightXML 2.0 Documentation

About

Using the FlightXML API, programs can query the FlightAware live flight information and recent history datasets.

Queries for in-flight aircraft return a set of matching aircraft based on a combination of location, flight or tail number, origin and/or destination airport, aircraft type, and/or a low-to-high range of altitude and/or ground speed, among others. For each matching aircraft, data returned includes the flight or tail number, the aircraft type, origin and destination, time the last position was received, and the longitude, latitude, groundspeed, and altitude of that position. Matching flights' flight tracks can be requested as well.

For airports, FlightXML queries can return a list of scheduled flights, flights that have departed, flights that are enroute to the airport, and flights that have arrived at the airport.

Example Applications

Possible uses of FlightXML include:

  • Integrate FlightXML radar data with your existing flight dispatch software.
  • Create a customized alerting system based on the current status of your fleet.
  • Streamline flight planning by showing common routes as cleared by air traffic control between two airports.
  • Add real flight data to your simulations.
  • Show flight tracks in Google Earth.
  • Create visualizations of traffic patterns.
  • Add live flight information to your company's website.

Authentication

To access FlightXML 2.0, all requests must include a username and FlightXML Key (don't have one?). This data is transmitted via the "basic" HTTP Authentication standard, which is sent to the FlightXML server as a part of each HTTP request.

The web service libraries available in most programming languages allow you to directly specify a username and password as an argument for the request, so that the authentication is transparent to your application as it makes requests. However, with some libraries it may be necessary to manually encode the "user:key" in base64 and send the result in the "Authorization" header as part of each HTTP request.

If data security is a concern, all FlightXML services are also available over SSL by simply substituting "https" as the protocol for any flightxml.flightaware.com URLs.

Web Services / SOAP / WSDL

The primary protocol recommended for use with FlightXML 2.0 is the "Simple Object Access Protocol" (SOAP). Most modern SOAP implementations support use of "Web Services Description Language" (WSDL) definition file, which greatly simplifies accessing web services.

View: FlightXML 2.0 WSDL XML

Although you can read the WSDL and generate SOAP queries manually, it is recommended that you develop your applications using a SOAP library that automatically parses the WSDL and populates your application namespace with the FlightXML functions.

It is strongly suggested that you ensure that your applications cache the WSDL file so that it is not necessary to fetch and parse the WSDL for every request or instance of your application. This will vastly improve the performance and efficiency of your application.

The FlightXML 2.0 WSDL uses the "Document/Literal wrapped" method for encoding SOAP requests and responses. This is a newer method that recent SOAP industry standards dictate should be used instead of the older "RPC/Encoded" method that was used by the FlightXML 1.0 WSDL. Most modern SOAP client libraries fully support this newer method, although some older SOAP libraries are not yet compatible. The SOAP client libraries listed in the examples section have been tested to be compatible.

REST / JSON

FlightXML 2.0 can also be accessed using a light-weight "Representational state transfer" (REST) inspired protocol that returns its responses encoded in "JavaScript Object Notation" (JSON) format. This allows FlightXML to be used in environments in which it is inconvenient or impossible to invoke SOAP services, such as mobile phone applications, web browser applications, or server-side JavaScript environments.

To access any method, simply perform either a GET or POST request to http://flightxml.flightaware.com/json/FlightXML2/METHODNAME using standard CGI-style representation of the arguments. All requests made must supply the username and API Key as a "basic" Authorization HTTP header.

For example, the following URL is how you might request the current weather at John F. Kennedy airport (KJFK) in New York: http://flightxml.flightaware.com/json/FlightXML2/MetarEx?airport=KJFK&startTime=0&howMany=1&offset=0

Requests can also optionally returned in "JSONP" format, allowing a web page to load the response in a way that avoids the same-domain security restrictions enforced by some browsers. Simply specify the optional argument "jsonp_callback" with a value that is the name of the JavaScript function that should be invoked with the JSON data.


Start building a great new aviation app with FlightXML 2.0.

(view legacy 1.0 documentation instead)

Examples (SOAP / WSDL)

Microsoft .NET

PHP

Perl

Java

Tcl

Python

Ruby

ColdFusion

Examples (REST / JSON)

JavaScript

Changelog

The following list summarizes the functional changes between FlightXML 1.0 and FlightXML 2.0 to date:

  • (2010-06) Renamed METAR to Metar, TAF to Taf, NTAF to NTaf
  • (2010-06) Renamed MapFlight_Beta to MapFlight, countAirportOperations to CountAirportOperations, blockIdentCheck to BlockIdentCheck
  • (2010-06) Added FleetScheduled
  • (2010-06) Added CountAllEnrouteAirlineOperations
  • (2010-06) Added AllAirlines
  • (2010-06) Added AirlineInfo
  • (2010-06) Added beta DistressedAircraftDetector (since removed)
  • (2010-06) Added RoutesBetweenAirportsEx
  • (2010-06) Added GetHistoricalTrack
  • (2010-06) Added SetMaximumResultSize
  • (2010-06) Added MetarEx
  • (2010-06) Added SearchBirdseyeInFlight
  • (2010-06) Changed RoutesBetweenAirportsEx to return ArrayOfRoutesBetweenAirportsExStruct and add min/max altitude, last departure, next_offset
  • (2010-06) Added SearchBirdseyePositions
  • (2010-07) Added MapFlightEx
  • (2010-07) Added FlightInfoEx and GetFlightID
  • (2010-07) Removed beta DistressedAircraftDetector, which can be implemented in terms of SearchBirdseyeInFlight with "{!= physClass P} {> circles 3}"
  • (2010-07) Added DecodeFlightRoute and DecodeRoute
  • (2010-07) Changed GetHistoricalTrack to take faFlightID as argument
  • (2011-02) Added AirlineFlightInfo
  • (2011-02) Changed GetHistoricalTrack, DecodeFlightRoute, MapFlightEx, and AirlineFlightInfo to allow "ident@departureTime" syntax to optionally be used instead of a faFlightID, saving the need to explicitly use GetFlightID first.
  • (2011-02) Changed FlightInfo, FlightInfoEx, InFlightInfo, GetLastTrack, GetFlightID, TailOwner, and MapFlight to handle codeshare or alternate ident lookups automatically. GetHistoricalTrack, DecodeFlightRoute, MapFlightEx, and AirlineFlightInfo allow codeshare and alternte idents when using the "ident@departureTime" syntax.
  • (2011-03) Added AirlineFlightSchedules (since removed)
  • (2011-04) Removed AirlineFlightSchedules
  • (2011-05) Added AirlineInsight
  • (2011-07) Added InboundFlightInfo. Enhanced SearchBirdseyeInFlight to add the special operators: orig_or_dest, airline, aircraftType, ident.
  • (2011-09) Introduced support for REST/JSON clients of all current FlightXML2 methods.
  • (2011-10) Introduced support for pushed FlightXML flight alerts. Added GetAlerts, SetAlert, DeleteAlert, RegisterAlertEndpoint methods.
  • (2012-03) Added support for Australian airspace. To receive these flights, you must use the API key request page to obtain a new key and agree to the distribution terms. Otherwise such flights may appear in your results with an ident of "BLKFA" and its other fields will be blank/zero.
  • (2012-04) Enhanced FlightInfoEx to allow a faFlightID to be requested.
  • (2012-04) Changed AirportInfo to now return timezones conforming to the official IANA zoneinfo database.
  • (2012-04) Changed FlightInfo and FlightInfoEx to now return results sorted by filed_departuretime instead of file_time.
  • (2012-04) Changed RoutesBetweenAirportsEx to now allow maxDepartureAge and maxFileAge to be specified as blank to search the maximum routes available.