Make sure you’ve installed Fli before continuing.
CLI usage
The Fli CLI provides an intuitive command-line interface for flight searches.Basic flight search
Search for one-way flights between two airports on a specific date:Advanced search with filters
Add filters to narrow your search:Find cheapest dates
Search for the cheapest dates to fly within a date range:CLI options reference
- Flights command
- Dates command
Python API
Use Fli programmatically in your Python applications.Basic one-way search
Here’s a complete example searching for one-way flights:Round-trip search
Search for round-trip flights with outbound and return segments:Date range search
Find the cheapest dates to travel within a date range:Advanced search with filters
Use advanced filters for complex searches:Understanding the data models
- Airport
- Airline
- Seat types
- Stops
- Sort options
Airport codes use the standard IATA 3-letter codes:
Running examples
Fli includes 11 comprehensive examples in the source repository:basic_one_way_search.py- Simple one-way flight searchround_trip_search.py- Round-trip flight bookingdate_range_search.py- Find cheapest datescomplex_flight_search.py- Advanced filtering and multi-passengertime_restrictions_search.py- Time-based filteringdate_search_with_preferences.py- Weekend filteringprice_tracking.py- Price monitoring over timeerror_handling_with_retries.py- Robust error handlingresult_processing.py- Data analysis with pandascomplex_round_trip_validation.py- Advanced round-trip with validationadvanced_date_search_validation.py- Complex date search with filtering
Next steps
MCP Server
Set up the MCP server for Claude Desktop integration
API Reference
Explore the complete API documentation
CLI Reference
Learn about all CLI commands and options
Examples
Browse more code examples and use cases