Flights showing up on website but not in API

I’ve noticed that sometimes I can get all necessary flight information on the website but no information through InFlightInfo. An example would be all flights operated by Royal Air Maroc. On the website, I see the metadata and flight position. Through the API, I get an empty result. Why is there an inconsistency here?

I cannot reproduce any problem like you are describing. Please provide specific examples if you would like me to investigate.

For example:
flightxml.flightaware.com/json/ … &howMany=3


{"FlightInfoExResult":{"next_offset":3,"flights":{"faFlightID":"RAM200-1470374827-airline-0237","ident":"RAM200","aircrafttype":"B788","filed_ete":"07:30:00","filed_time":1470374827,"filed_departuretime":1470578700,"filed_airspeed_kts":418,"filed_airspeed_mach":"","filed_altitude":0,"route":"","actualdeparturetime":0,"estimatedarrivaltime":1470606300,"actualarrivaltime":0,"diverted":"","origin":"GMMN","destination":"KJFK","originName":"Mohammed V Int'l","originCity":"Casablanca","destinationName":"John F Kennedy Intl","destinationCity":"New York, NY"},{"faFlightID":"RAM200-1470288417-airline-0380","ident":"RAM200","aircrafttype":"B788","filed_ete":"06:58:00","filed_time":1470288417,"filed_departuretime":1470492300,"filed_airspeed_kts":487,"filed_airspeed_mach":"","filed_altitude":400,"route":"DOVEY PLYMM PARCH2","actualdeparturetime":0,"estimatedarrivaltime":1470517992,"actualarrivaltime":0,"diverted":"","origin":"GMMN","destination":"KJFK","originName":"Mohammed V Int'l","originCity":"Casablanca","destinationName":"John F Kennedy Intl","destinationCity":"New York, NY"},{"faFlightID":"RAM200-1470202040-airline-0168","ident":"RAM200","aircrafttype":"B788","filed_ete":"06:50:00","filed_time":1470202040,"filed_departuretime":1470405900,"filed_airspeed_kts":491,"filed_airspeed_mach":"","filed_altitude":380,"route":"4200N/06000W DOVEY BOATE PLYMM PARCH2","actualdeparturetime":1470408094,"estimatedarrivaltime":1470433500,"actualarrivaltime":1470433355,"diverted":"","origin":"GMMN","destination":"KJFK","originName":"Mohammed V Int'l","originCity":"Casablanca","destinationName":"John F Kennedy Intl","destinationCity":"New York, NY"}]}}


The flights you posted are all Dreamliner flights. Right now, e.g., I’m looking at a 737-800 flying from CDG to CMN (flightaware.com/live/flight/RAM753). The airplane is currently showing up on that page over southern France. If I query AT753 on the InFlightInfo endpoint, I get


{{
  "InFlightInfoResult": {
    "faFlightID": "",
    "ident": "AT753",
    "prefix": "",
    "type": "",
    "suffix": "",
    "origin": "",
    "destination": "",
    "timeout": "",
    "timestamp": 0,
    "departureTime": 0,
    "firstPositionTime": 0,
    "arrivalTime": 0,
    "longitude": 0.0,
    "latitude": 0.0,
    "lowLongitude": 0.0,
    "lowLatitude": 0.0,
    "highLongitude": 0.0,
    "highLatitude": 0.0,
    "groundspeed": 0,
    "altitude": 0,
    "heading": 0,
    "altitudeStatus": "",
    "updateType": "",
    "altitudeChange": "",
    "waypoints": ""
  }
}}

Try using the ICAO identifier for the flight, RAM753, rather than the IATA identifier.

Interestingly, this does yield a different result, however, I’m still not seeing the aircraft’s position.


{
  "InFlightInfoResult": {
    "faFlightID":"RAM965-1471065975-airline-0271",
    "ident":"RAM965",
    "prefix":"",
    "type":"B738",
    "suffix":"",
    "origin":"LEBL",
    "destination":"GMMN",
    "timeout":"timed_out",
    "timestamp":0,
    "departureTime":0,
    "firstPositionTime":0,
    "arrivalTime":0,
    "longitude":0.0,
    "latitude":0.0,
    "lowLongitude":200.0,
    "lowLatitude":200.0,
    "highLongitude":-200.0,
    "highLatitude":-200.0,
    "groundspeed":0,
    "altitude":0,
    "heading":0,
    "altitudeStatus":"",
    "updateType":"",
    "altitudeChange":"",
    "waypoints":""
  }
}

You can test this by picking a RAM flight with a three-digit flight number that is currently enroute from this website: casablanca-airport.com/arrivals.php

We’re looking into some issues with RAM flights. There’s some data matching that seems to be occurring incorrectly, leading to positions not being associated with the flight.

I’m having the same problem right now with flights on Air China (e.g, at this time, CA931 PEK-FRA). The flight is showing up when using the three-letter ICAO identifier CCA, but not when using the two-letter IATA identifier CA. Using the ICAO identifier for all Air China flights would be a hack in our code. If we were to use the ICAO identifier for all Flightaware queries, we would need a lookup in our code. Since airlines change all the time this would require another web service call that will likely cost money.

You should always use ICAO codes when querying FlighAware for airlines where ICAO codes exist, since that’s our preferred way to track flights.

In the case of CA, there’s a small Canadian operator using that two letter code (likely by LOA with NavCanada or similar), so we can’t provide automatic translation to CCA (would make the CA flights untrackable) and returning mixed results would be confusing.