Flight Mapper is a comprehensive flight search and comparison tool that helps you find the best flight options across multiple dates and routes. It automates the process of searching for flights, organizing results, and comparing options based on your preferences.
- Flexible Trip Configuration: Define multiple origins, destinations, and date ranges for both one-way and round-trip flights
- Automated Flight Search: Automatically searches for flights based on your configurations
- Smart Flight Sorting: Sort flights based on price, duration, or a customized balance between both
- Airline Filtering: Exclude specific airlines from your search results
- Maximum Stops Control: Limit search results based on the number of layovers
- Detailed Results: View comprehensive flight details including price, duration, stops, and airlines
- Result Persistence: Saves all flight search results for later review
- Clean Interface: Rich terminal-based interface with progress indicators and formatted output
- Python 3.8+
- Chrome browser
- ChromeDriver (compatible with your Chrome version)
-
Clone the repository:
git clone https://github.com/yourusername/flight_mapper.git cd flight_mapper
-
Install required Python packages:
pip install -r requirements.txt
-
Install ChromeDriver:
- macOS:
brew install --cask chromedriver sudo xattr -d com.apple.quarantine /opt/homebrew/bin/chromedriver
- Linux:
# For Ubuntu/Debian sudo apt install chromium-chromedriver
- Windows:
- Download from ChromeDriver website
- Add ChromeDriver location to your PATH
- macOS:
Create a JSON file defining your search parameters. For example, trip.json
:
{
"origins": [
"Abu Dhabi",
"Dubai"
],
"destinations": [
"San Jose",
"San Francisco"
],
"departure_dates": [
{
"start": "2025-01-05",
"end": "2025-01-12"
}
],
"return_dates": [
{
"start": "2025-06-13",
"end": "2025-06-16"
}
],
"search_modifier": "cheapest"
}
python trip_configurator.py trip.json
This will create all possible combinations of origins, destinations, and dates based on your configuration.
There are two options to run flight searches:
python flight_orchestrator.py
This will:
- Find all JSON config files in the current directory
- Process each config file through the trip configurator
- Run flight automation on the generated configurations
- Create timestamped results folders
- Combine and save all results
Generate trip configurations:
python trip_configurator.py trip.json
Run flight automation:
python flight_automation.py
After running a search, you can sort and filter your results using:
python flight_sorter.py
This interactive tool allows you to:
- Balance between price and duration in your sorting (1-10 scale)
- Exclude specific airlines
- Set maximum number of stops
trip_configurator.py
: Generates all possible trip combinations based on your configflight.py
: Core flight search implementationflight_automation.py
: Automates batch processing of flight searchesflight_sorter.py
: Sorts and filters flight optionsflight_orchestrator.py
: Orchestrates the entire workflowclean.py
: Utility to clean up temporary files
- origins: List of origin cities
- destinations: List of destination cities
- departure_dates: List of departure dates or date ranges
- return_dates: List of return dates or date ranges (omit for one-way trips)
- search_modifier: Additional search terms like "cheapest" or "business class"
- Single date:
"2025-01-05"
- Date range:
{"start": "2025-01-05", "end": "2025-01-12"}
- Use specific city names that match Google Flights format
- For long trips, split your search into smaller date ranges
- Consider running searches during off-peak hours
- Review and organize your results using the sorting tools
- Use the clean.py utility to remove temporary files after searches
- ChromeDriver errors: Ensure the installed ChromeDriver matches your Chrome browser version
- No results found: Verify your city names match how they appear in Google Flights
- Timeout errors: Check your internet connection and try again
- Script errors: Make sure you have all required dependencies installed
This project is licensed under the MIT License - see the LICENSE file for details.
This tool is for personal use only. Please respect website terms of service and avoid excessive requests that may overload flight search services.