Introducing Aviyair’s Current Airport Schedules API

aviyair

Aviyair

Posted on November 6, 2023

Introducing Aviyair’s Current Airport Schedules API

Hello, developers of dev.to! Today, we wanted to you to meet Aviyair’s Current Airport Schedules API which is an optimal data tool to fetch real-time timetable data of airports worldwide. With its constant updates and detailed coverage, you will find this API good enough to invest your time in 🤓

In this article, we will show you all the basics like example 200 OK output, object descriptions, request codes and what other APIs you can combine this one with. You will find useful links at the bottom such as the full documentation and where to get your API key.


Table of Contents

  1. What is the Current Airport Schedules API About
  2. URL Methods and Parameters
  3. Example Python Request Code and 200 OK Output with Descriptions
  4. Generating an API Key and Requesting Support

Image description


What is the Current Airport Schedules API About

The Current Airport Schedules API is a REST API, which means it’s simple, scalable and highly adaptable. Using HTTP requests via the GET method, the API delivers data in JSON. As you know, JSON is a lightweight, flexible and easy-to-read data format that is widely used with REST APIs for its speed, accessibility and making way to build powerful web applications.

The API delivers current airport schedules data and updates constantly, allowing you to display virtual, real-time airport timetables on your website or app. The real-time updates include the flight status, current delay and estimated departure and arrival times among many other essential info. Especially the real-time flight delay data and the status plays a big role in many travel and aviation-related apps where it is essential for the service provider to keep track of the last-minute changes in their customers’ flights.

By integrating the API, you can build push notifications for flight cancellations, delays, gate and terminal information or display a virtual map of airport traffic, all updated in real-time.

Now let’s see how to fetch data, what the delivered current airport schedules data looks like and break down the objects in the response.


URL Methods and Parameters

Server: https://data.aviyair.com/data/v1/
Endpoint: /liveschedule?
Obligatory parameters: airport_iata and type
Optional parameters: status, departure_iata, departure_icao, departure_terminal, departure_delay, departure_sch_time, departure_est_time, departure_act_time, departure_est_runway, departure_act_runway, arrival_iata, arrival_icao, arrival_terminal, arrival_delay, arrival_sch_time, arrival_est_time, arrival_act_time, arrival_est_runway, arrival_act_runway, airline_name, airline_iata, airline_icao, flight_number, flight_iata and flight_icao
Method: GET

Example URLs

URL Example Method Description
https://data.aviyair.com/data/v1/liveschedule?key=APIKEY&airport_iata=DEL&type=departure GET The real-time schedule of DEL’s departures
https://data.aviyair.com/data/v1/liveschedule?key=APIKEY&airport_iata=DEL&type=departure&status=cancelled GET All currently canceled flights departing from DEL. The status can also be set as active, started, en-route, landed and unknown
https://data.aviyair.com/data/v1/liveschedule?key=APIKEY&airport_iata=DEL&type=arrival&airline_iata=SG&flight_number=54 GET Current schedule info of SpiceJet’s flight SG54

Example Python Request Code and 200 OK Output with Descriptions

You can use the below code for Python to request current airport schedule data in JSON format. If the call is unsuccessful for any reason, this will not consume calls from your API call limit.

import requests

url = "https://data.aviyair.com/data/v1/liveschedule"
params = {
    "key": "[API_KEY]",
    "airport_iata": "GRU",
    "status": "cancelled"
}

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

Successful Current Airport Timetable Data Output

{
  "status": {
    "message": "Success"
  },
  "results": {
    "airline": {
      "iataCode": "ID",
      "icaoCode": "BTK",
      "name": "Batik Air"
    },
    "arrival": {
      "actualRunway": "2023-03-15T14:23:00.000",
      "actualTime": "2023-03-15T14:23:00.000",
      "baggage": null,
      "delay": null,
      "estimatedRunway": "2023-03-15T14:23:00.000",
      "estimatedTime": "2023-03-15T14:21:00.000",
      "gate": null,
      "iataCode": "MKZ",
      "icaoCode": "WMKM",
      "scheduledTime": "2023-03-15T14:50:00.000",
      "terminal": null
    },
    "codeshared": null,
    "departure": {
      "actualRunway": "2023-03-15T12:49:00.000",
      "actualTime": "2023-03-15T12:49:00.000",
      "baggage": null,
      "delay": "4",
      "estimatedRunway": "2023-03-15T12:49:00.000",
      "estimatedTime": null,
      "gate": null,
      "iataCode": "PKU",
      "icaoCode": "WIBB",
      "scheduledTime": "2023-03-15T12:45:00.000",
      "terminal": null
    },
    "flight": {
      "iataNumber": "ID311",
      "icaoNumber": "BTK311",
      "number": "311"
    },
    "status": "landed",
    "type": "arrival"
  }
}
Enter fullscreen mode Exit fullscreen mode

Object Table and Descriptions

Object Description
status The overall status of the API response
status.message The status message indicating if the request was successful
airline Information about the airline
airline.iataCode The IATA code of the airline
airline.icaoCode The ICAO code of the airline
airline.name The name of the airline
arrival Information about the flight's arrival
arrival.actualRunway The actual runway arrival time
arrival.actualTime The actual arrival time
arrival.baggage The baggage claim information (if available)
arrival.delay The arrival delay (in minutes)
arrival.estimatedRunway The estimated runway arrival time
arrival.estimatedTime The estimated arrival time
arrival.gate The arrival gate information (if available)
arrival.iataCode The IATA code of the arrival airport
arrival.icaoCode The ICAO code of the arrival airport
arrival.scheduledTime The scheduled arrival time
arrival.terminal The arrival terminal information (if available)
codeshared Information about codeshare agreements (if applicable)
departure Information about the flight's departure
departure.actualRunway The actual runway departure time
departure.actualTime The actual departure time
departure.baggage The baggage check-in information (if available)
departure.delay The departure delay (in minutes)
departure.estimatedRunway The estimated runway departure time
departure.estimatedTime The estimated departure time
departure.gate The departure gate information (if available)
departure.iataCode The IATA code of the departure airport
departure.icaoCode The ICAO code of the departure airport
departure.scheduledTime The scheduled departure time
departure.terminal The departure terminal information (if available)
flight Information about the flight itself)
flight.iataNumber The IATA flight number
flight.icaoNumber The ICAO flight number
flight.number The flight number
status The flight's current status (e.g., "landed")
type The flight type (e.g., "arrival")

Tip: Some objects may appear null in the current airport schedules data output if a value (number) is not assigned IRL. For example, some airports may have one gate or one terminal and in this case, a number may not have been assigned to them.


Documentation

Visit the full documentation for both the Current Airport Timetables API and others 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

Generating an API Key and Requesting Support

In summary, the Current Airport Timetables API is a REST API that delivers real-time airport schedule data with constant real-time updates. The JSON output includes necessary details like real-time flight status (with cancellations) and delay, departure and arrival airports, flight number and airline details, scheduled/estimated/actual departure and arrival times with terminal, gate and baggage.

The API access takes one minute and we will provide support before and after you sign up, every step of the way. It is a good choice as a data tool to integration into powerful projects. It has global coverage for airports.

Get your API key easily below!

Pricing - Aviyair

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

favicon aviyair.com

✅ Cancel your subscription anytime. No commitments.
✅ You will not get charged more if you reach your API call limit. No hidden fees.
✅ Upgrade your plan anytime if you need more calls.


Image description

💖 💪 🙅 🚩
aviyair
Aviyair

Posted on November 6, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related