PlaneXML API Reference
Quick list:
- AirportInfo
Returns either one or more airports based on the specified identifier(s). - AirportsNear
Returns a list of airports near the specified lat/lon and radius. - FlightsNear
Returns a list of active flights near the specified lat/lon and radius. - RecentFlights
Returns the last 10 flights made by a given tail number or flight ID. - FlightInfo
Returns complete flight data on a specific flight. - FlightPath
Returns the complete flight path data for a flight. - FlightPlans
Returns a list of flight plans on file based on the specified query. - FlightStatus
Returns dynamic (changing) data on a flight. - PhotoList
Returns a list of available photos of this aircraft. - Registration
Returns the registration information on an aircraft. - Search
Searches for flights based on the specified query.
Contents
Introduction
The PlaneXML API is designed to be easy to understand and provide some great flexability, and yet still maintain some sense of efficiency (as much as is possible, given the XML standard).
As you can see in our sample HelloFlight application, the first function you might want to check out is FlightInfo. It takes 3 parameters (described in detail here). The first is a flight ID or database serial number. The second is a boolean value which specifies if you want extra details associated with this flight returned, such as the airport names and owner information. The 3rd parameter is another boolean value which specifies if you want Dynamic information returned.
Static flight information is data that is not expected to change frequently during the course of a flight, such as the origin and destination airports, registered owner name, aircraft type, departure time, etc.
Dynamic information (also Status information) is information that is expected to change, such as the flight's altitude, lat/lon position, groundspeed, course, etc.
Separating this information allows the API to omit excessively wordy data transfers between your application and the fboweb servers by allowing developers to get just the information they need. It also permits developers to poll a list of aircraft efficiently, and more often, for simple position information, without constantly transmitting information that they don't necessarily need.
Methods
- FlightInfo ( ident As string , IncludeDetails As boolean , IncludeDynamicInfo As boolean )
Returns complete flight data on a specific flight.
This function returns an FIStatic structure containing information on the specified flight, such as the airport pairs, departure time, and other items. If IncludeDetails = True, extra details such as the Airport Name, Registered Owner Name, and other information are also returned. If IncludeDynamicInfo = True, this function populates the FIDynamic field of the structure, which includes the flight's current position, altitude, course, and speed, etc.
- FlightPath ( ident As string )
Returns the complete flight path data for a flight.
This function returns the complete flight path data for a specific flight, which consists of an array of positional information.?Ident is either the text string flight ID of a flight, or the numeric database serial number of a flight (for historical flights).
- FlightPlans ( query As string )
Returns a list of flight plans on file based on the specified query.
This function returns an array of FlightPlan(s) on file for flights matching the specified query conditions.
- FlightStatus ( ident As string )
Returns dynamic (changable) data on a flight.
This function returns only the dynamic, changable information on a given flight, returning an FIDynamic structure.?Ident is either the text string flight ID of a flight, or the database serial number of a flight (for historical flights).
- Registration ( ident As string )
Returns the registration information on an aircraft.
This function returns a Registry structure, which provides ownership details for a specific aircraft.?Ident is the text string flight ID of a flight (only North American "N-Numbers" supported at this time).
- PhotoList ( ident As string )
Returns the registration information on an aircraft.
The main fboweb website provides the ability for users to upload photographs of flights and aircraft. This function returns an array of Photo structures, each one containing specifics about a particular photo available on any given aircraft.?Ident is a text string flight ID of a flight.
- RecentFlights ( ident As string)
Returns a list of the last 10 flights made by the specified tail number/flight ID.
This function returns an array of PastFlight structures, consisting of the 10 most recent past-flights from the long term history database that matched the flight identifier specified in ident
- Search ( query As string , IncludeDetails As boolean , IncludeDynamicInfo As boolean , page As long )
Returns a list of flights from the short-term database, matching the query.
This function returns an array of FIStatic(s), each optionally populated with detailed information (if IncludeDetails is true), and optionally with the FIDynamic fields populated (if IncludeDynamicInfo is true). A maximum of 20 records are returned at a time... to see subquent pages (ie, the next 20), increment the page number. Pages start at 1; if less than 20 records are returned, then there is no more data. If 20 records are return, there may be more data in the query... so increment the page counter and make the call again.
- FlightsNear ( lat As double , lon As double , radius As long )
Returns a list of active flights within the specified radius of the lat/lon position.
This function returns an array of FIStatic(s) containing a list of active flights near the position specified by the given lattitude and longitude. Flights must also be within the radius given. The lat/lon formats are specified in decimal notation, so - for example, a lattitude of 28.2666 and a longitude of -81.4666 would be somewhere over central Florida. The maximum allowed radius is 20 nm.
- AirportInfo ( idents As string)
Returns a list of airports with the specified IDs.
This function returns an array of Airport(s) containing a list of airports that match the IDs provided. To return a multiple airports, separate each identifier with a comma. To return a single airport, specify only the one airport ID. For example, an idents string of ORL,FXE,TPA would return an array of all three airports. An idents string of PVD would return an array of just the one airport.
- AirportsNear ( lat As double , lon As double , radius As long )
Returns a list of airports within the specified radius of the lat/lon position.
This function returns an array of Airport(s) containing a list of airports within the specified radius of the given lattitude and longitude. The lat/lon formats are specified in decimal notation, so - for example, a lattitude of 28.2666 and a longitude of -81.4666 would be somewhere over central Florida.
Structures
FIStatic StructureItems marked with a d are optional details that are included when specifically asked for (usually as a parameter passed to the function). This helps keep network traffic down, and helps make things a little more efficient when working with larger datasets.
Ident As String
PrimaryPhoto As String
HistoryNumber As String
RadioCall As String?d
BBOX As String
Owner As String?d
Status As FlightStatusType
Index As String
DepartureTime As String
Dept As String
DeptName As String?d
DeptLat As String?d
DeptLon As String?d
Dest As String
DestName As String?d
DestLat As String?d
DestLon As String?d
ArrivalTime As String
ACType As String
ACTypeString As String?d
EquipCode As String
VFR As String
Historical As Int16
FIDynamic As FIDynamic
Ident As String
Gets the current flight identifier for the flight.
PrimaryPhoto As String
Gets the reference key of the primary photo. Use this when looking to pull down thumbnails or photos from the fboweb.com website. This key gets specified in the URL http://photos.fboweb.com/f/th2.ashx?k=nnnnnnnn where nnnnnnnn is the key.
HistoryNumber As String
Gets the History database serial ID number for this flight. When a flight is stored in the long-term history database, it is assigned a numerical serial index number that can be used to later retrieve the flight. This number can be specified in the place of an aircraft identifier when used with functions that pull up flight information, such as FlightInfo, etc.
RadioCall As String?d
Gets the Radio Call for the airline. See the Airline Call signs heading of the Wikipedia entry.
BBOX As String
Gets the initial BBOX for the flight, which consists of a lattitude/longitude pair of coordinates.
Owner As String?d
Gets the current aircraft owner from the fboweb registration database.
Status As FlightStatusType
Gets the current flight status code. See the FlightStatusType definition for possible values and their enumerations.
Index As String
Gets the current database Index field for the flight. (not presently supported)
DepartureTime As String
Gets the current departure time as a string.
Dept As String
Gets the current departure airport identifier.
DeptName As String?d
Gets the current departure airport name.
DeptLat As String?d
Gets the current departure airport latitude.
DeptLon As String?d
Gets the current departure airport longitude.
Dest As String
Gets the current destination airport identifier.
DestName As String?d
Gets the current destination airport name.
DestLat As String?d
Gets the current destination airport latitude.
DestLon As String?d
Gets the current destination airport longitude.
ArrivalTime As String
Gets the current arrival time as a string.
ACType As String
Gets the current aircraft type code.
ACTypeString As String?d
Gets the current aircraft type description.
EquipCode As String
Gets the equipment code qualifier.
VFR As Int16
Returns 1 (true) if the flight is VFR or if no IFR flight plan is associated with this flight
Historical As Int16
Returns 1 (true) if the flight was pulled from the historical database. See the overview explanation for more information.
FIDynamic As FIDynamic
Returns FIDynamic structure for this flight.
FIDynamic StructureIdent As String
TimeStamp As Long
ArrivalMins As Long
Alt As String
GS As String
Status As FlightStatusType
Lat As String
Lon As String
Course As Long
ClimbDescend As Long
StaticRefresh As Long
Ident As String
The flight identifier for the flight.
TimeStamp As Long
The current timestamp (in Unix epoch time) of the most recent information for this flight. We chose this format for compactness and efficiency.
ArrivalMins As Long
The number of minutes until arrival. If negative, the number of minutes since the flight landed.
Alt As String
The current altitude string.
GS As String
The current groundspeed string.
Status As FlightStatusType
The current flight status. See the FlightStatusType enumeration for specifics.
Lat As String
The current latitude of the flight in decimal notation (as a double).
Lon As String
The current longitude of the flight in decimal notation (as a double).
Course As Long
The current heading of the flight.
ClimbDescend As Long
The current climb/descend indicator for the flight. If 1, the flight is climbing (the altitude in this position report is higher than the last altitude). If 0, the flight is level. If -1, the flight is descending.
StaticRefresh As Long
The current static refresh indicator. This flag returns 1 (true) if the static information for this flight has changed since the flight took off. This can occurr when a controller makes a typo on the airframe type, for example, or if the flight is diverted to a new destination airport.
Airport StructureProvides basic information on an airport.
Ident As String
ICAO As String
Location As String
Lat As Double?d
Lon As Double
Elev As Int32?d
GMTOffset As Short
DST As Short
Ident As String
The FAA identifier for this airport.
ICAO As String
The ICAO identifier for this airport.
Location As String
The city and state the airport serves(/is located in).
Lat As String
The global lattitude of the airport.
Lon As String?d
The global longitude of the airport.
Elev As String
The elevation (in feet) of the airport.
GMTOffset As String
A number representing the hours offset from Greenwich Mean Time (aka Zulu time)
DST As String
1 if this airport observes daylight savings time, 0 if otherwise.
PastFlight StructureSpecific details on a flight that has occurred in the past, pulled from the long-term History database.
Ident As String
Dept As String
Dest As String
DepartureTime As String?d
ArrivalTime As String
Center As String?d
ACType As String
EquipCode As String
Index As Long
Status As Int16
Ident As String
The flight identifier for the flight.
Dept As String
The 3 or 4 letter FAA identifier of the departure airport.
Dest As String
The 3 or 4 letter FAA identifier of the destination airport.
DepartureTime As String
The time and date of departure, in Greenwich Mean Time.
ArrivalTime As String?d
The time and date of arrival, in Greenwich Mean Time.
Center As String
The FAA center ID of the center facility that started the flight.
ACType As String
The FAA aircraft type identifier code.
EquipCode As String
The FAA aircraft equipment identifier code.
Index As Long
The History database serial ID number of the flight.
Status As Int16
The termination status of the flight.
FlightPlan StructureDetails of an FAA flight plan on file for a particular aircraft.
Ident As String
Dept As String
Dest As String
FileTime As Long
DepartureTime As Long?d
ETA As Long
Center As String?d
Type As String
Route As String
Status As Int16
Ident As String
The flight identifier for the flight.
Dept As String
The 3 or 4 letter FAA identifier of the departure airport.
Dest As String
The 3 or 4 letter FAA identifier of the destination airport.
FileTime As Long
The time and date the flight plan was filed. Unix timestamp, in Zulu/Greenwich Mean Time.
DepartureTime As Long
The time and date of departure. Unix timestamp, in Zulu/Greenwich Mean Time.
ETA As Long
The estimated time and date of arrival. Unix timestamp, in Zulu/Greenwich Mean Time.
Center As String
The FAA center ID of the center facility that started the flight.
Type As String
The FAA aircraft type identifier code.
Route As Int16
The flight plan route for the flight.
Status As Int16
The termination status of the flight.
FlightStatusType EnumerationThe FlightStatusType enumeration is an integer that identifies the current state of the flight. The following definitions apply:
Scheduled (Value: 2); generally reserved for commercial flights, this value means the aircraft is scheduled to depart within 24 hours, yet no flight plan has been filed.
Filed (Value: 4); the flight has a flight plan on file and has not yet departed
Active (Value: 5); the flight is active and in the air
Landed (Value: 9); the flight has landed at its destination
Unknown (Value: 0); the status of the flight cannot be determined, for one reason or another
Timeout (Value: 99); no flight tracking data has been received on the flight within the last few minutes
Cancelled (Value: 10); the flight has cancelled it's flight plan
All other FlightStatusType enumerations are presently not used.
Registry StructureNumEngines As Int32
EngineType As Int32
AircraftType As Int32
NumSeats As Int32
Category As Int32
AvgCruiseSpeed As Int32
SerialNumber As String
CategoryText As String
EngineTypeText As String
AircraftTypeText As String
RegOwnerName As String
RegOwnerAddress1 As String
RegOwnerAddress2 As String
RegOwnerCity As String
RegOwnerState As String
RegOwnerZip As String
AcftMfgName As String
AcftModelName As String
WeightClass As String
YearMfr As String
NumEngines As Int32
Number of engines on the aircraft.
EngineType As Int32
0 - None
1 - Reciprocating
2 - Turbo-prop
3 - Turbo-shaft
4 - Turbo-jet
5 - Turbo-fan
6 - Ramjet
7 - 2 Cycle
8 - 4 Cycle
9 - Unknown
AircraftType As Int32
1 - Glider
2 - Balloon
3 - Blimp/Dirigible
4 - Fixed wing single engine
5 - Fixed wing multi engine
6 - Rotorcraft
7 - Weight-shift-control
8 - Powered Parachute
9 - Gyroplane
NumSeats As Int32
Number of seats on board the aircraft.
Category As Int32
1 - Land
2 - Sea
3 - Amphibian
AvgCruiseSpeed As Int32
Average cruising speed of the aircraft.
SerialNumber As String
Aircraft serial number (airframe)
CategoryText As String
EngineTypeText As String
AircraftTypeText As String
Text equivalents of Category, EngineType, and Aircraft Type
RegOwnerName As String
RegOwnerAddress1 As String
RegOwnerAddress2 As String
RegOwnerCity As String
RegOwnerState As String
RegOwnerZip As String
Registered owner information
AcftMfgName As String
Aircraft manufacturer.
AcftModelName As String
Aircraft model name.
WeightClass As String
1 - Up to 12,499
2 - 12,500 - 19,999
3 - 20,000 and over.
YearMfr As String
Original year of manufacture of aircraft.
Definitions
| ident | Either a valid aircraft tail number (ie, N12345), FAA flight ID (ie, AAL1410), or a database serial number of a past flight. |
| database serial number | Once a flight passes out of the "current" database (flights that have occurred within the last 6 hours), it is archived in the long-term History database. When this is done, it is assigned a database serial number, a long integer that uniquely identifies the specific flight. This number can be used in some functions in the place of a flight identifier. |
Query Reference
The query as specified for the flight search functions takes the form of a standard C expression, allowing minimal use of complex expressions. For example:
type=='P28R' && (dest=='ORL' || dept=='ORL') && status==5
Would return a list of all currently active Piper Arrow aircraft that either left or are headed for Orlando Executive Airport.
alt>30000 && dest=='MCO' && status==5
Would return a list of all currently active aircraft destined for Orlando International Airport and are higher than 30,000 feet.
Valid search terms for the Search function:
| dest | Destination airport identifer (can only be specified once) |
| dept | Departure airport identifer (can only be specified once) |
| ident | Aircraft/flight identifier |
| type | FAA airframe type designator |
| alt | Altitude |
| status | Flight status (2=Scheduled, 4=Flight Plan Filed, 5=Active, 9=Landed, 99=Timeout) |
| gs | Groundspeed |
| accat | Aircraft category (0=Piston, 1=Turbine, 2=Jet, 3=Other) |
| usercat | User category (0=Air Taxi, 1=Cargo, 2=Commercial, 3=General Aviation, 4=Military, 5=Other, 6=Unknown) |
Valid search terms for the FlightPlans function:
| dest | Destination airport identifer (can only be specified once) |
| dept | Departure airport identifer (can only be specified once) |
| ident | Aircraft/flight identifier |
| type | FAA airframe type designator |
| alt | Altitude |
| status | Flight status (2=Scheduled, 4=Flight Plan Filed, 5=Active, 9=Landed, 99=Timeout) |
| gs | Groundspeed |
| center | FAA center that accepted the flight plan |
Additional Resources
adsgeo, a set of .NET Class Libraries for processing Geographic data. Includes helper functions like finding the course between two points, distance between points, etc.
Code Examples
HelloFlight
For access to a helper library of geographic functions, such as distance and course between two points, check out adsgeo.codeplex.com.
Microsoft Visual Basic.NET
Dim PlaneXML As New com.fboweb.PlaneXMLv1
Dim c As New NetworkCredential("[your email]", "[your api key]")
PlaneXML.Credentials = c
Dim flight As FIStatic = PlaneXML.FlightInfo("N111FB", True, True)
Response.Write("This flight's last destination was " & flight.Dest)
Microsoft C# .NET
PlaneXMLv1 PlaneXML = new com.flightwise.planexml.PlaneXMLv1();
NetworkCredential c = new NetworkCredential("[your email]", "[your api key]");
PlaneXML.Credentials = c;
FIStatic flight = PlaneXML.FlightInfo("N111FB", true, true);
Response.Write("Last destination was " + flight.Dest);
PHP (requires pear-SOAP and pear-HTTP)
require_once('SOAP/Client.php');
$auth = array(
'user' => '[your email]',
'pass' => '[your api key]',
);
$wsdl_url = 'http://planexml.flightwise.com/ws/PlaneXMLv1.asmx?WSDL';
$WSDL = new SOAP_WSDL($wsdl_url,$auth);
$PlaneXML = $WSDL->getProxy();
$flight = $PlaneXML->FlightInfo('N111FB',true,true);
echo "Dest ID:";
echo $flight->Dest;
echo "\nDest Name:";
echo $flight->DestName;
?>