Getting flights schedule: API: AirlineFlightSchedules

Dear All,

I am trying to use FlightAware’s API to get the flights (or scheduled flights) departing from a single airport within a defined time period.
Example: Get all flights departing from OEDF from Monday 9 AM UTC to Monday 11 AM UTC (Period of 2 hours).

I thought the API: AirlineFlightSchedules is suitable. When I call it, I get unexpected results (flights from outside this time period).
The time I provide is correct.

What does this mean “timestamp of earliest flight departure to return”?

Is the API I am using suitable? Should I be using another API?

Thanks!

Hi, there might be a problem with the timestamps you are using. Could you please tell me what your parameters are?
For example here are some examples to get the timestamps:
Monday 23, 11:00 local time GMT+3 =>(convert with UTC, not with GMT+3) => startDate = 1464001200
Monday 23, 13:00 local time GMT+3 =>(convert with UTC, not with GMT+3) => endDate = 1464008400

Thanks for your quick reply!

I expect the departure to be within the specified period. As shown below, it is not.

flightxml.flightaware.com/json/F … ation=OEJN

Results:
{
“AirlineFlightSchedulesResult”: {
“next_offset”: -1,
“data”:
{
“ident”: “THY94”,
“actual_ident”: “”,
“departuretime”: 1464369300,
“arrivaltime”: 1464383700,
“origin”: “LTBA”,
“destination”: “OEJN”,
“aircrafttype”: “A332”,
“meal_service”: “Business: Meal / Economy: Meal”,
“seats_cabin_first”: 0,
“seats_cabin_business”: 18,
“seats_cabin_coach”: 202
},
{
“ident”: “SVA1047”,
“actual_ident”: “”,
“departuretime”: 1464368400,
“arrivaltime”: 1464374400,
“origin”: “OERK”,
“destination”: “OEJN”,
“aircrafttype”: “”,
“meal_service”: “First: Meal / Business: Meal / Economy: Meal”,
“seats_cabin_first”: 30,
“seats_cabin_business”: 31,
“seats_cabin_coach”: 183
},
{
“ident”: “RJA700”,
“actual_ident”: “”,
“departuretime”: 1464369300,
“arrivaltime”: 1464377100,
“origin”: “OJAI”,
“destination”: “OEJN”,
“aircrafttype”: “E170”,
“meal_service”: “Business: Dinner / Economy: Dinner”,
“seats_cabin_first”: 0,
“seats_cabin_business”: 12,
“seats_cabin_coach”: 88
},
{
“ident”: “TAR713”,
“actual_ident”: “”,
“departuretime”: 1464375300,
“arrivaltime”: 1464390600,
“origin”: “DTTA”,
“destination”: “OEJN”,
“aircrafttype”: “A332”,
“meal_service”: “”,
“seats_cabin_first”: 0,
“seats_cabin_business”: 0,
“seats_cabin_coach”: 267
},
{
“ident”: “SVA1463”,
“actual_ident”: “”,
“departuretime”: 1464369300,
“arrivaltime”: 1464373200,
“origin”: “OEMA”,
“destination”: “OEJN”,
“aircrafttype”: “A320”,
“meal_service”: “Business: Meal / Economy: Meal”,
“seats_cabin_first”: 0,
“seats_cabin_business”: 12,
“seats_cabin_coach”: 138
},
{
“ident”: “SVA759”,
“actual_ident”: “”,
“departuretime”: 1464359400,
“arrivaltime”: 1464378600,
“origin”: “VIDP”,
“destination”: “OEJN”,
“aircrafttype”: “B772”,
“meal_service”: “Economy: Meal”,
“seats_cabin_first”: 0,
“seats_cabin_business”: 0,
“seats_cabin_coach”: 291
},
{
“ident”: “MSR669”,
“actual_ident”: “”,
“departuretime”: 1464371400,
“arrivaltime”: 1464379200,
“origin”: “HECA”,
“destination”: “OEJN”,
“aircrafttype”: “A330”,
“meal_service”: “Business: Meal / Economy: Meal”,
“seats_cabin_first”: 0,
“seats_cabin_business”: 36,
“seats_cabin_coach”: 265
},
{
“ident”: “SVA302”,
“actual_ident”: “”,
“departuretime”: 1464372000,
“arrivaltime”: 1464383700,
“origin”: “HECA”,
“destination”: “OEJN”,
“aircrafttype”: “A333”,
“meal_service”: “Economy: Meal”,
“seats_cabin_first”: 0,
“seats_cabin_business”: 0,
“seats_cabin_coach”: 268
},
{
“ident”: “SVA769”,
“actual_ident”: “”,
“departuretime”: 1464361200,
“arrivaltime”: 1464381900,
“origin”: “VOMM”,
“destination”: “OEJN”,
“aircrafttype”: “A333”,
“meal_service”: “Economy: Meal”,
“seats_cabin_first”: 0,
“seats_cabin_business”: 0,
“seats_cabin_coach”: 268
},
{
“ident”: “AZA5384”,
“actual_ident”: “SVA1125”,
“departuretime”: 1464369000,
“arrivaltime”: 1464377100,
“origin”: “OEDF”,
“destination”: “OEJN”,
“aircrafttype”: “A333”,
“meal_service”: “”,
“seats_cabin_first”: 0,
“seats_cabin_business”: 0,
“seats_cabin_coach”: 268
},
{
“ident”: “KNE409”,
“actual_ident”: “”,
“departuretime”: 1464369600,
“arrivaltime”: 1464378600,
“origin”: “OEDF”,
“destination”: “OEJN”,
“aircrafttype”: “A320”,
“meal_service”: “Business: Food for sale / Economy: Food for sale”,
“seats_cabin_first”: 0,
“seats_cabin_business”: 12,
“seats_cabin_coach”: 138
},
{
“ident”: “SVA803”,
“actual_ident”: “”,
“departuretime”: 1464369600,
“arrivaltime”: 1464377400,
“origin”: “OEDF”,
“destination”: “OEJN”,
“aircrafttype”: “B772”,
“meal_service”: “Economy: Meal”,
“seats_cabin_first”: 0,
“seats_cabin_business”: 0,
“seats_cabin_coach”: 291
},
{
“ident”: “SVA1125”,
“actual_ident”: “”,
“departuretime”: 1464369000,
“arrivaltime”: 1464377100,
“origin”: “OEDF”,
“destination”: “OEJN”,
“aircrafttype”: “A320”,
“meal_service”: “Business: Meal / Economy: Meal”,
“seats_cabin_first”: 0,
“seats_cabin_business”: 12,
“seats_cabin_coach”: 138
}
]
}
}

Yes, the times you get are UTC, so they may not be within the range you provide because startDate and endDate are local times, but converted to timestamps using UTC timezones. They are sort of fake timestamps. If you explain what local times you want to use, I can show you another conversion.
It is a bit confusing but it is an old call that could be improved.

My use case does not require a specific time zone, however, I am calling airports in different time zones. How will that affect the results?

OEJN is an airport in a +3 time zone. If I want the flights from “now” until 2 hours later, what should I send? what will I receive?

I appreciate your help.

Just to clarify your original intent, the AirlineFlightSchedules provides data regarding airline schedules that are published months in advance and does not capture up-to-the-minute flight data. However, if you are looking for flights that are still more than 48 hours from departure then this will be your only option. The AirlineFlightSchedules data is updated infrequently (once per month) and so long-running applications using it typically will capture data for whole days ahead of time a further filter results locally rather than for just a narrow numbers of hours.

If you you instead are looking for flights less than 48 hours in the future, then using the Scheduled/Enroute/Arrived/Departed functions are probably the ones you should be looking at, since it includes more recent flight plans that may not have scheduled by airlines that far in advance, and can incorporate cancellations and delay information. You will need to perform local filtering of the results to limit the data just the specific timeframe however,

I’ll try the API you mentioned. Thanks!