Flight Tracking and Flight Status API
Harness FlightAware's flight data using AeroAPI (formerly FlightXML), the world’s most robust flight tracking API.
Harness FlightAware's flight data using AeroAPI (formerly FlightXML), the world’s most robust flight tracking API.
AeroAPI (formerly FlightXML) 2.0 is a simple, query-based API that gives programs access to any of FlightAware’s flight data. Users can obtain current or historical data and the API is compatible with any application that supports SOAP/WSDL or REST/JSON. With the introduction of Foresight into the API, customers have access to the data that powers over half of the predictive times in the U.S.
import requests
username = "YOUR_USERNAME"
apiKey = "YOUR_API_KEY"
fxmlUrl = "https://flightxml.flightaware.com/json/FlightXML2/"
payload = {'airport':'KSFO', 'howMany':'10'}
response = requests.get(fxmlUrl + "Enroute",
params=payload, auth=(username, apiKey))
if response.status_code == 200:
print response.json()
else:
print "Error executing request"
var Client = require('node-rest-client').Client;
var username = 'YOUR_USERNAME';
var apiKey = 'YOUR_API_KEY';
var fxmlUrl = 'https://flightxml.flightaware.com/json/FlightXML2/';
var client_options = {
user: username,
password: apiKey
};
var client = new Client(client_options);
client.registerMethod('airlineInfo', fxmlUrl + 'AirlineInfo', 'GET');
var airlineInfoArgs = {
parameters: {
airlineCode: 'UAL'
}
};
client.methods.airlineInfo(airlineInfoArgs, function (data, response) {
console.log(data);
});
<?php
$username = "YOUR_USERNAME";
$apiKey = "YOUR_API_KEY";
$fxmlUrl = "https://flightxml.flightaware.com/json/FlightXML2/";
$queryParams = array(
'ident' => 'SWA45',
'howMany' => 10,
'offset' => 10
);
$url = $fxmlUrl . 'FlightInfoEx?' . http_build_query($queryParams);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_USERPWD, $username . ':' . $apiKey);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
if ($result = curl_exec($ch)) {
curl_close($ch);
echo $result;
}
?>
string fxmlUrl = "http://flightxml.flightaware.com/json/FlightXML2";
string username = "YOUR_USERNAME";
string apiKey = "YOUR_APIKEY";
var uriBuilder = new UriBuilder(fxmlUrl);
var requestUrl = fxmlUrl
.AppendPathSegment("AirportInfo")
.SetQueryParams(new { airportCode = "KIAH" });
var serializer = new DataContractJsonSerializer(typeof(AirportInfoResult));
var client = new HttpClient();
var credentials = Encoding.ASCII.GetBytes(username + ":" + apiKey);
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(credentials));
var streamTask = client.GetStreamAsync(apiUrl);
var airportInfo = serializer.ReadObject(await streamTask) as AirportInfoResult;
Console.WriteLine(airportInfo.AirportResult.Code);
AeroAPI 2.0 can also be used with Python, Ruby, Java, Tcl, Perl, ASP, and other languages. View additional code examples.
Available AeroAPI query methods are organized by pricing classes based on how complex or costly it is for FlightAware to deliver the result. The RegisterAlertEndpoint and SetMaximumResultSize methods are available for free.
Rates are shown as per 1000 queries for simplicity and based on your monthly usage, determined at the end of each month. You will be charged for each call, not for each 1,000 calls. Expand each class to view full volume pricing.
|
# of Queries | Price Per Query |
---|---|
1 - 9,999 | $0.0120 |
10,000 - 24,999 | $0.0070 |
25,000 - 49,999 | $0.0060 |
50,000 - 99,999 | $0.0050 |
100,000 - 249,999 | $0.0040 |
250,000 - 999,999 | $0.0030 |
1,000,000 - 4,999,999 | $0.0020 |
More than 5,000,000? | Contact FlightAware |
|
# of Queries | Price Per Query |
---|---|
1 - 9,999 | $0.0079 |
10,000 - 24,999 | $0.0046 |
25,000 - 49,999 | $0.0040 |
50,000 - 99,999 | $0.0033 |
100,000 - 249,999 | $0.0026 |
250,000 - 999,999 | $0.0020 |
1,000,000 - 4,999,999 | $0.0013 |
More than 5,000,000? | Contact FlightAware |
|
# of Queries | Price Per Query |
---|---|
1 - 9,999 | $0.0020 |
10,000 - 24,999 | $0.0012 |
25,000 - 49,999 | $0.0010 |
50,000 - 99,999 | $0.0008 |
100,000 - 249,999 | $0.0007 |
250,000 - 999,999 | $0.0005 |
1,000,000 - 4,999,999 | $0.0003 |
More than 5,000,000? | Contact FlightAware |
|
# of Queries | Price Per Query |
---|---|
1 - 9,999 | $0.0008 |
10,000 - 24,999 | $0.0005 |
25,000 - 49,999 | $0.0004 |
50,000 - 99,999 | $0.0003 |
100,000 - 249,999 | $0.0003 |
250,000 - 999,999 | $0.0002 |
1,000,000 - 4,999,999 | $0.0001 |
More than 5,000,000? | Contact FlightAware |
FlightAware's API for flight status, flight tracking and aviation data can be accessed via REST or SOAP and the API can be accessed using any programming language.
Please visit our FAQ to find answers to general questions or check out our discussion forum for more in-depth information.