Skip to main content
Glama
HasData

hasdata-mcp

Official

google_travel_flights: GET /

hasdata_google_travel_flights_getGoogleFlights

Searches Google Flights for one-way, round-trip, or multi-city itineraries with filters for airlines, stops, price, and emissions. Returns per-itinerary pricing and flight details for travel planning and fare monitoring.

Instructions

Get Google Flights Results

Searches Google Flights for one-way, round-trip, or multi-city itineraries with passenger mix (adults, children, infants in-seat/on-lap), travel class, bags, max price, sort order (price, duration, emissions, departure/arrival time), stops, include/exclude airlines and connections, time windows, layover duration, and deep-search mode. Returns per-itinerary price, currency, total duration, stops, flight legs with airline, flight number, aircraft, departure/arrival airports and times, CO2 emissions, plus booking and departure tokens for round-trip returns or booking options. Use for travel-planning agents, fare monitoring, corporate travel dashboards, emission-aware trip optimization, and comparing routes and airlines across markets.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
departureIdYesSpecifies the departure airport code (IATA) or location kgmid. - **IATA Code**: A 3-letter uppercase code (e.g., SFO for San Francisco, LHR for London Heathrow). Search on [IATA](https://www.iata.org/en/publications/directories/code-search). - **Location kgmid**: A string starting with `/m/`, found in Wikidata under "Freebase ID" (e.g., `/m/02_286` for New York, NY). Multiple values can be separated by commas (e.g., `JFK,LGA,/m/0hptm`).
arrivalIdYesSpecifies the arrival airport code (IATA) or location kgmid. - **IATA Code**: A 3-letter uppercase code (e.g., `SFO` for San Francisco, `LHR` for London Heathrow). Search on [IATA](https://www.iata.org/en/publications/directories/code-search). - **Location kgmid**: A string starting with `/m/`, found in Wikidata under "Freebase ID" (e.g., `/m/02_286` for New York, NY). Multiple values can be separated by commas (e.g., `JFK,LGA,/m/0hptm`).
outboundDateYesThe outbound travel date in 'yyyy-MM-dd' format.
returnDateNoThe return travel date in 'yyyy-MM-dd' format. Required when **type** is `roundTrip`.
typeNoSpecifies the type of flight. Options: - `roundTrip` (default) - `oneWay` - `multiCity` (requires `multiCityJson` for flight details) For round trips, retrieve return flight details with a separate request using `departureToken`.
multiCityJsonNoThis parameter specifies flight details for multi-city trips. It is a JSON string containing multiple flight objects. Each object must include the following fields: - **departureId** – The departure airport code or location KGMID. Uses the same format as the main `departureId` parameter. - **arrivalId** – The arrival airport code or location KGMID. Uses the same format as the main `arrivalId` parameter. - **date** – The flight date. Uses the same format as the `outboundDate` parameter. - **times** *(optional)* – The time range for the flight. Uses the same format as the `outboundTimes` parameter.
glNoThe two-letter country code for the country you want to limit the search to.
hlNoThe two-letter language code for the language you want to use for the search.
currencyNoParameter defines the currency of the returned prices
travelClassNoThe travel class for the flight (Economy, Premium Economy, Business, or First).
showHiddenNoIndicates whether to include hidden options in the results.
adultsNoNumber of adult passengers (>= 1 if specified).
childrenNoNumber of child passengers.
infantsInSeatNoNumber of infants occupying seats.
infantsOnLapNoNumber of infants sitting on an adult's lap.
sortByNoSort the flight results based on price, departure time, arrival time, etc.
stopsNoRestrict the number of stops (layovers) in the flight itinerary.
excludeAirlinesNoA comma separated list of airline codes to exclude from results. You can search for airline codes on [IATA](https://www.iata.org/en/publications/directories/code-search). For example, `UA` is United Airlines.
includeAirlinesNoA comma separated list of airline codes to exclusively include in results. You can search for airline codes on [IATA](https://www.iata.org/en/publications/directories/code-search). For example, `UA` is United Airlines. `excludeAirlines` and `includeAirlines` parameters can't be used together.
bagsNoNumber of carry-on bags per passenger.
maxPriceNoMaximum price limit for the flight search, in the selected currency.
outboundTimesNoSet up to 4 time boundaries (2 for departure, 2 for arrival) to filter flights. Each number represents the start of an hour. Examples: - `6,20` → 6:00 AM - 9:00 PM departure - `1,15` → 1:00 AM - 4:00 PM departure - `7,18,2,21` → 7:00 AM - 9:00 PM departure, 2:00 AM - 10:00 PM arrival
returnTimesNoSet up to 4 time boundaries (2 for departure, 2 for arrival) to filter return flights. Each number represents the start of an hour. Examples: - `6,20` → 6:00 AM - 9:00 PM departure - `1,15` → 1:00 AM - 4:00 PM departure - `7,18,2,21` → 7:00 AM - 9:00 PM departure, 2:00 AM - 10:00 PM arrival
lessEmissionsNoPrefer flight options with lower carbon emissions.
layoverDurationNoSet the maximum layover duration in minutes to filter flights. For example, `120, 360` filters layovers between 2 hours and 6 hours, while `45, 180` allows layovers from 45 minutes to 3 hours.
includeConnectionsNoA comma separated list of specific airports to allow as connections.
excludeConnectionsNoA comma separated list of specific airports to exclude as connections.
maxDurationNoThe maximum total flight duration in minutes.
deepSearchNoEnable deep search. Returns the same results as Google Flights in a browser, but takes longer to respond. Default is `false`.
departureTokenNoUsed to select a flight and retrieve return flights for a round trip or the next leg of the itinerary for a multi-city trip.
bookingTokenNoUsed to request booking options for selected flights. This token is found in the flight results and cannot be used with `departureToken`.
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions deep-search mode taking longer, but does not disclose rate limits, authentication requirements, data source freshness, or error handling. The description adds some transparency about behavior but could be more comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured paragraph that front-loads the tool's purpose. It covers key aspects without being overly verbose. However, it could be slightly more concise or broken into bullet points for easier reading.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (31 parameters) and no output schema, the description covers input parameters well and mentions return values. It lacks details on error handling, pagination, or rate limits, which would improve completeness for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The description groups parameters (passenger mix, travel class, etc.) but does not add significant new information beyond the schema's detailed descriptions. It does not clarify parameter interactions or complex constraints beyond what the schema covers.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches Google Flights for various trip types (one-way, round-trip, multi-city) and lists many parameters and use cases. It distinguishes itself from sibling tools, which cover different domains (e.g., Airbnb, Amazon, Google SERP).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions several use cases (travel-planning agents, fare monitoring, etc.), implying when to use the tool. However, it lacks explicit guidance on when not to use it or alternatives for similar flight search tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/HasData/hasdata-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server