DEV Community

Aviyair
Aviyair

Posted on

Historical Flight Delay API for Flight Delay Monitoring

Today, we want you to meet Aviyair’s Historical Flight Delay API to get all the details you need with historical flight delay information. With its versatile use case opportunities such as

  • Calculating the average flight delay and cancellation rate of an airport, airline or a certain flight or route,
  • Providing data-driven solutions to passengers and airlines about flight delay and cancellation claims,
  • Displaying real-time and historical flight delays to optimize and personalize travel and hospitality services,
  • Airline competition analysis,
  • Airport operation enhancement

…and much more, this JSON REST API can be just the data source. In this article, you can find the basics to learn more about the data and useful links like full documentation and getting the API key to start building today. TL;DR? Find the API key link below and test the API right away! 🛫

Image description

  1. API Structure and Languages Supported
  2. Historical Flight Delay API 200 OK Output
  3. Getting Your API Key
  4. API Methods and Parameters
  5. Top 3 Historical Flight Delay API Use Cases
  6. Conclusion and API Key Link

API Structure and Languages Supported

The Historical Flight Delay API uses REST structure which is a widely-adopted architectural style that has gained popularity due to its simplicity and ease of integration. Thanks to this structure’s ability to cache responses effectively, your product’s performance will be well-optimized and reduce the load on both client and the server. It’s a win-win for all! Another good use of the API’s structure is that it allows working with any major programming language like Python, PHP, Ruby, Swift, JavaScript, Go, and others, so it addresses developers of all backgrounds.

Image description


Past Flight Delay API 200 OK Output

Before investing in, we’re sure you’d like to view an example output for the Past Flight Delay API first. You will find below a 200 OK successful response example for a single flight. Note that you can fetch the complete schedule for that date or just a single flight in one API call, but we’ve reduced the example to one flight so it’s easier on the eyes.

The example is followed by a breakdown of each object in the output and their descriptions. If the detail you are looking for is not here, let us know and we’ll help you. For example, if you are aiming to display aircraft details along with the historical flight delay data, our other APIs could work nicely. The main advantage of this is that you’ll get to access everything with a single API key and data provider!

API Output

{
  "status": {
    "message": "Success"
  },
  "results": {
    "status": {
      "message": "Success"
    },
    "results": {
      "airline": {
        "iataCode": "AF",
        "icaoCode": "AFR",
        "name": "Air France"
      },
      "arrival": {
        "actualRunway": "2022-08-11T11:48:00.000",
        "actualTime": "2022-08-11T11:48:00.000",
        "baggage": "05",
        "delay": null,
        "estimatedRunway": "2022-08-11T11:48:00.000",
        "estimatedTime": "2022-08-11T11:43:00.000",
        "gate": "2",
        "iataCode": "ORY",
        "icaoCode": "LFPO",
        "scheduledTime": "2022-08-11T12:00:00.000",
        "terminal": "2"
      },
      "departure": {
        "actualRunway": "2022-08-11T10:35:00.000",
        "actualTime": "2022-08-11T10:35:00.000",
        "baggage": "4",
        "delay": "6",
        "estimatedRunway": "2022-08-11T10:35:00.000",
        "estimatedTime": "2022-08-11T10:30:00.000",
        "gate": "2C",
        "iataCode": "NCE",
        "icaoCode": "LFMN",
        "scheduledTime": "2022-08-11T10:30:00.000",
        "terminal": "2"
      },
      "flight": {
        "iataNumber": "AF6209",
        "icaoNumber": "AFR6209",
        "number": "6209"
      },
      "status": "landed",
      "type": "arrival"
    }
  }
}
Enter fullscreen mode Exit fullscreen mode
Object Description
status.message Status of the API request
airline.iataCode The IATA code of the airline
airline.icaoCode The ICAO code of the airline
airline.name The name of the airline
arrival.actualRunway Actual runway arrival time
arrival.actualTime Actual arrival time
arrival.baggage Baggage claim number
arrival.delay Arrival delay in minutes
arrival.estimatedRunway Estimated runway arrival time
arrival.estimatedTime Estimated arrival time
arrival.gate Arrival gate number
arrival.iataCode The IATA code of the arrival airport
arrival.icaoCode The ICAO code of the arrival airport
arrival.scheduledTime Scheduled arrival time
arrival.terminal Arrival terminal number
departure.actualRunway Actual runway departure time
departure.actualTime Actual departure time
departure.baggage Baggage claim number at departure airport
departure.delay Departure delay in minutes
departure.estimatedRunway Estimated runway departure time
departure.estimatedTime Estimated departure time
departure.gate Departure gate number
departure.iataCode The IATA code of the departure airport
departure.icaoCode The ICAO code of the departure airport
departure.scheduledTime Scheduled departure time
departure.terminal Departure terminal number
flight.iataNumber The IATA flight number
flight.icaoNumber The ICAO flight number
flight.number The flight number
status The flight status
type The type of flight data (arrival or departure)

