Skip to main content
The dates command searches for the cheapest dates to fly between two airports within a specified date range. Perfect for flexible travelers looking for the best deals.

Syntax

Required arguments

  • ORIGIN - Departure airport IATA code (e.g., JFK, LAX, LHR)
  • DESTINATION - Arrival airport IATA code

Options

Date range

Start of the search date range in YYYY-MM-DD format. Default: Tomorrow
End of the search date range in YYYY-MM-DD format. Default: 60 days from today Example:

Trip duration

Number of days for the trip. Used for round-trip searches to calculate return dates. Default: 3 days Example:

Round-trip toggle

Search for round-trip flights instead of one-way. Default: False (one-way search) Example:

Airlines

Filter by specific airlines using IATA codes. Provide multiple codes separated by spaces. Default: All airlines 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:

Cabin class

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

Sort by price

Sort results by price from lowest to highest. Default: False (chronological order) Example:

Day of week filters

Filter results to only show flights departing on specific days of the week.
Default: All days included Example (weekend departures only):
Example (weekday departures only):

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:

Examples

Searches for the cheapest one-way flights from Los Angeles to Miami over the next 60 days.

Specific date range

Searches for flights in December 2025.

Weekend getaway

Searches for 3-day round-trip weekend getaways departing on Friday, Saturday, or Sunday.

Business class week-long trip

Searches for 7-day round-trip business class flights to Tokyo in November.

Non-stop flights sorted by price

Searches for non-stop flights, showing the cheapest dates first.

Midweek departures with specific airlines

Searches for Tuesday, Wednesday, or Thursday departures on American or Delta, sorted by price.

Morning flights for a long trip

Searches for 14-day round-trip premium economy flights with morning departures.

Complete example with all filters

Searches for:
  • Round-trip flights from JFK to LAX
  • 5-day trips in October 2025
  • Economy class, non-stop only
  • American, Delta, or United only
  • Friday or Saturday departures
  • Daytime flights (8 AM - 6 PM)
  • Results sorted by price

Output format

The command displays results with a price trend chart followed by a detailed table:
For one-way searches, the table shows:
  • Departure date and day of week
  • Price
For round-trip searches, the table also includes:
  • Return date and day of week
The price trend chart helps visualize the best times to fly within your date range.

Understanding results

One-way vs round-trip

One-way searches return individual departure dates with their prices. Round-trip searches return departure dates paired with return dates based on your specified duration. For example, with --duration 7, a departure on October 1st will show a return on October 8th.

Day filters

Day of week filters apply to the departure date only. For round-trip searches, the return date is automatically calculated based on the duration.
This finds trips departing on Fridays with returns 7 days later (the following Friday).

Sorting

By default, results are shown in chronological order (earliest departure first). Use --sort to see the cheapest options first, regardless of date.

Error handling

The command validates inputs and provides clear error messages: Invalid date format:
Invalid airport code:
No flights found:
No flights on selected days:

Tips

Use day filters to find weekend getaways:
Combine --sort with day filters to find the absolute cheapest dates on your preferred days:
For business trips, filter to weekday departures and returns:
Once you find a good date, use the flights command to see specific flight options: