Get Scheduled Information from API


#1

I am new to FlightAware API I have able to manage Flight Activity from FlightInfoEx function but this function does not return

below information shown in screenshot about scheduled flights

http://www.freeimagehosting.net/newuploads/yu1ng.jpg

how do i get these shown information on site using API ?


#2

Sometimes FlightInfoEx will be able to return a few upcoming/future flights for the requested ident, however it is not always to do so if the flight plan has not yet been received from the carrier.

If you really want to show future flights when FlightInfoEx is not able to return them, you can use the AirlineFlightSchedules function to manually query future flights within a specified date range (far beyond even what is displayed on our website) and display them that way.


#3

Thank you very much for your time to answer me bovineone

I was able to call AirlineFlightSchedules and get Additional Scheduled details.

and was able to fetch schedule information like below

Here is What I get In AirlineFlightSchedules API call

Flight Information is correct origin to destination etc but **arrival and depart time is deffer why is it so **?

When I call FlightInfoEx the dates and time are matching with site data but in schedule case it does not is there Any thing I have to do to get it correct as site data display ?

Question 2 : let assume I got above problem corrected after you assist how do I Get Detailed information about that same scheduled Flight like FlightInfoEx returns flightID and we are able to call another function to get Detailed information.

I tired to get Information like

flightxml.flightaware.com/json/F … 1365573240

but it does not return anything “flight not found”


#4

For question 1, the website localizes times according to your FlightAware user preferences, which appear to be set to “always show flights in my time zone”. FlightXML returns epochs, which you can convert to the timezone of your choice, and most programming languages default to UTC.


#5

I know about timezone thing and converted date to IST too.
I am using same kind of conversion when getting results from FlightInfoEx and it does match with site’s shown flight activity dates but in case of Schedules it does not.

Please help :frowning:


#6

AirlineFlightSchedules only returns the flight plans that have been published by airlines far in advance (weeks or months ahead of time) and does not reflect live flight delays or operational changes. Although there is usually a match between the scheduled departure times from AirlineFlightSchedules as the “filed_departuretime” of FlightInfoEx, the airlines sometimes make minor changes to times when they actually file the flight plans. Because of these normal differences, you cannot expect GetFlightID to always work with the times that AirlineFlightSchedules returns.

FlightInfoEx returns multiple flights for the ident you request (currently enroute, past flights, and a few future flights). Be sure that you are looking at all of the flights that it returns, and not just the first flight. Whenever I’ve compared the return of FlightXML2’s FlightInfoEx and the display on our website, the number of future flights have been identical, but it would not surprise me if the website sometimes is able to show more than FlightInfoEx does.

As I mentioned before, you should not assume that you can reproduce the appearance of our website using exclusively the FlightXML API. Although much of the data is available though our API, not all of it is.


#7

sad to hear I can not get those information from API like site displays as If I cant get correct departureTime in AirlineFlightSchedules result I cant call GetFlightID from which i want FlightID to get gates related information for that scheduled flight because of that.

thanks for your help.


#8

Are you sure that FlightInfoEx does not return the same number of future flights as you see on the website? It has for the instances that I’ve checked.


#9

FlightInfoEx is working correct it does returns same info as Website displays . But My concern is about AirlineFlightSchedules function.
I want More information about result returned by "AirlineFlightSchedules " for those results i want gate information.

My Objective here is to get Future Flights Information sames as Site displays with duration = “Scheduled”

so here are steps I am doing :

Step 1 : I call AirlineFlightSchedules with startDate = today and endDate = today+1( I want information about flights 1 day ahead) and also FlightNo and airline.
Step 2 : I get information about future flights from above call .( Here information does not match with site data) as per shown in screenshot timings of Duration =“Scheduled” flight does not match with AirlineFlightSchedules results. other data does match as its from flightInfoEx"
Step 3 : Now I want more information for above results.
Step 4 : Because i want more Information about result of AirlineFlightSchedules I need faFlightID. So, from AirlineFlightSchedules result i take ident@departureTime and pass it as argument to GetFlightID function . but it returns “no flight found”.

Here I assume that because I am not getting correct departureTime in AirlineFlightSchedules result I cant get correct faFlightID as ident@departureTime will not correct becuase of departure time mismatch.

this is the problem.


#10

Disregard AirlineFlightSchedules. That is not necessary for you to retrieve near-term future flights. I mentioned it only if you needed far future flights.

