FlightXML2/FlightInfo show "no data available" error


#1

Hi,
I have two flight number 9W120 and 9W8079.
When is search this flight number on flightaware search bar it shows me flight details for both the flight numbers.

But when I use web service of FlightXML2 with FlightInfo Method it show me error.

http://flightxml.flightaware.com/json/FlightXML2/FlightInfo?ident=9W120&howMany=0
http://flightxml.flightaware.com/json/FlightXML2/FlightInfo?ident=9W8079&howMany=0

Response :-
{
“error”: “no data available”
}


As from given screenshot it shows me search result of flight number which I entered on flight aware web site. (eg. 9W120 and 9W8079)

But when I hit the web service with other flight number which is provided beside searched flight number (eg.
JAI120 / 9W120 and JAI8079 / 9W8079) it gives me proper response.

http://flightxml.flightaware.com/json/FlightXML2/FlightInfo?ident=JAI120&howMany=0
http://flightxml.flightaware.com/json/FlightXML2/FlightInfo?ident=JAI8079&howMany=0

I have checked other discussion where another user has faced the same issue and I have try that solution also but still its giving me no result.

Please find similar issue discussion link below.

Please suggest any solution for this.


#2

Do you have ‘show position only’ flights enabled on your account? In that case the IATA to ICAO conversion is disabled. If you query with the ICAO and flight number (ie JAI8079 and JAI120) do you get the results you expect?


#3

‘show position only’ flights disabled in our account.

If I use flight number (ie. JAI8079 and JAI120) I am getting proper response with all the detail which we require but when I use this flight number (ie. 9W120 and 9W8079) I am not getting any response except error.

Response :-
{
“error”: “no data available”
}


#4

please update on above issue.


#5

The procedure that converts IATA to ICAO does not do that conversion if the IATA has a number in the IATA code, so you’d need to do that conversion in your application before making the request.


#6

Thanks for update.

But, We are not doing any conversion at our end. This flight numbers 9W120 and 9W8079 are provided us when we buy ticket and same we are using to getting flight details but could not any details for the same and when we search this flight numbers on your website we are getting details but on other side from your API we are not getting any details.


#7

That is the problem. You must perform the IATA-to-ICAO conversion of flight identifiers in your application if you want to avoid problems. FlightAware is only able to automatically perform the IATA-to-ICAO conversion in limited circumstances, but it cannot be relied upon for all carriers.


#8

Can you please tell me how we can do the conversion of IATA-to-ICAO of flight identifiers ?
Is there any API available at your side for this type of conversion ?


#9

Ideally you can simply ensure that your inputs are using ICAO to begin with. If you have a user interface where the user picks the airline and types a flight number, then you can simply change the airline dropdown/picker to substitute ICAO codes instead.

Otherwise, if you know that your inputs are always using IATA identifiers and you never will receive a registration/tailnumber, then you can simply take the first two characters as the IATA carrier code and look up the corresponding ICAO carrier code in a database.

If you have the possibility of ICAO or registrations/tailnumbers being in your inputs, then you have to do more careful discrimination to exclude those cases first and only doing the previous step if they are not.

You can obtain lists of IATA/ICAO codes for airlines from various sources, including Wikipedia or we also have it available for purchase.