search_flights
Search for flights by route and date. Returns cash-priced options ranked for the traveler — weighing their airline loyalty/status and travel history alongside flight quality, not price alone — 10 options per page. Call again with page=2, 3, ... to see more options if none of the first page fit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Leave as "browse" (default). "book" is a restricted alpha — only use it if the user explicitly asks to book a flight. | browse |
| page | No | 1-based results page, 10 options per page. Increment to see more options. | |
| origin | Yes | Origin airport code or city (e.g. "LAX", "SFO", "New York"). | |
| airlines | No | Optional airline codes or names, e.g. ["UA"] or ["United"]. Used only in "browse" mode and passed to the Google Flights search API. | |
| max_stops | No | Optional maximum stops per direction in "browse" mode. Use 0 for nonstop only. | |
| cabin_class | No | Optional cabin class: "economy", "premium economy", "business", "first". | |
| destination | Yes | Destination airport code or city (e.g. "NRT", "LHR", "Paris"). | |
| return_date | No | Optional return date in YYYY-MM-DD format for a round trip. Read the labels on the results: a price marked 'round trip' already covers both directions, while results split into separate outbound and return sections are one-way prices whose sum overstates the real round-trip fare. | |
| departure_date | Yes | Departure date in YYYY-MM-DD format. | |
| num_passengers | No | Number of passengers. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |