My Review of the Historical Airline Schedules API’s Data

·

4 min read

Hello, Hashnode. It is Rima 🤓

This is the review of a historical airline schedules API that I’ve been experimenting with. I’ve previously reviewed a few more APIs by the same provider Aviyair (pls see my blog) that focus on different data types from flight delays to real-time timetable data, but this time we are focusing on past airline schedule data.

Now before I begin, I find that this API will be particularly useful for:

  • Displaying past flight information of selected airlines including delayed and canceled flights on the web or in-app (my main use case)

  • Calculating an average delay and cancellation rate for airlines

  • Reviewing airline routes in more detail if you are on the operation side of the aviation industry

…and possibly more that I can’t fully think of right now.

I am using the API to display historical airline schedule data along with real-time flight updates on the current date as well as future updates. Aviyair, the provider of this API thankfully covers all three under a single API key, so I am focused on the development side rather than going after multiple data providers.


What the Historical Airline Schedules API Data Looks Like

The best way to have a preliminary idea of an API’s data is to review the example output. I absolutely hate it when you can’t find this on the provider’s documentation. This is not the case with Aviyair’s documentation for this past airline schedules API but I will still provide fresh output examples that I’ve fetched below:

URL I've used:

GET https://data.aviyair.com/data/v1/historicalschedule?key=apikey&airport_iata=CRL&type=arrival&date_from=2023-05-12&airline_iata=pc

Tip: You can filter the complete past airline schedule data from other parameters. These include the flight number, departure and arrival airport, and finish date (&date_to=) to select a date range rather than a single date.

As you can tell by the request, I’m fetching all flights of Pegasus Airlines from Charleroi Airport on May 12th. This displayed both two flights on the given date and the details about them. Here’s the 200 OK output:

[
{
"type": "arrival",
"status": "landed",
"departure": {
"iataCode": "saw",
"icaoCode": "ltfj",
"gate": "302a",
"delay": 41,
"scheduledTime": "2023-05-12T09:45:00.000",
"estimatedTime": "2023-05-12T09:45:00.000",
"actualTime": "2023-05-12T10:25:00.000",
"estimatedRunway": "2023-05-12T10:25:00.000",
"actualRunway": "2023-05-12T10:25:00.000"
},
"arrival": {
"iataCode": "crl",
"icaoCode": "ebci",
"delay": 2,
"scheduledTime": "2023-05-12T12:20:00.000",
"estimatedTime": "2023-05-12T12:24:00.000",
"actualTime": "2023-05-12T12:22:00.000",
"estimatedRunway": "2023-05-12T12:22:00.000",
"actualRunway": "2023-05-12T12:22:00.000"
},
"airline": {
"name": "pegasus",
"iataCode": "pc",
"icaoCode": "pgt"
},
"flight": {
"number": "921",
"iataNumber": "pc921",
"icaoNumber": "pgt921"
}
},
{
"type": "arrival",
"status": "landed",
"departure": {
"iataCode": "saw",
"icaoCode": "ltfj",
"gate": "501a",
"delay": 29,
"scheduledTime": "2023-05-12T14:00:00.000",
"estimatedTime": "2023-05-12T14:25:00.000",
"actualTime": "2023-05-12T14:29:00.000",
"estimatedRunway": "2023-05-12T14:29:00.000",
"actualRunway": "2023-05-12T14:29:00.000"
},
"arrival": {
"iataCode": "crl",
"icaoCode": "ebci",
"delay": 3,
"scheduledTime": "2023-05-12T16:35:00.000",
"estimatedTime": "2023-05-12T16:34:00.000",
"actualTime": "2023-05-12T16:38:00.000",
"estimatedRunway": "2023-05-12T16:38:00.000",
"actualRunway": "2023-05-12T16:38:00.000"
},
"airline": {
"name": "pegasus",
"iataCode": "pc",
"icaoCode": "pgt"
},
"flight": {
"number": "923",
"iataNumber": "pc923",
"icaoNumber": "pgt923"
}
}

Since I am new at programming, what I’m building is pretty basic and it will initially look a little something like this (ss got from flightmapper):

Like this, the past airline schedules API displays the whole airline schedule per airport. I’ve tried and it is not possible to fetch multiple or all airports at once but it is pretty easy to set the client to cover the airports you are interested in.


Past Airline Schedules Data Verdict

Having spent a considerable time experimenting with this past airline schedules API and find it worth integrating. Some pros and cons, though:

Pros:

  • Pretty clear JSON data, easy to work on via REST API

  • Sufficient details to build a decent website feature or app: departure and arrival airports, actual, estimated and scheduled departure and arrival times, runway times, airline details, gate, terminal, baggage, final flight status (useful to specify canceled flights) and total delay

  • Adequate support from the team

  • The price point is reasonable for the amount of data you are getting

  • Global coverage

Cons:

  • Does not include aircraft details (although as I also mentioned in another article, their support team told me that it is possible to fetch this via another of their APIs but I haven’t looked into it)

  • Can’t fetch multiple airports at once

The bottom line is that this historical airline schedule API is very well worth it if you are looking to display historical airline timetable information on your platform. Here’s the link to get an API key and view the prices.

Â