Skip to main content
The flights command searches for available flights on a specific departure date, with optional return date for round-trip searches.

Syntax

Required arguments

  • ORIGIN - Departure airport IATA code (e.g., JFK, LAX, LHR)
  • DESTINATION - Arrival airport IATA code
  • DEPARTURE_DATE - Travel date in YYYY-MM-DD format

Options

Return date

Specify a return date for round-trip searches. Date must be in YYYY-MM-DD format. Default: None (one-way search) Example:

Departure time window

Filter flights by departure time using 24-hour format. Specify as START-END (e.g., 6-20 for 6 AM to 8 PM). Default: Any time Example:

Airlines

Filter by specific airlines using IATA codes. Provide multiple codes separated by spaces. Default: All airlines Example:

Cabin class

Specify the cabin class for the search. Options:
  • ECONOMY (default)
  • PREMIUM_ECONOMY
  • BUSINESS
  • FIRST
Example:

Maximum stops

Filter by maximum number of stops. Options:
  • ANY (default) - Any number of stops
  • 0 or NON_STOP - Non-stop flights only
  • 1 or ONE_STOP - Maximum one stop
  • 2+ or TWO_PLUS_STOPS - Two or more stops
Example:

Sort order

Sort results by specified criteria. Options:
  • CHEAPEST (default) - Lowest price first
  • DURATION - Shortest duration first
  • DEPARTURE_TIME - Earliest departure first
  • ARRIVAL_TIME - Earliest arrival first
Example:

Examples

One-way economy flight

Searches for one-way economy flights from New York JFK to Los Angeles LAX on October 25, 2025.

Round-trip with return date

Searches for round-trip flights from New York to London, departing October 25 and returning November 1.

Business class non-stop flights

Searches for non-stop business class flights from San Francisco to Tokyo Narita.

Morning flights on specific airlines

Searches for morning flights (6 AM - 12 PM) from Los Angeles to New York on American, Delta, or United.

Fastest flights regardless of price

Searches for flights from Boston to San Francisco, sorted by shortest duration.

Complete example with multiple filters

Searches for:
  • Round-trip flights from JFK to LHR
  • Premium economy class
  • Evening departures (6 PM - 11 PM)
  • British Airways or American Airlines only
  • Non-stop flights
  • Sorted by earliest departure time

Output format

The command displays results in formatted terminal tables showing:
Each flight option includes:
  • Total price and breakdown (for round-trips)
  • Total duration and stops
  • Detailed segment information with airlines, flight numbers, airports, and times
Airport names are truncated to the first three words for readability in the terminal output.

Error handling

The command validates inputs and provides clear error messages: Invalid date format:
Invalid airport code:
Invalid time range:
No flights found:

Tips

Use the shorthand syntax without the flights command for faster searches:
Combine --time and --sort DEPARTURE_TIME to find the earliest available flights in your preferred time window.
For flexible travel, use the dates command to find the cheapest dates before searching specific flights.