FlightInfoEx already returns a small number of future flights when you call it. For the exact flight you just mentioned, one of the first two rows in the returned result represents the future flight you wanted. See the part I have highlighted in bold.

flightxml.flightaware.com/json/F … ent=UAL450

{“FlightInfoExResult”:{“next_offset”:15,“flights”:{“faFlightID”:“UAL450-1365743875-airline-0143”,“ident”:“UAL450”,“aircrafttype”:“B752”,“filed_ete”:“04:42:00”,“filed_time”:1365744748,“filed_departuretime”:1365981600,“filed_airspeed_kts”:379,“filed_airspeed_mach”:"",“filed_altitude”:0,“route”:"",“actualdeparturetime”:0,“estimatedarrivaltime”:1365999120,“actualarrivaltime”:0,“diverted”:"",“origin”:“KCLE”,“destination”:“KLAX”,“originName”:“Cleveland-Hopkins Intl”,“originCity”:“Cleveland, OH”,“destinationName”:“Los Angeles Intl”,“destinationCity”:“Los Angeles, CA”},{“faFlightID”:“UAL450-1365658357-airline-0017”,“ident”:“UAL450”,“aircrafttype”:“A320”,“filed_ete”:“05:54:00”,“filed_time”:1365658357,“filed_departuretime”:1365865200,“filed_airspeed_kts”:361,“filed_airspeed_mach”:"",“filed_altitude”:0,“route”:"",“actualdeparturetime”:0,“estimatedarrivaltime”:1365887040,“actualarrivaltime”:0,“diverted”:"",“origin”:“KEWR”,“destination”:“KLAX”,“originName”:“Newark Liberty Intl”,“originCity”:“Newark, NJ”,“destinationName”:“Los Angeles Intl”,“destinationCity”:“Los Angeles, CA”},{“faFlightID”:“UAL450-1365485620-airline-0023”,“ident”:“UAL450”,“aircrafttype”:“A319”,“filed_ete”:“00:36:00”,“filed_time”:1365742639,“filed_departuretime”:1365740940,“filed_airspeed_kts”:480,“filed_airspeed_mach”:"",“filed_altitude”:220,“route”:“IDU4 IDU WLEEE BITER6”,“actualdeparturetime”:1365743280,“estimatedarrivaltime”:1365744929,“actualarrivaltime”:1365745080,“diverted”:"",“origin”:“KIAH”,“destination”:“KAUS”,“originName”:“Houston Bush Int’ctl”,“originCity”:“Houston, TX”,“destinationName”:“Austin-Bergstrom Intl”,“destinationCity”:“Austin, TX”},{“faFlightID”:“UAL450-1365399154-airline-0017”,“ident”:“UAL450”,“aircrafttype”:“A320”,“filed_ete”:“00:28:00”,“filed_time”:1365655054,“filed_departuretime”:1365654360,“filed_airspeed_kts”:387,“filed_airspeed_mach”:"",“filed_altitude”:200,“route”:“IDU4 IDU WLEEE BITER6”,“actualdeparturetime”:1365654240,“estimatedarrivaltime”:1365656640,“actualarrivaltime”:1365656700,“diverted”:"",“origin”:“KIAH”,“destination”:“KAUS”,“originName”:“Houston Bush Int’ctl”,“originCity”:“Houston, TX”,“destinationName”:“Austin-Bergstrom Intl”,“destinationCity”:“Austin, TX”},{“faFlightID”:“UAL450-1365312608-airline-0037”,“ident”:“UAL450”,“aircrafttype”:“A319”,“filed_ete”:“00:44:00”,“filed_time”:1365568342,“filed_departuretime”:1365567960,“filed_airspeed_kts”:387,“filed_airspeed_mach”:"",“filed_altitude”:200,“route”:“IDU4 IDU WLEEE BITER6”,“actualdeparturetime”:1365568320,“estimatedarrivaltime”:1365569925,“actualarrivaltime”:1365570060,“diverted”:"",“origin”:“KIAH”,“destination”:“KAUS”,“originName”:“Houston Bush Int’ctl”,“originCity”:“Houston, TX”,“destinationName”:“Austin-Bergstrom Intl”,“destinationCity”:“Austin, TX”},{“faFlightID”:“UAL450-1365139668-airline-0058”,“ident”:“UAL450”,“aircrafttype”:“A320”,“filed_ete”:“04:00:00”,“filed_time”:1365374403,“filed_departuretime”:1365373740,“filed_airspeed_kts”:456,“filed_airspeed_mach”:"",“filed_altitude”:360,“route”:“COATE J36 FNT MKG BAE J16 MCW J148 ONL KIPPR2”,“actualdeparturetime”:1365376560,“estimatedarrivaltime”:1365390240,“actualarrivaltime”:1365390480,“diverted”:"",“origin”:“KEWR”,“destination”:“KDEN”,“originName”:“Newark Liberty Intl”,“originCity”:“Newark, NJ”,“destinationName”:“Denver Intl”,“destinationCity”:“Denver, CO”},{“faFlightID”:“UAL450-1365052652-airline-0156”,“ident”:“UAL450”,“aircrafttype”:“A319”,“filed_ete”:“00:52:00”,“filed_time”:1365272947,“filed_departuretime”:1365270660,“filed_airspeed_kts”:424,“filed_airspeed_mach”:"",“filed_altitude”:260,“route”:“WAILN1 WAILN RODIO1”,“actualdeparturetime”:1365273480,“estimatedarrivaltime”:1365275640,“actualarrivaltime”:1365275520,“diverted”:"",“origin”:“KIAH”,“destination”:“KSAT”,“originName”:“Houston Bush Int’ctl”,“originCity”:“Houston, TX”,“destinationName”:“San Antonio Intl”,“destinationCity”:“San Antonio, TX”},{“faFlightID”:“UAL450-1365052652-airline-0155”,“ident”:“UAL450”,“aircrafttype”:“A319”,“filed_ete”:“02:30:00”,“filed_time”:1365258451,“filed_departuretime”:1365257820,“filed_airspeed_kts”:442,“filed_airspeed_mach”:"",“filed_altitude”:380,“route”:“ACITO ADELL ARLYN STL J101 LIT J180 SWB TXMEX1”,“actualdeparturetime”:1365259260,“estimatedarrivaltime”:1365267918,“actualarrivaltime”:1365267900,“diverted”:"",“origin”:“KORD”,“destination”:“KIAH”,“originName”:“Chicago O’Hare Intl”,“originCity”:“Chicago, IL”,“destinationName”:“Houston Bush Int’ctl”,“destinationCity”:“Houston, TX”},{“faFlightID”:“UAL450-1365052652-airline-0154”,“ident”:“UAL450”,“aircrafttype”:“A320”,“filed_ete”:“02:32:00”,“filed_time”:1365245778,“filed_departuretime”:1365246000,“filed_airspeed_kts”:441,“filed_airspeed_mach”:"",“filed_altitude”:380,“route”:“COATE J36 FNT WYNDE4”,“actualdeparturetime”:1365246300,“estimatedarrivaltime”:1365253380,“actualarrivaltime”:1365253380,“diverted”:"",“origin”:“KLGA”,“destination”:“KORD”,“originName”:“LaGuardia”,“originCity”:“New York, NY”,“destinationName”:“Chicago O’Hare Intl”,“destinationCity”:“Chicago, IL”},{“faFlightID”:“UAL450-1364966264-airline-0095”,“ident”:“UAL450”,“aircrafttype”:“A319”,“filed_ete”:“02:21:00”,“filed_time”:1365176061,“filed_departuretime”:1365175260,“filed_airspeed_kts”:447,“filed_airspeed_mach”:"",“filed_altitude”:370,“route”:“SFO9 SFO LIN PEONS INSLO DTA J84 EKR KAILE1”,“actualdeparturetime”:1365176220,“estimatedarrivaltime”:1365182880,“actualarrivaltime”:1365183060,“diverted”:"",“origin”:“KSFO”,“destination”:“KDEN”,“originName”:“San Francisco Intl”,“originCity”:“San Francisco, CA”,“destinationName”:“Denver Intl”,“destinationCity”:“Denver, CO”},{“faFlightID”:“UAL450-1364879874-airline-0193”,“ident”:“UAL450”,“aircrafttype”:“A319”,“filed_ete”:“01:49:00”,“filed_time”:1365111373,“filed_departuretime”:1365111600,“filed_airspeed_kts”:441,“filed_airspeed_mach”:"",“filed_altitude”:390,“route”:“YOKES2 DEHLI RWF SKETR5”,“actualdeparturetime”:1365111960,“estimatedarrivaltime”:1365117311,“actualarrivaltime”:1365117600,“diverted”:"",“origin”:“KDEN”,“destination”:“KMSP”,“originName”:“Denver Intl”,“originCity”:“Denver, CO”,“destinationName”:“Minneapolis/St Paul Intl”,“destinationCity”:“Minneapolis, MN”},{“faFlightID”:“UAL450-1364879874-airline-0192”,“ident”:“UAL450”,“aircrafttype”:“B752”,“filed_ete”:“02:45:00”,“filed_time”:1365094599,“filed_departuretime”:1365088860,“filed_airspeed_kts”:460,“filed_airspeed_mach”:"",“filed_altitude”:350,“route”:“SFO9 SFO LIN PEONS INSLO DTA CHE FRNCH1”,“actualdeparturetime”:1365096120,“estimatedarrivaltime”:1365103111,“actualarrivaltime”:1365103140,“diverted”:"",“origin”:“KSFO”,“destination”:“KDEN”,“originName”:“San Francisco Intl”,“originCity”:“San Francisco, CA”,“destinationName”:“Denver Intl”,“destinationCity”:“Denver, CO”},{“faFlightID”:“UAL450-1364794122-airline-0029”,“ident”:“UAL450”,“aircrafttype”:“A320”,“filed_ete”:“04:19:00”,“filed_time”:1365029541,“filed_departuretime”:1365028140,“filed_airspeed_kts”:436,“filed_airspeed_mach”:"",“filed_altitude”:280,“route”:“COATE J36 FNT J547 OBK DSM OVR SPAWN KOHOE1”,“actualdeparturetime”:1365030120,“estimatedarrivaltime”:1365042900,“actualarrivaltime”:1365043080,“diverted”:"",“origin”:“KEWR”,“destination”:“KDEN”,“originName”:“Newark Liberty Intl”,“originCity”:“Newark, NJ”,“destinationName”:“Denver Intl”,“destinationCity”:“Denver, CO”},{“faFlightID”:“UAL450-1364707684-airline-0023”,“ident”:“UAL450”,“aircrafttype”:“A319”,“filed_ete”:“01:25:00”,“filed_time”:1364947390,“filed_departuretime”:1364939640,“filed_airspeed_kts”:455,“filed_airspeed_mach”:"",“filed_altitude”:390,“route”:“DUFEE ELX HAAKK DOXXY SOSIC KEEHO J584 SLT FQM3”,“actualdeparturetime”:1364948280,“estimatedarrivaltime”:1364954280,“actualarrivaltime”:1364954460,“diverted”:"",“origin”:“KORD”,“destination”:“KEWR”,“originName”:“Chicago O’Hare Intl”,“originCity”:“Chicago, IL”,“destinationName”:“Newark Liberty Intl”,“destinationCity”:“Newark, NJ”},{“faFlightID”:“UAL450-1364707684-airline-0022”,“ident”:“UAL450”,“aircrafttype”:“A320”,“filed_ete”:“03:29:00”,“filed_time”:1364921151,“filed_departuretime”:1364921220,“filed_airspeed_kts”:448,“filed_airspeed_mach”:"",“filed_altitude”:350,“route”:“TNP PKE DRK FLG J10 RSK J64 PUB HGO HCT FOD J94 DBQ JVL BULLZ3”,“actualdeparturetime”:1364921640,“estimatedarrivaltime”:1364932861,“actualarrivaltime”:1364933040,“diverted”:"",“origin”:“KPSP”,“destination”:“KORD”,“originName”:“Palm Springs Intl”,“originCity”:“Palm Springs, CA”,“destinationName”:“Chicago O’Hare Intl”,“destinationCity”:“Chicago, IL”}]}}


