google_flights
Search and retrieve Google Flights results for one-way, round-trip, or multi-city itineraries. Supports sorting, filtering, layover preferences, and booking token retrieval.
Instructions
Retrieves Google Flights results for one-way, round-trip, and multi-city searches, with sorting/filtering and booking token support. Costs 5 API credits per request. [Credits: 5 API credits per request] Notes: Two-step flow for full itineraries: first request returns flights plus a departure_token per option; re-request with departure_token to get return/next-segment flights, then use a resulting booking_token to fetch booking options (which ignores dates/filters). return_date required only for type=1; return_times only usable for type=1. exclude_airlines/include_airlines are mutually exclusive, as are departure_token/booking_token. Returns: { best_flights: [{flights: [{departure_airport: {id, name, time}, arrival_airport: {id, name, time}, duration, airplane, travel_class, flight_number, airline, legroom}], total_duration, price, type}] }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bags | No | Number of carry-on bags. (default: 0) | |
| html | No | Return the full HTML of the Google page. (default: false) | |
| type | No | Flight type. Allowed values: 1 (Round trip, default), 2 (One way), 3 (Multi-city). (default: 1) | |
| stops | No | Maximum number of stops. Allowed values: 0 (Any, default), 1 (Nonstop only), 2 (Up to 1 stop), 3 (Up to 2 stops). (default: 0) | |
| adults | No | Number of adult passengers. (default: 1) | |
| country | No | Two-letter country code for the Google search (e.g. US, UK, FR). (default: us) | |
| sort_by | No | Sort order. Allowed values: 1 (Top flights, default), 2 (Price), 3 (Departure time), 4 (Arrival time), 5 (Duration), 6 (Emissions). (default: 1) | |
| children | No | Number of child passengers. (default: 0) | |
| currency | No | Currency for returned prices. (default: USD) | |
| language | No | Language of the results, e.g. en, es, fr, de. (default: en) | |
| emissions | No | Filter by emission level. Allowed value: 1 (show only flights with lower emissions). | |
| max_price | No | Maximum ticket price allowed. No limit by default. | |
| arrival_id | Yes | Arrival point: 3-letter uppercase airport code or a location kgmid beginning with '/m/'. Multiple points comma-separated. | |
| return_date | No | Return travel date, format YYYY-MM-DD, e.g. 2026-03-06. Required when type=1 (Round trip). | |
| departure_id | Yes | Departure point: 3-letter uppercase airport code (e.g. JFK, LHR) or a location kgmid beginning with '/m/' (e.g. /m/02_286 for San Francisco). Multiple points comma-separated. | |
| max_duration | No | Maximum total flight duration in minutes, e.g. 960 = up to 16 hours. | |
| return_times | No | Preferred time range for the return flight; each number represents the start of an hour. Only used when type=1 (Round trip). | |
| travel_class | No | Travel class. Allowed values: 1 (Economy, default), 2 (Premium economy), 3 (Business), 4 (First class). (default: 1) | |
| booking_token | No | Retrieves booking options for a selected flight. Cannot be used with departure_token. When used, date-based parameters and all Advanced Filters parameters are ignored. | |
| exclude_conns | No | Exclude specific connecting airports, comma-separated for multiple. | |
| outbound_date | No | Outbound travel date, format YYYY-MM-DD, e.g. 2026-03-05. | |
| infants_on_lap | No | Number of infants traveling on an adult's lap. (default: 0) | |
| outbound_times | No | Preferred time range for the outbound flight; each number represents the start of an hour. | |
| departure_token | No | Selects a departure flight to fetch the next set of results (return flights for round trip, or next segment for multi-city). Cannot be used with booking_token. | |
| infants_in_seat | No | Number of infants traveling in their own seat. (default: 0) | |
| multi_city_json | No | JSON string containing an array of flight segment objects, used to provide details for multi-city trips. | |
| exclude_airlines | No | Exclude specific airlines, each a 2-character IATA code. Cannot be used together with include_airlines. | |
| include_airlines | No | Include only specific airlines, each a 2-character IATA code. Cannot be used together with exclude_airlines. | |
| layover_duration | No | Preferred layover duration range in minutes, e.g. '75,240' for 1h15m to 4h. |