DEV Community

Aviyair
Aviyair

Posted on

Aviyair Historical Airline Schedules API Explanation

Aviyair’s Historical Airline Schedules API is a good find to fetch past schedules of airlines, globally. This useful API not only offers complete data but many other awesome features like support from a team experienced in aviation and travel, access to many other related APIs, a kick-ass SLA and more.

Below, we will mention the API’s routes, parameters, methods, request code and output examples with useful details. If you are the type of developer who likes to dive in head-on, find the documentation and API key links at the bottom to test the API yourself, blindfolded. 🤓

Image description


Table of Contents

  1. Historical Airline Schedules API General Info
  2. URL Examples with API Methods and Parameters
  3. Example Request Code and Output
  4. Conclusion and Getting Your API Key

Historical Airline Schedules API Structure General Info

Here are a few initial things to know about the past airline schedules data before investing your time and how it can benefit you.

🔎 It is a REST API which will make the integration phase relatively easy for you. This is because REST is known for its high adaptability, optimization and success in caching responses effectively. It also allows you to work with pretty much any programming language easily without having to learn a whole bunch of brand-new methods and techniques.

🔎 The delivery format is JSON which is widely adaptable and easy to work on directly or convert. It is the format that everybody likes.

🔎 The API was developed by a team that’s experienced in the industry. If you are working on a solution for a travel or aviation platform, support that comes from people who have worked with a ton of businesses in the industry will be a plus.

🔎 You will have flexibility with the costs. On top of the support and access to good historical airline schedules data, Aviyair also helps developers save on costs by applying great discounts for the first 2 weeks. We understand the importance of testing, and by testing we don’t mean just a few API calls but the start of the whole integration. We are also open to discussing custom plans you can afford, based on your unique requirements.

Image description


URL Examples with API Methods and Parameters

All routes of the Past Airline Schedules API use the GET method. The “&airport_iata=”, “&type=” and “&date_from=” parameters are obligatory in the URL.

  • Add "&date_to=" to specify a date range. Remember that the date range cannot be too far but you can request different ranges and different days under different API calls simultaneously.
  • Add "&airline_iata=" to specify the airline.
  • Add "&flight_num=" to track the record of a single flight.
URL Example Method Description
https://data.aviyair.com/data/v1/historicalschedule?key=APIKEY&airport_iata=DEL&type=departure&date_from=2023-04-17&airline_iata=SG GET All flights of SpiceJet departing from DEL on 2023-04-17
https://data.aviyair.com/data/v1/historicalschedule?key=APIKEY&airport_iata=DEL&type=arrival&date_from=2023-04-17&date_to=2023-04-19&airline_iata=SG GET All flights of SpiceJet arriving at DEL between 2023-04-17 and 2023-04-19 (3 days included)
https://data.aviyair.com/data/v1/historicalschedule?key=APIKEY&airport_iata=DEL&type=arrival&date_from=2023-05-03&airline_iata=SG&flight_number=54 GET Schedule data of SpiceJet’s flight SG54 on 2023-05-03

Example Request Code and Output

Use the simple code for Python below to request data from the Past Airline Schedules API. Unsuccessful calls will not hurt your API call limit.

import requests

url = "https://data.aviyair.com/data/v1/historicalschedule?"
params = {
    "apiKey": "APIKEY",
    "airport_iata": "JFK",
    "type": "departure",
    "date_from": "2022-08-01",
    "date_to": "2022-08-10",
    "airline_iata": "AA",
}

response = requests.get(url, params=params)

if response.status_code == 200:
    data = response.json()
    print(data)
else:
    print("Error:", response.status_code)
Enter fullscreen mode Exit fullscreen mode

Check out what the historical airline schedules data looks like for every flight of the airline in the response.

{
  "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 Table and Descriptions

Object Description
status Status of the API request
airline.iataCode The airline IATA code
airline.icaoCode The airline ICAO code
airline.name The name of the airline
arrival.actualRunway Actual runway time at arrival
arrival.actualTime Actual arrival time
arrival.baggage Baggage belt number
delay Flight delay measured in minutes
arrival.estimatedRunway Estimated runway arrival time
arrival.estimatedTime Estimated arrival time
arrival.gate Arrival gate
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 Departure airport IATA code
departure.icaoCode Departure airport ICAO code
departure.scheduledTime Scheduled departure time
departure.terminal Departure terminal
flight.iataNumber The IATA flight number
flight.icaoNumber The ICAO flight number
flight.number The flight number
status Latest recorded flight status
type The type of flight data (arrival or departure)

See the full documentation below.

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

Conclusion and Getting Your API Key

The Historical Airline Schedules Data is pretty much a one-in-all solution to integrate into travel and aviation projects.

  • It provides airline codes/names, flight numbers, flight status and delay, gate, baggage belt, terminal, scheduled and actual departure and arrival times and much more with a single API. Analyze airline and route performance, display past airline schedules and build personalized and optimized solutions that rely on data.

  • Thanks to the global coverage of the Historical Airline Schedule API, your solutions will answer every market.

  • You can contact Aviyair anytime. for your questions and support requests.

Get your API key today!

Pricing - Aviyair

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

favicon aviyair.com

Tips to keep in mind:

✅ You can cancel your subscription anytime. The access comes as a subscription, only to ensure that your data flow is flawless and uninterrupted. We don’t ask for any commitments.
✅ There are no hidden or extra fees. We will not charge you extra if you accidentally reach your past airline timetables API limit. The API will simply give you a warning so you can go and easily upgrade your plan on your dashboard.


Image description

Top comments (0)