#11

{“FlightInfoStatusResult”:{“next_offset”:-1,“flights”:[{“ident”:“DSM7921”,“faFlightID”:“DSM7921-1505299548-airline-0021”,“airline”:“DSM”,“flightnumber”:“7921”,“tailnumber”:“LV-CKU”,“type”:“Form_Airline”,“blocked”:false,“diverted”:false,“cancelled”:false,“origin”:{“code”:“KMIA”,“city”:“Miami, FL”,“alternate_ident”:"",“airport_name”:“Int’l de Miami”},“destination”:{“code”:“SAEZ”,“city”:“Ezeiza, Buenos Aires Province”,“alternate_ident”:“EZE”,“airport_name”:“Int’l Ministro Pistarini”},“filed_ete”:30660,“route”:“EONNS2 EONNS A509 URSUS UA301 UCA UA301 OTAMO UL542 PALUG UL542 RCO UL417 DOLGI UL417 PUPSI UL404 ERE UT672 MULTA UW24 SNT SNT6A”,“filed_airspeed_kts”:452,“distance_filed”:4450,“filed_departure_time”:{“epoch”:1505300400,“tz”:“EDT”,“dow”:“miércoles”,“time”:“07:00AM”,“date”:“13/09/2017”,“localtime”:1505286000},“estimated_departure_time”:{“epoch”:1505301480,“tz”:“EDT”,“dow”:“miércoles”,“time”:“07:18AM”,“date”:“13/09/2017”,“localtime”:1505287080},“actual_departure_time”:{“epoch”:1505301522,“tz”:“EDT”,“dow”:“miércoles”,“time”:“07:18AM”,“date”:“13/09/2017”,“localtime”:1505287122},“departure_delay”:1122,“filed_arrival_time”:{“epoch”:1505331060,“tz”:"-03",“dow”:“miércoles”,“time”:“04:31PM”,“date”:“13/09/2017”,“localtime”:1505320260},“estimated_arrival_time”:{“epoch”:1505332080,“tz”:"-03",“dow”:“miércoles”,“time”:“04:48PM”,“date”:“13/09/2017”,“localtime”:1505321280},“actual_arrival_time”:{“epoch”:0},“arrival_delay”:1020,“status”:“En”,“progress_percent”:86,“aircrafttype”:“B763”,“full_aircrafttype”:“B763”,“adhoc”:false},{“ident”:“DSM7921”,“faFlightID”:“DSM7921-1504240399-airline-0053”,“airline”:“DSM”,“flightnumber”:“7921”,“tailnumber”:“LV-CKU”,“type”:“Form_Airline”,“blocked”:false,“diverted”:false,“cancelled”:false,“origin”:{“code”:“KMIA”,“city”:“Miami, FL”,“alternate_ident”:"",“airport_name”:“Int’l de Miami”},“destination”:{“code”:“SAEZ”,“city”:“Ezeiza, Buenos Aires Province”,“alternate_ident”:“EZE”,“airport_name”:“Int’l Ministro Pistarini”},“filed_ete”:30780,“route”:“EONNS2 EONNS A509 URSUS UA301 UCA UA301 SAVEM UA301 OTAMO UL542 SJE UL542 RCO UL417 PUPSI UL404 ERE UT672 MULTA UW24 SNT SNT6A”,“filed_altitude”:310,“display_filed_altitude”:“31.000 pies”,“filed_airspeed_kts”:467,“distance_filed”:4444,“filed_departure_time”:{“epoch”:1504276200,“tz”:“EDT”,“dow”:“viernes”,“time”:“10:30AM”,“date”:“01/09/2017”,“localtime”:1504261800},“estimated_departure_time”:{“epoch”:1504276800,“tz”:“EDT”,“dow”:“viernes”,“time”:“10:40AM”,“date”:“01/09/2017”,“localtime”:1504262400},“actual_departure_time”:{“epoch”:1504277181,“tz”:“EDT”,“dow”:“viernes”,“time”:“10:46AM”,“date”:“01/09/2017”,“localtime”:1504262781},“departure_delay”:981,“filed_arrival_time”:{“epoch”:1504306980,“tz”:"-03",“dow”:“viernes”,“time”:“08:03PM”,“date”:“01/09/2017”,“localtime”:1504296180},“estimated_arrival_time”:{“epoch”:1504307991,“tz”:"-03",“dow”:“viernes”,“time”:“08:19PM”,“date”:“01/09/2017”,“localtime”:1504297191},“actual_arrival_time”:{“epoch”:1504307991,“tz”:"-03",“dow”:“viernes”,“time”:“08:19PM”,“date”:“01/09/2017”,“localtime”:1504297191},“arrival_delay”:-1209,“status”:“Aterrizado”,“progress_percent”:100,“aircrafttype”:“B763”,“full_aircrafttype”:“B763”,“adhoc”:false}]}}

and this code as I show? where is an example?