Visit the full documentation below for everything.

Documentation - Aviyair

Aviyair's documentation gives you all technical aspects of integrating the flight data into softwares or products. API response and requests are provided.

favicon aviyair.com

Getting Your API Key

Getting your API key for the past flight delay data takes one minute only. Simply create an account on the below button and receive the unique API key to your email. Your access will renew every month automatically unless you cancel it to make sure your data flow is uninterrupted but it is possible to cancel any time before the renewal every month.

You can also start with a basic plan and upgrade later if you need more API calls along the way.

No hidden fees or unauthorized charges if you exceed your limit.


API Methods and Parameters

The Past Flight Delay API routes rely on the GET method. By using only the obligatory parameters of the API key, airport IATA code and the schedule type, you will fetch the complete schedule of that date, with the total delay information included for each flight in the output.

✅ Delay is calculated in minutes.

✅ You can use filters to get a specific flight or airline.

✅ You can request consecutive historical dates at once.

Route Method Description
https://data.aviyair.com/data/v1/historicalschedule?key=APIKEY&airport_iata=CGK&type=departure&date_from=2023-01-01 GET Departure schedule of CGK on 2023-01-01 with delays for every flight
https://data.aviyair.com/data/v1/historicalschedule?key=APIKEY&airport_iata=CGK&type=departure&date_from=2023-01-01&airline_iata=QZ GET Departure schedule of CGK on 2023-01-01 with delays for every flight of Indonesia AirAsia
https://data.aviyair.com/data/v1/historicalschedule?key=APIKEY&airport_iata=CGK&type=departure&date_from=2023-01-01&airline_iata=QZ&flight_number=265 GET Delay data and other details for flight QZ265 on 2023-01-01

If you prefer ICAO codes instead, you can use these. For example, “airport_icao=”, “airline_icao=”, etc., are available. The full list of parameters is in the documentation.

Useful Tip: Aviyair’s historical flight delay data has GLOBAL coverage, meaning you can get all international airports worldwide and provide your services to a multinational clientele.


Top 3 Historical Flight Delay API Use Cases

The historical flight delay and flight cancellation API has versatile use-case potential with its details for historical output for global flights. Here are the top 3 use cases of our clients for inspiration:

  • Flight delay and cancellation claims: The past flight delay and cancellation data is a good source for businesses that provide data-driven answers to passenger claims.
  • Analyse average delay and cancellation rates: The historical data is useful to calculate the average delay and cancellation rates for airlines, airports or a specific route.
  • Optimize airport operations: The data also allows analyzing if there is a cumulation in delay for a certain terminal of an airport. With this data, airports can optimize and diversify their operations and manpower more logically.

Tip: Interested in increasing the online visibility of your solutions powered by Aviyair’s data? Send us an email about this and let’s talk about opportunities!


Conclusion and API Key Link

With this, we have talked about Aviyair’s Past Flight Delay and Cancellation API and how it can be a useful data source with its global, historical data. We mentioned that the data includes details such as airline, airport, scheduled/estimated/actual departure and arrival times, flight status, terminal, gate, baggage, delay and more.

Access to the Historical Flight Delay and Cancellation API below is very easy and takes 1 minute. With their background in aviation, Aviyair team is here to help if you have any questions or request support. Contact Aviyair anytime.

Pricing - Aviyair

Aviyair offers three main subscriptions plans for flight schedules data, airport timetables and airline routes information.

favicon aviyair.com

Tip: If you need less or more API calls than our fixed plans, we can get you a custom offer.

Top comments (0)