Introducing Aviyair’s Current Airline Schedules API
Tags: api, airlineapi, airlinedata, aviation
Published: 2023-12-18 07:48:00

Hello (aviation) world! We wanted to write this article to introduce you to a pretty useful API that we have built. [Aviyair’s Current Airline Schedules API](https://aviyair.com/access-current-airline-schedules-api/) delivers **real-time airline flight data feed with global coverage.** From large, international carriers to LCCs, the API has extensive coverage to answer projects for all markets.

In this article, we wanted to highlight the details you, as a developer, might be interested in when it comes to actual airline schedules data. We will cover the API's structure, methods, example request URLs and codes, show output samples, and give you all the useful links for everything else.

If you feel like you are about o **TL;DR**, find our full documentation link and API key link right at the end 🤓

---- 

<h2>Table of Contents</h2>
<ul>
  <li><a href="#current-airline-schedules-api-main-features">Current Airline Schedules API Main Features</a>
    <ul>
      <li><a href="#api-structure">API structure</a></li>
      <li><a href="#request-methods">Request Methods</a></li>
      <li><a href="#example-request-urls">Example request URLs</a></li>
      <li><a href="#example-request-codes">Example Request Codes</a></li>
      <li><a href="#successful-output-sample">Successful Output Sample</a></li>
    </ul>
  </li>
  <li><a href="#summary-and-api-key-links">Summary and API Key Links</a></li>
</ul>

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p93mzbwx9cahcrkaupjp.jpeg)

----

## Current Airline Schedules API Main Features

In this part, you will find basic information about the Current Airline Schedules API which should give you a good idea about whether it will be a good fit. 

### API structure

The current airline schedules API uses the REST structure to deliver actual airline schedules data. You can build your project using any of the major languages like Angular, C#, Go, JAVA, JQuery, Javascript, NodeJS, PHP, Python, R, Ruby, Rust, Scala, Strest, Swift, VueJS and more.

REST provides ease with integration due to its scalability, speed and optimization. We've ensured our servers are strong enough to answer all usage of our clients. The API delivers data fast, within the industry standards without matter how big the output size is and with basically no downtimes. 

-----

### Request Methods

The API uses the GET method only to deliver current airline schedules data. It simply fetches the real-time data feed from our servers and successfully displays it on your client.

**Server:** `https://data.aviyair.com/data/v1/`
**Endpoint:** /liveschedule?
**Obligatory parameters:** airport_iata and type (refers to the airport type which can be departure or arrival)
**Optional parameters:** departure_act_time, airline_iata, arrival_est_runway, departure_sch_time, arrival_delay, departure_est_time, arrival_iata, arrival_icao, arrival_act_runway, airline_icao, arrival_act_time, departure_est_runway, flight_iata, flight_number, departure_icao, departure_delay, arrival_terminal, departure_iata, flight_icao, airline_name, departure_terminal, arrival_sch_time, departure_act_runway and status.

-----

### Example Request URLs

Below are some example requests to fetch specifically filtered current airline schedules data focusing on the airline. You can also make queries by airline name such as "Qantas" or the ICAO code, such as "QFA".

<table border="1" cellspacing="0" cellpadding="5">
  <thead>
    <tr>
      <th>URL</th>
      <th>Method</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>https://data.aviyair.com/data/v1/liveschedule?key=[API_KEY]&amp;airport_iata=GRU&amp;type=departure&amp;airline_iata=QF</td>
      <td>GET</td>
      <td>All flights of Qantas off the real-time departure schedule of GRU</td>
    </tr>
    <tr>
      <td>https://data.aviyair.com/data/v1/liveschedule?key=[API_KEY]&amp;airport_iata=GRU&amp;type=departure&amp;airline_iata=QF&amp;status=cancelled</td>
      <td>GET</td>
      <td>All cancelled flights of Qantas off the real-time departure schedule of GRU</td>
    </tr>
    <tr>
      <td>https://data.aviyair.com/data/v1/liveschedule?key=[API_KEY]&amp;airport_iata=GRU&amp;type=departure&amp;airline_iata=QF&amp;flight_number=2462</td>
      <td>GET</td>
      <td>A specific flight of Qantas with flight details in real-time</td>
    </tr>
  </tbody>
</table>

-------

### Example request Codes

### Python

```python
import requests

API_KEY = 'your_api_key'  # replace with your actual API key

url = 'https://data.aviyair.com/data/v1/liveschedule'

params = {
    'key': API_KEY,
    'airport_iata': 'LHR',
    'type': 'arrival',
    'airline_iata': 'QF'
}

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

if response.status_code == 200:
    data = response.json()
    print(data)
else:
    print(f"Request failed with status code {response.status_code}")

```

### Javascript

```javascript
const API_KEY = 'your_api_key';  // replace with your actual API key

const url = new URL('https://data.aviyair.com/data/v1/liveschedule');

const params = {
    key: API_KEY,
    airport_iata: 'LHR',
    type: 'arrival',
    airline_iata: 'QF'
};

Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

fetch(url)
    .then(response => {
        if (response.ok) {
            return response.json();
        } else {
            throw new Error('Request failed');
        }
    })
    .then(data => console.log(data))
    .catch(error => console.error(error));

```

----

### Successful Output Sample

The Current Airline Timetables API returns all relevant flights you request at once. But for the sake of clarity, we've added only one flight from the complete current airline schedules data feed below.

As you can see, an important feature is that you will track real-time delays and flight status of airline flights. Flight status can be cancelled, active, landed, unknown, diverted, scheduled and en-route. This will allow you to build push notifications and offer personalized services.

> _**Tip:** Since the Actual Airline Schedules API focuses on traditional timetable data, it does not include aircraft details but this is possible to add by separately using our other APIs, at no additional costs!_


```
{
  "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"
  }
}
```

-----

## Summary and API Key Links

In this article, we mentioned that the Current Airport Timetables API of Aviyair delivers real-time airline flight status data, including all airlines from international giants to LCCs.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7c6yuvdfn7s1jkyodt61.jpeg)

The current airline schedules data feed includes these details for each airline flight in the response: **departure and arrival airport codes, airline IATA and ICAO codes and name, gate, terminal, baggage, scheduled/actual/estimated departure and arrival times, flight status, updated delay, optional aircraft details and more.**

-----

- Visit the **full documentation below** for everything else that we did not get to cover in this article:

{% embed https://aviyair.com/documentation/ %}

- You can **get your API key below** by creating a subscription below:

{% embed https://aviyair.com/pricing-subscription-plans/ %}

💵 Trial rates help with costs.
✅ Cancel anytime with no commitments or cancellation fees.
📌 No extra charges for exceeding API call limits.
💻 24/7 e-mail support included. ([**Contact Aviyair anytime**](https://aviyair.com/contact-aviyair/))