search_flights
Find cash-priced flights by origin, destination, and date. Get results ranked based on your airline loyalty and travel history.
Instructions
Search for flights by route and date and return cash-priced options.
Results are ranked for the traveler by the search backend — weighing their airline
loyalty/status and travel history alongside flight quality — and returned 10 per page.
To see more options, call again with ``page=2``, ``page=3``, and so on.
Args:
origin: Origin airport code or city (e.g. "LAX", "SFO", "New York").
destination: Destination airport code or city (e.g. "NRT", "LHR", "Paris").
departure_date: Departure date in YYYY-MM-DD format (e.g. "2025-03-15").
return_date: Optional return date in YYYY-MM-DD format for a round trip. In browse
mode, round trips are searched as two one-way legs.
num_passengers: Number of passengers. Defaults to 1.
cabin_class: Optional cabin class preference. One of:
"economy", "premium economy", "business", "first".
mode: Leave as "browse" (default). "book" is a restricted alpha — only use it if
the user explicitly asks to book a flight.
page: 1-based results page, 10 options per page. Increment to see more options.
airlines: Optional airline codes or names for browse mode (e.g. ["UA"] or
["United"]). Passed to the Google Flights search API.
max_stops: Optional maximum stops per direction in browse mode. Use 0 for
nonstop only, 1 for nonstop or one-stop itineraries.
Returns:
A ranked, paged list of flight options — airlines, routes, prices, and a link.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | browse | |
| page | No | ||
| origin | Yes | ||
| airlines | No | ||
| max_stops | No | ||
| cabin_class | No | ||
| destination | Yes | ||
| return_date | No | ||
| departure_date | Yes | ||
| num_passengers | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |