Associate flight info with aircraft icon

I would like to use AeroAPI to display “Calfire” (CFR) flights on our web map:
Live California Department of Forestry and Fire Prevention Flight Status - FlightAware

I get a list of flights from the /flights/search API endpoint with a query string of -airline “CFR”. For each flight I would also like to display an icon appropriate to the aircraft type. For example, if it’s a helicopter, we would show a helicopter icon.

But in the API documentation I don’t see an API endpoint that would provide the icon. Can you please provide information about how we would use the right icon based on the flight data I get from the API?

Thank you!

The icons used by FlightAware on our website is not currently exposed in AeroAPI. However, you can use the aircraft_type field that is returned from that /flight/search result as the basis for that functionality.

The GET /aircraft/types/{type} method can then be used to look up some details about the aircraft_type, which you can use for picking from your own icons. I believe the description field for that will be something like “piston-single”, “turboprop”, “jet”, etc. (Additionally, if the engine field consists of just 3 letters/numbers and begins with an “H” then it is a helicopter–but maybe that isn’t the field I’m thinking of.)

Thanks for the quick response! It’s helpful to know which fields to use from the aircraft endpoint. A couple of things though:

  1. The aircraft_type property returned from the /flights/search endpoint (for the operators we’re interested in) has a value of null half the time, so those markers on our map would get a generic icon. But on the map on the FlightAware website they have specific icons. We’re interested in the “CFR” and “JPR” operators.
  2. Is there code samples or documentation you can point me to that would help us come up with the logic of mapping flight info to aircraft icons?

Unfortunately, if the aircraft_type is not available for a flight because it wasn’t included in a flightplan then it will be harder. The FlightAware website uses a separate internal service for looking up icons for flights, and that uses various heuristics and cached results from prior flights. This icon functionality is not currently exposed through Aero API since it is more of an internal aspect of our website and mobile app right now.