Which call to get lat and lon (and more) for a tail number?


I have several tail numbers and I want to get the current location (with groundspeed, altitude etc) for a tail number and also additonal info (origin, destination). If I use ‘FlightInfoStatus’ I get a lot of information for a tail number but I don’t get the current position (latittude and longitude) or heading and groundspeed. I know that I can use the ‘faFlightID’ value of the GetFlightTrack result but this returns an huge array with a complete track log and I only need the last position.

Is there any other solutions two solve this with one API call?

Thank you,

If you want origin, destination, current location, etc you can call SearchBirdseyeInFlight. The query would look something like this:

flightxml.flightaware.com/json/F … ght?query={ident SWA787} {= inAir 1}&howMany=20&offset=0

You can check out all the options on the documentation page. flightaware.com/commercial/flig … yeInFlight

Thank you for your answer. SeachBirdseyesInFlight looks very promising but it only works for Flight XML V2 and I have a V3 API key. So I can’t test it because I get a 'Authentication Required" for my credentials. How can this be solved with XML API V3? Or do I need an V2 account? Since I can’t test it I only have one more question: If I have 10 different tail numbers I only need one query (where I set all the tailnumbers like {ident {tailnumber1 tailnumber2 tailnumber3}}) and the result has the data for each tailnumber?

Sorry I didn’t realize you were asking about FlightXML3. We have not yet implemented the geospacial queries in FlightXML3. We will be doing that over the next few months, so be on the lookup for updates on that.

For FlightXML2’s SearchBirdseyeInFlight, you can pass multiple idents or tailnumbers. If you are going to be passing a mix of callsigns and idents then use the ident_or_reg operator like so:

flightxml.flightaware.com/json/F … ght?query={ident_or_reg {SWA787 SWA35 N27EP}}&howMany=20&offset=0

You can also use wildcards in that query

flightxml.flightaware.com/json/F … ght?query={ident_or_reg {SWA3* N27*}}&howMany=20&offset=0

I did switch now to the FlightXML2 and I already used the SearchBirdseyeInFlight which works fine when passing several tail numbers as idents. The problem is my customer has about 12 different tail numbers and he wants that all aircrafts are displayed on a map inside of an app (iOS and Android) with additional info (origin, destination, heading etc.) when tapped. While SearchBirdseyeInFlight is working really good it only searches flight data representing approximately the last 24 hours. Some of the tail numbers have been on ground for more than 24 hours so I get no data. I am now using FlightInfoEx for each tail number where SearchBirdseyeInFlight has no data but this means additional API calls.

Here my new thoughts / questions:

  • Wouldn’t it make more sense if our backends polls the data for 12 tail numbers every 60 seconds (SearchBirdseyeInFlight and FlightInfoEx) and both apps (iOS and Android) get the data from our backend server.
  • I get the origin and destination as an ICAO airport code (for example PABR) but how do I get the latitude and longitude of the origin / destination? Is there a list available with ICAO airport code, latitude and longitude? I don’t want to make another call for each ICAO airport code.

Thank you

Ah ok well since some of them have been on the ground for a while, then yes you’d have to fall back to FlightInfoEx for the latest information on that flight.

For the lat/lon of the airports, you’ll have to make a separate call for that. We don’t include that info in either of the position calls. However to minimize the number of those calls that you have to make you can just store the result of an airport call (or if there are some relatively common airports you could precache them) for that airport. That way next time you’ll already have that info on your side.

What is the best strategy if I want the position (latitude/longitude) of a tail number which has been on the ground for a while? I can call FlightInfoEx and get the faFlightID and then I can call GetLastHistorical which contains latitude and longitude. Or is it sufficient to use the latitude / longitude of destination airport from FlightInfoEx because this is the last position of the aircraft?

I would say using the lat/long of the airport for the last arrival (once the plane is on the ground) is the best way to go. The last position from GetHistoricalTrack might be a mile or two away from the airport.

Any update on when the SearchBirdseyeInFlight functionality will be added to FlightXML3?

There is not a current time frame for additional FlightXML 3 queries to be added. I would suggest using FlightXML 2 for queries you are not able to get through FlightXML 3.

I have the exact same problem (i.e., the problem presented in the original and very first message of this thread). So, I would like to kindly ask whether there is any updates on this front…

Thanks in advance!

At this time, I do not have a date of when those methods will be added to the Beta. I would conservatively say about 6-9 months.