search-flight
# Search for a flight
## Description
Uses the Kiwi API to search for available flights between two locations on a specific date.
## How it works
The tool will:
1. Search for matching locations to resolve airport codes
2. Find available flights for the specified route and date range
## Method
Call this tool whenever a user wants to search for flights, regardless of whether they provided exact airport codes or just city names.
You should display the returned results in a markdown table format: Group the results by price (those who are the cheapest), duration (those who are the shortest, i.e. have the smallest 'totalDurationInSeconds') and the rest (those that could still be interesting).
Always display for each flight in order:
- In the 1st column: The departure and arrival airports, including layovers (e.g. "Paris CDG → Barcelona BCN → Lisbon LIS")
- In the 2nd column: The departure and arrival dates & times in the local timezones, and duration of the flight (e.g. "03/08 06:05 → 09:30 (3h 25m)", use 'durationInSeconds' to display the duration and not 'totalDurationInSeconds')
- In the 3rd column: The cabin class (e.g. "Economy")
- (In case of return flight only) In the 4th column: The return flight departure and arrival airports, including layovers (e.g. "Paris CDG → Barcelona BCN → Lisbon LIS")
- (In case of return flight only) In the 5th column: The return flight departure and arrival dates & times in the local timezones, and duration of the flight (e.g. "03/08 06:05 → 09:30 (3h 25m)", use 'return.durationInSeconds' to display the duration)
- (In case of return flight only) In the 6th column: The return flight cabin class (e.g. "Economy")
- In the previous-to-last column: The total price of the flight
- In the last column: The deep link to book the flight
Finally, provide a summary highlighting the best prices, the shortest flights and a recommendation. End wishing a nice trip to the user with a short fun fact about the destination!