⌛Airport Schedule API
This API will provide you with complete schedule of any airport. You can get data according to arrivals and departures separately.
API endpoint for this API is: https://api.flightapi.io/compschedule
Guide
Your API requests are authenticated using API keys. Any request that doesn't include an API key will return an error.
You can generate an API key from your Dashboard at any time.
Here is the list of default parameters you have to use with this API:
api_key required
This is your personal API key. You can find this on your Dashboard.
String
mode required
The value of mode could be either arrivals
or departures
.
required
String
day required
The value of day could be as follows: -1(yesterday), -2(day before yesterday), 1(today), or 2(tomorrow) Not required
String
iata required
This is the IATA code of the airport. required
String
If you don't pass the day parameter then our API will respond with the complete schedule of the airport from the last 5 days to the next 5 days. Credit cost also depends on the number of days you receive.
Usage
You have to send a GET request to https://api.flightapi.io/compschedule
along with all the parameters.
Take a look at how you might call this API using various different coding languages.
curl "https://api.flightapi.io/compschedule/api_key?mode=departures&iata=DOH"
// require the Unirest or any other module to make an HTTP GET request
const unirest = require('unirest')
unirest.get('https://api.flightapi.io/compschedule/api_key?mode=departures&iata=DOH')
.then(response => {
console.log(response.body);
})
.catch(error => {
console.log(error);
});
// Set your API key before making the request
import requests
resp = requests.get('https://api.flightapi.io/compschedule/api_key?mode=departures&iata=DOH')
print (resp.json())
Response
The sample response of the API will look somewhat like this.
// Sample Response
{
"airport": {
"pluginData": {
"details": {
"name": "Doha Hamad International Airport",
"code": {
"iata": "DOH",
"icao": "OTHH"
},
"delayIndex": {
"arrivals": null,
"departures": null
},
"stats": null,
"position": {
"latitude": 25.273056,
"longitude": 51.608055,
"elevation": 13,
"country": {
"name": "Qatar",
"code": "QA",
"id": 179
},
"region": {
"city": "Doha"
}
},
"timezone": {
"name": "Asia/Qatar",
"offset": 10800,
"abbr": "+03",
"abbrName": null,
"isDst": false
},
"url": {
"homepage": "http://www.dohaairport.com/",
"webcam": null,
"wikipedia": "https://en.wikipedia.org/wiki/Hamad_International_Airport"
},
"airportImages": {
"thumbnails": [
{
"src": "https://cdn.jetphotos.com/200/6/90049_1422800586_tb.jpg",
"link": "https://www.jetphotos.com/photo/7976131",
"copyright": "Sebastian Thiel",
"source": "Jetphotos.com"
}
],
"medium": [
{
"src": "https://cdn.jetphotos.com/400/6/90049_1422800586.jpg",
"link": "https://www.jetphotos.com/photo/7976131",
"copyright": "Sebastian Thiel",
"source": "Jetphotos.com"
}
],
"large": [
{
"src": "https://cdn.jetphotos.com/640cb/6/90049_1422800586.jpg",
"link": "https://www.jetphotos.com/photo/7976131",
"copyright": "Sebastian Thiel",
"source": "Jetphotos.com"
}
]
},
"visible": true
},
"flightdiary": {
"url": "/data/airports/doh/reviews",
"ratings": {
"avg": 4.33,
"total": 4244
},
"comment": [
{
"content": "This airport is very very very big so when we arrived it took ages riding on the bus. The lounge was nice and it's food was good. The bathroom was very high in technology and the airport is quite close to the city. They had Wi-Fi but in Immigration they were very cautious so it took a long time to get to our gate. And the airport was covered in decorations everywhere!",
"author": {
"facebookId": null,
"name": "WMCP"
},
"timestamp": 1594547417
}
],
"reviews": 121,
"evaluation": 87
},
"schedule": {
"departures": {
"item": {
"current": 100,
"total": 206,
"limit": 100
},
"page": {
"current": 1,
"total": 3
},
"timestamp": 1594550280,
"data": [
{
"flight": {
"identification": {
"id": null,
"row": 5019209141,
"number": {
"default": "QR8221",
"alternative": null
},
"callsign": null,
"codeshare": null
},
"status": {
"live": false,
"text": "Scheduled",
"icon": null,
"estimated": null,
"ambiguous": false,
"generic": {
"status": {
"text": "scheduled",
"type": "departure",
"color": "gray",
"diverted": null
},
"eventTime": {
"utc": null,
"local": null
}
}
},
"aircraft": {
"model": {
"code": "74N",
"text": ""
},
"hex": "",
"registration": "",
"serialNo": "",
"images": null
},
"owner": null,
"airline": {
"name": "Qatar Airways",
"code": {
"iata": "QR",
"icao": "QTR"
},
"short": "Qatar Airways"
},
"airport": {
"origin": {
"timezone": {
"name": "Asia/Qatar",
"offset": 10800,
"abbr": "+03",
"abbrName": null,
"isDst": false
},
"info": {
"terminal": null,
"baggage": null,
"gate": null
}
},
"destination": {
"code": {
"iata": "FRA",
"icao": "EDDF"
},
"timezone": {
"name": "Europe/Berlin",
"offset": 7200,
"abbr": "CEST",
"abbrName": "Central European Summer Time",
"isDst": true
},
"info": {
"terminal": null,
"baggage": null,
"gate": null
},
"name": "Frankfurt Airport",
"position": {
"latitude": 50.037796,
"longitude": 8.555783,
"country": {
"name": "Germany",
"code": "DE",
"id": 83
},
"region": {
"city": "Frankfurt"
}
},
"visible": true
},
"real": null
},
"time": {
"scheduled": {
"departure": 1594550400,
"arrival": 1594572900
},
"real": {
"departure": null,
"arrival": null
},
"estimated": {
"departure": null,
"arrival": null
},
"other": {
"eta": null,
"duration": null
}
}
}
},
{
"flight": {
"identification": {
"id": null,
"row": 5019209199,
"number": {
"default": "QR8860",
"alternative": null
},
"callsign": null,
"codeshare": null
},
"status": {
"live": false,
"text": "Scheduled",
"icon": null,
"estimated": null,
"ambiguous": false,
"generic": {
"status": {
"text": "scheduled",
"type": "departure",
"color": "gray",
"diverted": null
},
"eventTime": {
"utc": null,
"local": null
}
}
},
"aircraft": {
"model": {
"code": "77W",
"text": ""
},
"hex": "",
"registration": "",
"serialNo": "",
"images": null
},
"owner": null,
"airline": {
"name": "Qatar Airways",
"code": {
"iata": "QR",
"icao": "QTR"
},
"short": "Qatar Airways"
},
...
}
}
It is just a sample API response. Some objects will have more attributes. A new array might also be there.
Last updated