Creates a new flight search and returns flights matching the user's search criteria.
Use this tool whenever the user starts a new flight search or changes the route,
travel dates, passengers, cabin class, or search filters.
Before invoking this tool, ensure enough information is available to satisfy
the user's request. If required information is missing, ask a clarification
question instead of calling the tool.
This tool performs the complete search workflow internally and returns the final
flight results. If the user specifies filters (such as airline, non-stop,
maximum price, departure time, arrival time, etc.) in the initial request,
those filters are applied automatically before the results are returned.
Do NOT call the apply_filters tool immediately after this tool if all requested
filters were already provided as part of the search request.
For follow-up requests that modify an existing search (for example:
"show only United", "non-stop only", "under $300", or "morning departures"),
use the apply_filters tool with the searchSessionId returned by this tool.
Passenger Rules
---------------
Children: if the user does not mention a child's age, default to 11.
Pass all child ages in children_age_list (integers 2–11, one per child).
Infants: whenever the user mentions an infant or a traveler under 2 years old,
use infants_in_seat_count (InfantOnSeat). Only use infants_in_lap_count when
the user explicitly asks for a lap infant.
Location Resolution
-------------------
The origin and destination arguments MUST always be valid IATA AIRPORT codes.
If the user specifies a city, metropolitan area, region, or other location
instead of an airport, resolve it to the most prominent commercial airport
serving that location before calling this tool.
Examples:
- New York → JFK
- London → LHR
- Paris → CDG
- Delhi → DEL
- Mumbai → BOM
- Srinagar → SXR
- Bengaluru → BLR
- Hyderabad → HYD
- Chennai → MAA
- Dubai → DXB
- Tokyo → HND
- San Francisco → SFO
- Los Angeles → LAX
- Las Vegas → LAS
Never pass city names such as "Delhi", "London", or "New York" to this tool.
Only airport IATA codes are valid inputs.
If a city is served by multiple airports, choose the primary international or
most commonly used commercial airport unless the user explicitly specifies a
different airport.
If the user explicitly names an airport (for example "Heathrow", "Gatwick",
"JFK", "Narita"), use that airport instead.
Only ask the user for clarification when there is no reasonable default airport
or when the user explicitly indicates they are flexible among multiple airports.
Travel Date Rules
-----------------
The departure_date is optional.
If the user does not specify any departure date, omit departure_date from the
tool call. The tool will automatically use a departure date of 7 days from the
current date.
If the user specifies a departure date explicitly or using a relative date
expression (for example "today", "tomorrow", "next week", "next month",
"this Friday", "next Monday", "in two weeks", or "25 December"), resolve it
to a specific future date (YYYY-MM-DD) and include departure_date in the tool
call.
If the user explicitly requests a round-trip flight, a return_date is required.
Do not invoke this tool until a valid return_date is available.
Do not assume or invent a return_date.
Search Constraints (do not call this tool until fixed)
------------------------------------------------------
• Trip types supported: one-way and round-trip only. Do not call this tool for
multi-city, open-jaw, or multi-destination itineraries. If the user asks for
those, explain that only one-way and round-trip are supported and offer to
search one leg at a time.
• Origin and destination must be different IATA airports. If they are the same,
ask the user to clarify the route instead of calling this tool.
• departure_date must be today or a future date (YYYY-MM-DD). If the user gives
a past date, ask for a valid future date instead of calling this tool.
• If the user explicitly requests a round-trip flight but does not provide a
return_date, ask the user for the return date instead of calling this tool.
• return_date, when provided, cannot be earlier than departure_date
(same-day return is allowed). If it is earlier, ask the user for a valid
return date instead of calling this tool.
• Total passengers (adults + seniors + children + infants) cannot exceed 9.
If the user requests more than 9 passengers, explain the limit and ask them
to reduce the party size before calling this tool.
Args:
request: SearchFlightsInput with origin, destination, traveler counts,
optional departure_date, optional return_date, optional filters,
sort_type, limit, optional search_session_id, and optional query_text
(short intent summary — not the full user message).
Returns:
structuredContent with searchSessionId, flights, count, total_result,
has_more, and page_index. Use searchSessionId for follow-up tools.
search_flights