SITA On-Time Performance API
dots.support@sita.aero
1 Revision History
Date | Version | Description | Author |
---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
2 Registration and API Sign Up
To access the APIs you will need a registration key, also known as an API key. These can be obtained by creating an account on https://www.developer.aero/ and registering your interest for access to the API.
2.1 API Key Usage
The API key will be passed in an HTTP header as follows:
-
Name of header: x-apikey
-
Value of header: The API key as generated for the application.
2.2 Security
-
All incoming requests will be REST over HTTPS.
-
Users are authenticated using their API key.
-
Certain response payload elements will be filtered based on permissions associated with the x-apikey value used.
3 SITA On-Time Performance API Service
The SITA On-Time Performance API is a REST based service which provides information about on-time performances of airports and airlines around the world.
A user may
-
Compare the on-time performances of airports and airlines
-
Search for the ranking of on-time performances of airports and airlines
-
Search for the totals of flights by airports and airlines
3.1 Resources
This section describes each On-Time Performance API service. Detailed API structure, example requests and responses, JSON schema for request (where appropriate) and responses, and error response codes and formats are included.
3.2 On-Time Performance Airline and Airport Comparison
3.2.1 GET Airlines comparison
Compare the on-time performances of the given airlines during the specified period (from and to). The results can be grouped by an interval, such as DAILY, WEEKLY and MONTHLY.
Request parameters
Parameter | Description |
---|---|
|
List of 2-character airport IATA code or 3-character airport ICAO code |
|
Date range start e.g 2021-01-01 |
|
Date range end e.g 2021-01-31 |
|
Interval to be applied when grouping results. E.g.: DAILY, WEEKLY, MONTHLY |
Request headers
Name | Description |
---|---|
|
Content type of this request. Required value is 'application/json' |
|
Authorization header that contains the API key. |
Response fields
Path | Type | Description |
---|---|---|
|
|
Results grouping interval. E.g.: DAILY, WEEKLY, MONTHLY |
|
|
Flight delay group interval. The key is defined by an specific interval of minutes (<from_value>-<to_value>) and the content is the percentage of flights with delay value between these values (<to_value> not included). The delay percentage does not include the canceled flights and the flights without actual date values |
|
|
On-time performance rating of this flight |
|
|
Number of on-time flights |
|
|
Date range end |
|
|
Flights |
|
|
IATA Airline Code |
|
|
Date |
|
|
Date range start |
|
|
Number of canceled flights |
|
|
Array of Airlines |
|
|
Percentage of flights for which OTP stats are available |
|
|
Array of OTP results per airline |
|
|
Number of flights with unknown status |
|
|
Number of not on-time flights |
Curl request
$ curl 'https://otp.api.aero/otp/v1/comparison/airlines?airlineCodes=AA,DL,SW&from=2021-01-01&to=2021-01-07&interval=DAILY' -i -X GET \
-H 'Content-Type: application/json' \
-H 'X-apiKey: ff228ab88758a84637f1f88d86899365'
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 4940
{
"from" : "2021-01-01",
"to" : "2021-01-07",
"interval" : "DAILY",
"otp" : [ {
"date" : "2021-01-01",
"airlines" : [ {
"iataCode" : "AA",
"flights" : 3379,
"onTime" : 2812,
"notOnTime" : 388,
"canceled" : 104,
"unknown" : 75,
"performance" : 85.11,
"accuracy" : 97.78,
"delay" : null
}, {
"iataCode" : "DL",
"flights" : 2742,
"onTime" : 2019,
"notOnTime" : 483,
"canceled" : 3,
"unknown" : 237,
"performance" : 80.6,
"accuracy" : 91.36,
"delay" : null
} ]
}, {
"date" : "2021-01-02",
"airlines" : [ {
"iataCode" : "AA",
"flights" : 4280,
"onTime" : 3494,
"notOnTime" : 660,
"canceled" : 38,
"unknown" : 88,
"performance" : 83.35,
"accuracy" : 97.94,
"delay" : null
}, {
"iataCode" : "DL",
"flights" : 3919,
"onTime" : 3072,
"notOnTime" : 547,
"canceled" : 2,
"unknown" : 298,
"performance" : 84.84,
"accuracy" : 92.4,
"delay" : null
} ]
}, {
"date" : "2021-01-03",
"airlines" : [ {
"iataCode" : "AA",
"flights" : 4309,
"onTime" : 3437,
"notOnTime" : 763,
"canceled" : 39,
"unknown" : 70,
"performance" : 81.08,
"accuracy" : 98.38,
"delay" : null
}, {
"iataCode" : "DL",
"flights" : 4010,
"onTime" : 2821,
"notOnTime" : 882,
"canceled" : 3,
"unknown" : 304,
"performance" : 76.12,
"accuracy" : 92.42,
"delay" : null
}, {
"iataCode" : "SW",
"flights" : 8,
"onTime" : 1,
"notOnTime" : 6,
"canceled" : 0,
"unknown" : 1,
"performance" : 14.29,
"accuracy" : 87.5,
"delay" : null
} ]
}, {
"date" : "2021-01-04",
"airlines" : [ {
"iataCode" : "AA",
"flights" : 4207,
"onTime" : 3358,
"notOnTime" : 694,
"canceled" : 77,
"unknown" : 78,
"performance" : 81.33,
"accuracy" : 98.15,
"delay" : null
}, {
"iataCode" : "DL",
"flights" : 3890,
"onTime" : 3013,
"notOnTime" : 564,
"canceled" : 22,
"unknown" : 291,
"performance" : 83.72,
"accuracy" : 92.52,
"delay" : null
}, {
"iataCode" : "SW",
"flights" : 2,
"onTime" : 2,
"notOnTime" : 0,
"canceled" : 0,
"unknown" : 0,
"performance" : 100.0,
"accuracy" : 100.0,
"delay" : null
} ]
}, {
"date" : "2021-01-05",
"airlines" : [ {
"iataCode" : "AA",
"flights" : 2854,
"onTime" : 2568,
"notOnTime" : 211,
"canceled" : 18,
"unknown" : 57,
"performance" : 91.81,
"accuracy" : 98.0,
"delay" : null
}, {
"iataCode" : "DL",
"flights" : 3151,
"onTime" : 2670,
"notOnTime" : 234,
"canceled" : 2,
"unknown" : 245,
"performance" : 91.88,
"accuracy" : 92.22,
"delay" : null
}, {
"iataCode" : "SW",
"flights" : 2,
"onTime" : 2,
"notOnTime" : 0,
"canceled" : 0,
"unknown" : 0,
"performance" : 100.0,
"accuracy" : 100.0,
"delay" : null
} ]
}, {
"date" : "2021-01-06",
"airlines" : [ {
"iataCode" : "AA",
"flights" : 3038,
"onTime" : 2662,
"notOnTime" : 305,
"canceled" : 15,
"unknown" : 56,
"performance" : 89.27,
"accuracy" : 98.16,
"delay" : null
}, {
"iataCode" : "DL",
"flights" : 3168,
"onTime" : 2767,
"notOnTime" : 164,
"canceled" : 1,
"unknown" : 236,
"performance" : 94.37,
"accuracy" : 92.55,
"delay" : null
}, {
"iataCode" : "SW",
"flights" : 8,
"onTime" : 7,
"notOnTime" : 0,
"canceled" : 0,
"unknown" : 1,
"performance" : 100.0,
"accuracy" : 87.5,
"delay" : null
} ]
}, {
"date" : "2021-01-07",
"airlines" : [ {
"iataCode" : "AA",
"flights" : 3923,
"onTime" : 3621,
"notOnTime" : 213,
"canceled" : 18,
"unknown" : 71,
"performance" : 94.0,
"accuracy" : 98.19,
"delay" : null
}, {
"iataCode" : "DL",
"flights" : 3569,
"onTime" : 3058,
"notOnTime" : 223,
"canceled" : 7,
"unknown" : 281,
"performance" : 93.0,
"accuracy" : 92.13,
"delay" : null
}, {
"iataCode" : "SW",
"flights" : 4,
"onTime" : 4,
"notOnTime" : 0,
"canceled" : 0,
"unknown" : 0,
"performance" : 100.0,
"accuracy" : 100.0,
"delay" : null
} ]
} ]
}
3.2.2 GET Airports comparison
Compare the on-time performances of the given airports during the specified period (from and to). The results can be grouped by an interval, such as DAILY, WEEKLY and MONTHLY.
Request parameters
Parameter | Description |
---|---|
|
List of 3-character airport IATA code or 4-character airport ICAO code |
|
Date range start e.g 2021-01-01 |
|
Date range end e.g 2021-01-31 |
|
Interval to be applied when grouping results. E.g.: DAILY, WEEKLY, MONTHLY |
Request headers
Name | Description |
---|---|
|
Content type of this request. Required value is 'application/json' |
|
Authorization header that contains the API key. |
Response fields
Path | Type | Description |
---|---|---|
|
|
Number of flights with unknown status |
|
|
Number of on-time flights |
|
|
Array of OTP results per airport |
|
|
Date range start |
|
|
Percentage of flights for which OTP stats are available |
|
|
Number of not on-time flights |
|
|
Date |
|
|
Date range end |
|
|
Flights |
|
|
Number of canceled flights |
|
|
Array of airports |
|
|
Flight delay group interval. The key is defined by an specific interval of minutes (<from_value>-<to_value>) and the content is the percentage of flights with delay value between these values (<to_value> not included). The delay percentage does not include the canceled flights and the flights without actual date values |
|
|
On-time performance rating of this flight |
|
|
IATA Airport Code |
|
|
Results grouping interval. E.g.: DAILY, WEEKLY, MONTHLY |
Curl request
$ curl 'https://otp.api.aero/otp/v1/comparison/airports?airportCodes=ORD,JFK,ATL&from=2021-01-01&to=2021-01-31&interval=WEEKLY' -i -X GET \
-H 'Content-Type: application/json' \
-H 'X-apiKey: ff228ab88758a84637f1f88d86899365'
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 3960
{
"from" : "2021-01-01",
"to" : "2021-01-31",
"interval" : "WEEKLY",
"otp" : [ {
"date" : "2020-12-28",
"airports" : [ {
"iataCode" : "ATL",
"flights" : 2564,
"onTime" : 1976,
"notOnTime" : 502,
"canceled" : 12,
"unknown" : 74,
"performance" : 79.36,
"accuracy" : 97.11,
"delay" : null
}, {
"iataCode" : "JFK",
"flights" : 911,
"onTime" : 576,
"notOnTime" : 216,
"canceled" : 10,
"unknown" : 109,
"performance" : 71.82,
"accuracy" : 88.04,
"delay" : null
}, {
"iataCode" : "ORD",
"flights" : 2045,
"onTime" : 1380,
"notOnTime" : 404,
"canceled" : 145,
"unknown" : 116,
"performance" : 71.54,
"accuracy" : 94.33,
"delay" : null
} ]
}, {
"date" : "2021-01-04",
"airports" : [ {
"iataCode" : "ATL",
"flights" : 5858,
"onTime" : 4951,
"notOnTime" : 736,
"canceled" : 23,
"unknown" : 148,
"performance" : 86.71,
"accuracy" : 97.47,
"delay" : null
}, {
"iataCode" : "JFK",
"flights" : 2034,
"onTime" : 1342,
"notOnTime" : 349,
"canceled" : 28,
"unknown" : 315,
"performance" : 78.07,
"accuracy" : 84.51,
"delay" : null
}, {
"iataCode" : "ORD",
"flights" : 4194,
"onTime" : 3381,
"notOnTime" : 492,
"canceled" : 26,
"unknown" : 295,
"performance" : 86.71,
"accuracy" : 92.97,
"delay" : null
} ]
}, {
"date" : "2021-01-11",
"airports" : [ {
"iataCode" : "ATL",
"flights" : 5584,
"onTime" : 4950,
"notOnTime" : 501,
"canceled" : 10,
"unknown" : 123,
"performance" : 90.64,
"accuracy" : 97.8,
"delay" : null
}, {
"iataCode" : "JFK",
"flights" : 1914,
"onTime" : 1286,
"notOnTime" : 313,
"canceled" : 37,
"unknown" : 278,
"performance" : 78.61,
"accuracy" : 85.48,
"delay" : null
}, {
"iataCode" : "ORD",
"flights" : 4061,
"onTime" : 3312,
"notOnTime" : 434,
"canceled" : 23,
"unknown" : 292,
"performance" : 87.87,
"accuracy" : 92.81,
"delay" : null
} ]
}, {
"date" : "2021-01-18",
"airports" : [ {
"iataCode" : "ATL",
"flights" : 5692,
"onTime" : 5255,
"notOnTime" : 303,
"canceled" : 12,
"unknown" : 122,
"performance" : 94.34,
"accuracy" : 97.86,
"delay" : null
}, {
"iataCode" : "JFK",
"flights" : 1865,
"onTime" : 1308,
"notOnTime" : 267,
"canceled" : 33,
"unknown" : 257,
"performance" : 81.34,
"accuracy" : 86.22,
"delay" : null
}, {
"iataCode" : "ORD",
"flights" : 3986,
"onTime" : 3217,
"notOnTime" : 462,
"canceled" : 23,
"unknown" : 284,
"performance" : 86.9,
"accuracy" : 92.88,
"delay" : null
} ]
}, {
"date" : "2021-01-25",
"airports" : [ {
"iataCode" : "ATL",
"flights" : 4811,
"onTime" : 4405,
"notOnTime" : 289,
"canceled" : 19,
"unknown" : 98,
"performance" : 93.46,
"accuracy" : 97.96,
"delay" : null
}, {
"iataCode" : "JFK",
"flights" : 1564,
"onTime" : 1084,
"notOnTime" : 229,
"canceled" : 38,
"unknown" : 213,
"performance" : 80.24,
"accuracy" : 86.38,
"delay" : null
}, {
"iataCode" : "ORD",
"flights" : 3464,
"onTime" : 2511,
"notOnTime" : 539,
"canceled" : 126,
"unknown" : 288,
"performance" : 79.06,
"accuracy" : 91.69,
"delay" : null
} ]
} ]
}
3.3 On-Time Performance Flight Statistics
3.3.1 GET Flights by airlines
Gets the total number of flights by airlines during the period (from and to).
Request parameters
Parameter | Description |
---|---|
|
Date range start e.g 2021-01-01 |
|
Date range end e.g 2021-01-31 |
|
Number of top results to limit the size of the list. Must be a value between 10 and 5000 |
Request headers
Name | Description |
---|---|
|
Content type of this request. Required value is 'application/json' |
|
Authorization header that contains the API key. |
Response fields
Path | Type | Description |
---|---|---|
|
|
Array of flights |
|
|
Selected Days |
|
|
Number of canceled flights over requested date range |
|
|
Top (N) performers |
|
|
Daily average number of flights over requested date range |
|
|
Date range start |
|
|
Array of airlines |
|
|
Date range end |
|
|
IATA Airline Code |
Curl request
$ curl 'https://otp.api.aero/otp/v1/flights/airlines?from=2021-01-01&to=2021-01-31&top=10' -i -X GET \
-H 'Content-Type: application/json' \
-H 'X-apiKey: ff228ab88758a84637f1f88d86899365'
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1206
{
"from" : "2021-01-01",
"to" : "2021-01-31",
"selectedDays" : 31,
"top" : 10,
"airlines" : [ {
"iataCode" : "AA",
"flights" : 109299,
"canceled" : 1549,
"dailyAverage" : 3525.77
}, {
"iataCode" : "DL",
"flights" : 99890,
"canceled" : 126,
"dailyAverage" : 3222.26
}, {
"iataCode" : "UA",
"flights" : 76841,
"canceled" : 1048,
"dailyAverage" : 2478.74
}, {
"iataCode" : "WN",
"flights" : 60656,
"canceled" : 469,
"dailyAverage" : 1956.65
}, {
"iataCode" : "MU",
"flights" : 57148,
"canceled" : 7193,
"dailyAverage" : 1843.48
}, {
"iataCode" : "CZ",
"flights" : 52269,
"canceled" : 1187,
"dailyAverage" : 1686.1
}, {
"iataCode" : "6E",
"flights" : 36225,
"canceled" : 260,
"dailyAverage" : 1168.55
}, {
"iataCode" : "CA",
"flights" : 34552,
"canceled" : 3148,
"dailyAverage" : 1114.58
}, {
"iataCode" : "NH",
"flights" : 33359,
"canceled" : 9435,
"dailyAverage" : 1076.1
}, {
"iataCode" : "G5",
"flights" : 24483,
"canceled" : 732,
"dailyAverage" : 789.77
} ]
}
3.3.2 GET Flights by airports
Gets the total number of flights by airports during the period (from and to).
Request parameters
Parameter | Description |
---|---|
|
Date range start e.g 2021-01-01 |
|
Date range end e.g 2021-01-31 |
|
Number of top results to limit the size of the list. Must be a value between 10 and 5000 |
Request headers
Name | Description |
---|---|
|
Content type of this request. Required value is 'application/json' |
|
Authorization header that contains the API key. |
Response fields
Path | Type | Description |
---|---|---|
|
|
Date range end |
|
|
IATA Airport Code |
|
|
Selected Days |
|
|
Array of flights |
|
|
Number of canceled flights over requested date range |
|
|
Top (N) performers |
|
|
Date range start |
|
|
Daily average number of flights over requested date range |
|
|
Array of airports |
Curl request
$ curl 'https://otp.api.aero/otp/v1/flights/airports?from=2021-01-01&to=2021-01-31&top=10' -i -X GET \
-H 'Content-Type: application/json' \
-H 'X-apiKey: ff228ab88758a84637f1f88d86899365'
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1202
{
"from" : "2021-01-01",
"to" : "2021-01-31",
"selectedDays" : 31,
"top" : 10,
"airports" : [ {
"iataCode" : "ATL",
"flights" : 22756,
"canceled" : 68,
"dailyAverage" : 734.06
}, {
"iataCode" : "DFW",
"flights" : 22535,
"canceled" : 315,
"dailyAverage" : 726.94
}, {
"iataCode" : "ORD",
"flights" : 16736,
"canceled" : 339,
"dailyAverage" : 539.87
}, {
"iataCode" : "DEN",
"flights" : 16664,
"canceled" : 81,
"dailyAverage" : 537.55
}, {
"iataCode" : "CAN",
"flights" : 16654,
"canceled" : 847,
"dailyAverage" : 537.23
}, {
"iataCode" : "PVG",
"flights" : 15750,
"canceled" : 1305,
"dailyAverage" : 508.06
}, {
"iataCode" : "CKG",
"flights" : 15574,
"canceled" : 406,
"dailyAverage" : 502.39
}, {
"iataCode" : "HND",
"flights" : 15324,
"canceled" : 4144,
"dailyAverage" : 494.32
}, {
"iataCode" : "LAX",
"flights" : 14339,
"canceled" : 271,
"dailyAverage" : 462.55
}, {
"iataCode" : "CTU",
"flights" : 12976,
"canceled" : 672,
"dailyAverage" : 418.58
} ]
}
3.4 On-Time Performance Ranking
3.4.1 GET Airlines ranking
Gets the ranking of most on-time airlines during the period (from and to).
Request parameters
Parameter | Description |
---|---|
|
Date range start e.g 2021-01-01 |
|
Date range end e.g 2021-01-31 |
|
Region |
|
Number of top results to limit the size of the list. Must be a value between 10 and 100 |
|
Number of bottom results to limit the size of the list. Must be a value between 10 and 100. Cannot be requested along with the top filter |
|
Minimum accuracy. The default value is 50 |
|
Minimum number of average daily flights. The default value is 1 |
Request headers
Name | Description |
---|---|
|
Content type of this request. Required value is 'application/json' |
|
Authorization header that contains the API key. |
Response fields
Path | Type | Description |
---|---|---|
|
|
Flight delay group interval. The key is defined by an specific interval of minutes (<from_value>-<to_value>) and the content is the percentage of flights with delay value between these values (<to_value> not included). The delay percentage does not include the canceled flights and the flights without actual date values |
|
|
Airline name |
|
|
Number of not on-time flights |
|
|
Minimum requested accuracy |
|
|
Date range end |
|
|
Percentage of flights for which OTP stats are available |
|
|
IATA Airline Code |
|
|
Number of on-time flights |
|
|
Bottom (N) performers |
|
|
Date range start |
|
|
Number of flights with unknown status |
|
|
Flights |
|
|
Region |
|
|
Array of airlines |
|
|
Top (N) performers |
|
|
Ranking based on the size of the set of flights for this airline |
|
|
On-time performance rating of this flight |
|
|
Minimum number of average daily flights |
|
|
Region |
|
|
Ranking based on performance |
|
|
Number of canceled flights |
Curl request
$ curl 'https://otp.api.aero/otp/v1/ranking/airlines?from=2021-01-01&to=2021-01-31®ion=SOA&top=10&minAccuracy=50&minDailyFlights=2' -i -X GET \
-H 'Content-Type: application/json' \
-H 'X-apiKey: ff228ab88758a84637f1f88d86899365'
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2656
{
"from" : "2021-01-01",
"to" : "2021-01-31",
"region" : "SOA",
"top" : 10,
"minAccuracy" : 50,
"minDailyFlights" : 2,
"airlines" : [ {
"iataCode" : "TA",
"region" : "SOA",
"flights" : 127,
"onTime" : 124,
"notOnTime" : 2,
"canceled" : 0,
"unknown" : 0,
"performance" : 98.41,
"accuracy" : 99.21,
"rank" : 1,
"size" : 9
}, {
"iataCode" : "VV",
"region" : "SOA",
"flights" : 403,
"onTime" : 370,
"notOnTime" : 6,
"canceled" : 0,
"unknown" : 0,
"performance" : 98.4,
"accuracy" : 93.3,
"rank" : 2,
"size" : 8
}, {
"iataCode" : "XL",
"region" : "SOA",
"flights" : 498,
"onTime" : 473,
"notOnTime" : 15,
"canceled" : 4,
"unknown" : 0,
"performance" : 96.14,
"accuracy" : 98.8,
"rank" : 3,
"size" : 6
}, {
"iataCode" : "VH",
"region" : "SOA",
"flights" : 2209,
"onTime" : 1987,
"notOnTime" : 84,
"canceled" : 5,
"unknown" : 0,
"performance" : 95.71,
"accuracy" : 93.98,
"rank" : 4,
"size" : 4
}, {
"iataCode" : "WJ",
"region" : "SOA",
"flights" : 471,
"onTime" : 422,
"notOnTime" : 19,
"canceled" : 2,
"unknown" : 0,
"performance" : 95.26,
"accuracy" : 94.06,
"rank" : 5,
"size" : 7
}, {
"iataCode" : "JJ",
"region" : "SOA",
"flights" : 84,
"onTime" : 59,
"notOnTime" : 3,
"canceled" : 0,
"unknown" : 0,
"performance" : 95.16,
"accuracy" : 73.81,
"rank" : 6,
"size" : 10
}, {
"iataCode" : "LA",
"region" : "SOA",
"flights" : 23903,
"onTime" : 20759,
"notOnTime" : 1060,
"canceled" : 133,
"unknown" : 0,
"performance" : 94.57,
"accuracy" : 91.84,
"rank" : 7,
"size" : 1
}, {
"iataCode" : "AV",
"region" : "SOA",
"flights" : 9409,
"onTime" : 8201,
"notOnTime" : 407,
"canceled" : 78,
"unknown" : 0,
"performance" : 94.42,
"accuracy" : 92.32,
"rank" : 8,
"size" : 3
}, {
"iataCode" : "AD",
"region" : "SOA",
"flights" : 21738,
"onTime" : 17808,
"notOnTime" : 2054,
"canceled" : 248,
"unknown" : 0,
"performance" : 88.55,
"accuracy" : 92.51,
"rank" : 9,
"size" : 2
}, {
"iataCode" : "VW",
"region" : "SOA",
"flights" : 1022,
"onTime" : 490,
"notOnTime" : 48,
"canceled" : 16,
"unknown" : 0,
"performance" : 88.45,
"accuracy" : 54.21,
"rank" : 10,
"size" : 5
} ]
}
3.4.2 GET Airports ranking
Gets the ranking of most on-time airports during the period (from and to).
Request parameters
Parameter | Description |
---|---|
|
Date range start e.g 2021-01-01 |
|
Date range end e.g 2021-01-31 |
|
Region |
|
Number of top results to limit the size of the list. Must be a value between 10 and 100 |
|
Number of bottom results to limit the size of the list. Must be a value between 10 and 100. Cannot be requested along with the top filter |
|
Minimum accuracy. The default value is 50 |
|
Minimum number of average daily flights. The default value is 1 |
Request headers
Name | Description |
---|---|
|
Content type of this request. Required value is 'application/json' |
|
Authorization header that contains the API key. |
Response fields
Path | Type | Description |
---|---|---|
|
|
Ranking based on the size of the set of flights for this airport |
|
|
Minimum number of average daily flights |
|
|
Region |
|
|
Region |
|
|
On-time performance rating of this flight |
|
|
Flight delay group interval. The key is defined by an specific interval of minutes (<from_value>-<to_value>) and the content is the percentage of flights with delay value between these values (<to_value> not included). The delay percentage does not include the canceled flights and the flights without actual date values |
|
|
Airport name |
|
|
Minimum requested accuracy |
|
|
Number of canceled flights |
|
|
Date range end |
|
|
Ranking based on performance |
|
|
IATA Airport Code |
|
|
Number of not on-time flights |
|
|
Bottom (N) performers |
|
|
Percentage of flights for which OTP stats are available |
|
|
Date range start |
|
|
Number of flights with unknown status |
|
|
Array of airports |
|
|
Number of on-time flights |
|
|
Top (N) performers |
|
|
Flights |
Curl request
$ curl 'https://otp.api.aero/otp/v1/ranking/airports?from=2021-01-01&to=2021-01-31®ion=MDE&top=10&minAccuracy=50&minDailyFlights=2' -i -X GET \
-H 'Content-Type: application/json' \
-H 'X-apiKey: ff228ab88758a84637f1f88d86899365'
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2635
{
"from" : "2021-01-01",
"to" : "2021-01-31",
"region" : "MDE",
"top" : 10,
"minAccuracy" : 50,
"minDailyFlights" : 2,
"airports" : [ {
"iataCode" : "YNB",
"region" : "MDE",
"flights" : 92,
"onTime" : 88,
"notOnTime" : 2,
"canceled" : 0,
"unknown" : 0,
"performance" : 97.78,
"accuracy" : 97.83,
"rank" : 1,
"size" : 8
}, {
"iataCode" : "MED",
"region" : "MDE",
"flights" : 662,
"onTime" : 384,
"notOnTime" : 16,
"canceled" : 1,
"unknown" : 0,
"performance" : 95.76,
"accuracy" : 60.57,
"rank" : 2,
"size" : 1
}, {
"iataCode" : "HAS",
"region" : "MDE",
"flights" : 202,
"onTime" : 152,
"notOnTime" : 10,
"canceled" : 1,
"unknown" : 0,
"performance" : 93.25,
"accuracy" : 80.69,
"rank" : 3,
"size" : 3
}, {
"iataCode" : "KYA",
"region" : "MDE",
"flights" : 125,
"onTime" : 109,
"notOnTime" : 9,
"canceled" : 0,
"unknown" : 0,
"performance" : 92.37,
"accuracy" : 94.4,
"rank" : 4,
"size" : 6
}, {
"iataCode" : "AQI",
"region" : "MDE",
"flights" : 73,
"onTime" : 67,
"notOnTime" : 4,
"canceled" : 2,
"unknown" : 0,
"performance" : 91.78,
"accuracy" : 100.0,
"rank" : 5,
"size" : 10
}, {
"iataCode" : "BAL",
"region" : "MDE",
"flights" : 114,
"onTime" : 97,
"notOnTime" : 8,
"canceled" : 1,
"unknown" : 0,
"performance" : 91.51,
"accuracy" : 92.98,
"rank" : 6,
"size" : 7
}, {
"iataCode" : "TUU",
"region" : "MDE",
"flights" : 478,
"onTime" : 328,
"notOnTime" : 31,
"canceled" : 2,
"unknown" : 0,
"performance" : 90.86,
"accuracy" : 75.52,
"rank" : 7,
"size" : 2
}, {
"iataCode" : "AJF",
"region" : "MDE",
"flights" : 168,
"onTime" : 135,
"notOnTime" : 13,
"canceled" : 2,
"unknown" : 0,
"performance" : 90.0,
"accuracy" : 89.29,
"rank" : 8,
"size" : 4
}, {
"iataCode" : "GZP",
"region" : "MDE",
"flights" : 84,
"onTime" : 54,
"notOnTime" : 5,
"canceled" : 1,
"unknown" : 0,
"performance" : 90.0,
"accuracy" : 71.43,
"rank" : 9,
"size" : 9
}, {
"iataCode" : "HTY",
"region" : "MDE",
"flights" : 165,
"onTime" : 143,
"notOnTime" : 14,
"canceled" : 2,
"unknown" : 0,
"performance" : 89.94,
"accuracy" : 96.36,
"rank" : 10,
"size" : 5
} ]
}
4 Error Response
Response fields
Path | Type | Description |
---|---|---|
|
|
Support Error Code |
|
|
Object that holds the error information |
|
|
Indicates the invalid query parameter |
|
|
Error Description |
|
|
Array of errors |
Curl request
$ curl 'https://otp.api.aero/otp/v1/flights/airlines?from=2021-01-01&to=2021-01-31&top=1' -i -X GET \
-H 'Content-Type: application/json' \
-H 'X-apiKey: ff228ab88758a84637f1f88d86899365'
HTTP response
HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 164
{
"errors" : {
"error" : [ {
"code" : 0,
"invalidParam" : "top",
"description" : "must be greater than or equal to 10"
} ]
}
}
5 Use Cases
5.1 On-Time Performance Ranking
Scenario: |
As an API user I want to make a request to the On-Time Performance API to return the airport rankings of on-time performance in a specified date range |
Request: |
GET /otp/v1/ranking/airports?from=2022-11-10&to=2022-11-11 |
Response: |
Returns airport rankings based on on-time performance for the date period given |
Scenario: |
As an API user I want to make a request to the On-Time Performance API to return the airline rankings of on-time performance in a specified date range |
Request: |
GET /otp/v1/ranking/airlines?from=2022-11-10&to=2022-11-11 |
Response: |
Returns airline rankings based on on-time performance for the date period given |
5.2 On-Time Performance Flight Statistics
Scenario: |
As an API user I want to make a request to the On-Time Performance API to return the daily flight statistics per airport |
Request: |
GET /otp/v1/ranking/airports?from=2022-11-10&to=2022-11-11 |
Response: |
Returns daily flight statistics per airport for the date period given |
Scenario: |
As an API user I want to make a request to the On-Time Performance API to return the daily flight statistics per airline |
Request: |
GET /otp/v1/ranking/airlines?from=2022-11-10&to=2022-11-11 |
Response: |
Returns daily flight statistics per airline for the date period given |
5.3 On-Time Performance Comparison
Scenario: |
As an API user I want to make a request to the On-Time Performance API to compare the airport rankings of on-time performance in a specified date range |
Request: |
GET /otp/v1/comparison/airports?airportCodes=ORD,JFK,ATL&from=2021-01-01&to=2021-01-31&interval=WEEKLY |
Response: |
Returns comparison of on-time performance for the given airports within the specified timeframe |
Scenario: |
As an API user I want to make a request to the On-Time Performance API to compare the airline rankings of on-time performance in a specified date range |
Request: |
GET /otp/v1/comparison/airlines?airlineCodes=AA,DL,SW&from=2021-01-01&to=2021-01-31&interval=WEEKLY |
Response: |
Returns comparison of on-time performance for the given airlines within the specified timeframe |
Last updated 2022-11-10 17:17:48 UTC