Skip to main content

Search flights

curl -X GET "http://localhost:3000/v1/flight/search?iata=UA123&icao=UAL123&date=2024-03-20&timezone=America/Los_Angeles" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"
GET
/v1/flight/search
Search for flights by identifier and optional date. Returns lightweight flight summaries for selection.

Query parameters

iata
string
required
IATA flight numberExample: UA123
icao
string
required
ICAO flight numberExample: UAL123
date
string
Flight date (ISO format). Filters flights by date if providedExample: 2024-03-20
timezone
string
required
The timezone from which the request is being madeExample: America/Los_Angeles

Response

flights
array
Array of flight candidates
count
number
Number of flights found

Response example

{
  "flights": [
    {
      "faFlightId": "UAL123-1710936000-airline-0123",
      "ident": "UA123",
      "origin": {
        "code": "KLAX",
        "codeIata": "LAX",
        "codeIcao": "KLAX",
        "name": "Los Angeles International Airport",
        "city": "Los Angeles"
      },
      "destination": {
        "code": "KJFK",
        "codeIata": "JFK",
        "codeIcao": "KJFK",
        "name": "John F. Kennedy International Airport",
        "city": "New York"
      },
      "scheduledOut": "2024-03-20T08:00:00Z",
      "scheduledOff": "2024-03-20T08:15:00Z",
      "status": "Scheduled",
      "airline": {
        "name": "United Airlines",
        "iata": "UA",
        "icao": "UAL",
        "image": "https://cdn.aero.com/airlines/UA.png"
      }
    }
  ],
  "count": 1
}

Get flight details

curl -X GET "http://localhost:3000/v1/flight?iata=UA123&icao=UAL123&timezone=America/Los_Angeles&faFlightId=UAL123-1710936000-airline-0123" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"
GET
/v1/flight
Get detailed information about a specific flight including real-time tracking data. Use faFlightId to fetch a specific flight after searching.

Query parameters

iata
string
required
IATA flight numberExample: UA123
icao
string
required
ICAO flight numberExample: UAL123
date
string
Flight date (ISO format). Defaults to current date if not providedExample: 2024-03-20
timezone
string
required
The timezone from which the request is being madeExample: America/Los_Angeles
forceUpdate
boolean
default:"false"
Force update the flight data (used to refresh the flight data)
faFlightId
string
FlightAware flight ID to fetch a specific flight. Use this after searching for flights to get details of a selected flight.

Response

id
string
Flight ID
flightNo
string
Flight number
callSign
string
Flight callsign
aircraft
object
Aircraft details
airline
object
Airline information
departure
object
Departure information
arrival
object
Arrival information (same structure as departure)
cargo
boolean
Whether this is a cargo flight
greatCircleDistance
object
Distance in multiple units (meter, km, mile, nm, feet)
date
string
Flight date (ISO 8601)
flightAwareData
object
Comprehensive FlightAware data including status, delays, route, codeshares, and more
bookings
array
Bookings associated with this flight

Response example

{
  "id": "flight_abc123",
  "flightNo": "UA123",
  "callSign": "UAL123",
  "aircraft": {
    "registration": "N12345",
    "model": "Boeing 737-900",
    "image": "https://cdn.aero.com/aircraft/N12345.jpg",
    "age": "8"
  },
  "airline": {
    "name": "United Airlines",
    "iata": "UA",
    "icao": "UAL",
    "image": "https://cdn.aero.com/airlines/UA.png"
  },
  "departure": {
    "airport": {
      "iata": "LAX",
      "icao": "KLAX",
      "name": "Los Angeles International Airport",
      "timeZone": "America/Los_Angeles",
      "location": {
        "lat": 33.9416,
        "lon": -118.4085
      }
    },
    "scheduledTime": {
      "utc": "2024-03-20T08:00:00Z",
      "local": "2024-03-20T00:00:00-08:00"
    },
    "terminal": "7",
    "gate": "75A"
  },
  "arrival": {
    "airport": {
      "iata": "JFK",
      "icao": "KJFK",
      "name": "John F. Kennedy International Airport"
    },
    "scheduledTime": {
      "utc": "2024-03-20T16:30:00Z",
      "local": "2024-03-20T12:30:00-04:00"
    }
  },
  "cargo": false,
  "greatCircleDistance": {
    "km": "3974",
    "mile": "2469",
    "nm": "2145"
  },
  "date": "2024-03-20T08:00:00Z"
}

Get flight track/path

curl -X GET "http://localhost:3000/v1/flight/track?iata=UA123&icao=UAL123&date=2024-03-20&timezone=America/Los_Angeles" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"
GET
/v1/flight/track
Get the flight path with all position data points for a specific flight

Query parameters

iata
string
required
IATA flight numberExample: UA123
icao
string
required
ICAO flight numberExample: UAL123
date
string
Flight date (ISO format). Defaults to current date if not providedExample: 2024-03-20
timezone
string
required
The timezone from which the request is being madeExample: America/Los_Angeles or IST

Response

actual_distance
number
Distance flown in miles as of the latest position pointExample: 2450
positions
array
Array of flight positions

Response example

{
  "actual_distance": 2450,
  "positions": [
    {
      "altitude": 350,
      "altitude_change": "C",
      "groundspeed": 450,
      "heading": 270,
      "latitude": 40.7128,
      "longitude": -74.0060,
      "timestamp": "2024-03-20T14:30:00Z",
      "update_type": "A"
    },
    {
      "altitude": 355,
      "altitude_change": "C",
      "groundspeed": 455,
      "heading": 271,
      "latitude": 40.8128,
      "longitude": -74.1060,
      "timestamp": "2024-03-20T14:31:00Z",
      "update_type": "A"
    }
  ]
}

Error responses

400
object
Invalid request parameters or flight not found
{
  "message": "Flight not found"
}
401
object
User is not authenticated
{
  "message": "Unauthorized"
}
500
object
Internal server error
{
  "message": "Internal server error"
}

Build docs developers (and LLMs) love