Using the Historical Airport Schedules API I Found to Display Past Flight Information on My App

Rima MannRima Mann
4 min read

Hi folks, Rima here! 👋🏼 I’m continuing by reviewing another API by the same provider as in my last 2 articles, Aviyair because the API key I got from them apparently grants access to their multiple different APIs and I’m making sure I get my money’s worth :P

In this review, I’m taking a look at their historical airport schedules API because I want to display the past status of airport schedules and specific flights, pretty much like on FR24’s website. Here’s a screenshot for reference from Athens Airport’s arrival schedule, specifically for flight Aegean Airlines flight A3661.

Like what I am looking to build, users can view past schedule information date-by-date here. I can also think of other use cases where you can calculate the average delay and cancellation rate of an airline or a flight (or even the whole airport), but I will not be focusing on these as it’s out of my project’s scope.


Getting a 200 OK Response with This Past Airport Schedules API

Now here are the interesting basics of this historical airport schedules data. In case you haven’t visited any of the previous reviews, it is worth mentioning that this Historical Airport Schedules API uses REST which is awesome for a beginner developer like me. If you are in a similar situation, the advantage of this is that there are tons of libraries and sources for REST that you can find online as it is widely adopted.

The HTTPS requests I’ve used are GET. The past airport schedules API delivers JSON.

As always, here’s the URL I’ve used and the output historical airport schedule data I got:

GET https://data.aviyair.com/data/v1/historicalschedule?key=apikey&airport_iata=ATH&type=arrival&date_from=2023-05-17

  • I’ve received all 635 flights arriving at this airport on the given date in a single API call.

  • (You can also set a date range like &date_from=2023-05-17&date_to=2023-05-21)

Below is one flight in this past airport schedule data output as the example, specifically Tap Air Portugal flight TP7435 codeshared by Aegean Airlines flight A3609:

{
"type": "arrival",
"status": "landed",
"departure": {
"iataCode": "lhr",
"icaoCode": "egll",
"terminal": "2",
"gate": "a18",
"delay": 16,
"scheduledTime": "2023-05-16T22:15:00.000",
"estimatedTime": "2023-05-16T22:13:00.000",
"actualTime": "2023-05-16T22:31:00.000",
"estimatedRunway": "2023-05-16T22:31:00.000",
"actualRunway": "2023-05-16T22:31:00.000"
},
"arrival": {
"iataCode": "ath",
"icaoCode": "lgav",
"scheduledTime": "2023-05-17T03:50:00.000",
"estimatedTime": "2023-05-17T03:45:00.000",
"actualTime": "2023-05-17T03:47:00.000",
"estimatedRunway": "2023-05-17T03:47:00.000",
"actualRunway": "2023-05-17T03:47:00.000"
},
"airline": {
"name": "tap air portugal",
"iataCode": "tp",
"icaoCode": "tap"
},
"flight": {
"number": "7435",
"iataNumber": "tp7435",
"icaoNumber": "tap7435"
},
"codeshared": {
"airline": {
"name": "aegean airlines",
"iataCode": "a3",
"icaoCode": "aee"
},
"flight": {
"number": "609",
"iataNumber": "a3609",
"icaoNumber": "aee609"
}
}
}

Breaking Down the Historical Airport Schedules API Output

In most of the other platforms where historical airport schedule data is displayed, we see basic details like the airports, flight number, airline name, scheduled and actual departure and arrival times and that’s pretty much it. Even though you can keep it basic and only display these for UI’s sake, this API also includes ICAO codes, runway times, terminal, gate and total delay which I think is important. I’m already thinking of a model where I calculate the average delay rate in the last 1 year period for a flight and display this on the app.

One downside of this API is that it does not include the aircraft model which seems to be an important detail for a good number of users. I’ve contacted Aviyair and asked if adding aircraft data to the past airport schedules data feed would be possible. The answer was somehow adequate as they told me that this would not be possible directly, but they had other APIs that included aircraft data. If you MUST have this detail, I guess you can fetch aircraft data from their other APIs and combine this on your end as the flight number is the common piece of data to match according to their documentation.

When I think of historical airport timetable data, I think of a plain board in pretty much all airports like below, so this is not a priority for me:


My Verdict on This Historical Airport Schedule API 🤓

I signed up with Aviyair for their historical flight delay API but when I saw that I can expand my project quite further with their other real-time and historical APIs, I stayed for more.

To sum up, the past airport schedule API provides complete historical airport timetable data on the date or date range you give and delivers your API client fast JSON responses. Details include airport and airline details, actual, estimated and scheduled time, flight statuses like delays and cancellations, gate, baggage and terminal.

Since I am already using their other APIs, at this point it is very well worth the price point for me and as I am using more APIs, I’m thinking of upgrading my plan. This is where I got my API key.

The VERY bottom line is that I recommend this API 👍🏼


Let me know your thoughts on this API if you've tried it before or recommend similar aviation APIs from other providers for me to review!

Cheers! 🫡

0
Subscribe to my newsletter

Read articles from Rima Mann directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Rima Mann
Rima Mann

I've been an aviation enthusiast for as long as I can remember. Working on improving my skills in programming with a focus on app development. Mostly sharing good data finds here. Dad of 2 🤓