Google Flights MCP server for AI agents
Let Claude, ChatGPT or your own agent read Google Flights: 4 typed functions through one MCP server. No Google Flights API key needed.
- Functions
- 4
- Sign-in
- Not needed
- Works with
- MCP, HTTP, Node, Python
Connect
An MCP server for Google Flights alone, with one tool per function. Paste it into Claude, ChatGPT, Cursor or any MCP client as a remote server.
https://api.bowmark.ai/mcp/site/google_flightsOne MCP server for Google Flights and every other site Bowmark covers. Your agent looks up what it needs and calls it.
https://api.bowmark.ai/mcpSet it up in your clientBoth need a Bowmark API key. The quickstart gets you one and a first result in a few minutes.
Functions
Open a function to see its arguments, what it returns and how to call it.
getBookingOptionsSelects one result from the same search and reads its booking panel.Arguments
Name Type Required idstringYes pricenumber | nullYes currencystringYes tripType"round trip" | "one way"Yes airlinesstring[]Yes stopsnumberYes departstringYes arrivestringYes durationMinutesnumber | nullYes urlstringNo Returns
GoogleBookingOption[]interface GoogleBookingOption { provider: string; // the OTA or airline selling it fareType: string; price: number | null; currency: string; deepLink: string | null; // null for JS-driven rows, see the caveat below // The handoff: open checkout.url and book with that seller yourself (sign in there // or book as a guest). Bowmark never books. With no deepLink it is the Google Flights page for the same trip (product_page, // warning says so); the person picks this seller there. Null only without a trip query. checkout: { status: string; url: string; urlKind: string; account: { site: string; hint: string }; summary: { items: { title: string; variant: string | null; quantity: number; unitPrice: string | null; lineTotal: string | null }[]; total: string | null; currency: string; dates?: { start: string; end?: string }; guests?: number }; warnings: string[] } | null; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/google_flights/getBookingOptionsCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.google_flights.getBookingOptions({ id: "<id>", price: 1, currency: "<currency>", tripType: "round trip", airlines: [], stops: 1, depart: "<depart>", arrive: "<arrive>", durationMinutes: 1 });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.google_flights.getBookingOptions({ "id": "<id>", "price": 1, "currency": "<currency>", "tripType": "round trip", "airlines": [], "stops": 1, "depart": "<depart>", "arrive": "<arrive>", "durationMinutes": 1 }))curl -X POST https://api.bowmark.ai/v1/sites/google_flights/getBookingOptions \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"row":{"id":"<id>","price":1,"currency":"<currency>","tripType":"round trip","airlines":[],"stops":1,"depart":"<depart>","arrive":"<arrive>","durationMinutes":1}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.google_flights.getBookingOptions({ id: "<id>", price: 1, currency: "<currency>", tripType: "round trip", airlines: [], stops: 1, depart: "<depart>", arrive: "<arrive>", durationMinutes: 1 });getPriceGraphAnswers "when is this route cheapest".Arguments
Name Type Required fromstringIATA or city, e.g. "SFO".Yes tostringYes departstringYYYY-MM-DD.Yes returnstringOmit for one-way.No cabin"economy" | "premium" | "business" | "first"No stops"any" | "nonstop" | "1"No passengersnumberNo tripType"one way" | "round trip" | "multi-city"Or reported, never ignored.No legs{ from: string; to: string; date: string }[]Carried from parseSearchUrl: legs 2+ are dropped and named.No currencystringCarried from parseSearchUrl: this provider prices USD; another one is warned.No source"tfs" | "q"Carried from parseSearchUrl: which URL form was read.No warningsstring[]Carried from parseSearchUrl: repeated as "from the URL: …".No Returns
GooglePriceGraph// One column of the price graph. interface GooglePricePoint { date: string; returnDate: string | null;// the return date priced WITH it; null for one-way. // Google slides a fixed-length trip, so a round-trip // column is a whole trip, not just a departure date. price: number | null; // cheapest total for that date currency: string; } interface GooglePriceGraph { from: string; to: string; tripType: "round trip" | "one way"; stayNights: number | null; // nights held constant across the window; null for // one-way, or if the columns disagree rangeStart: string; // the window GOOGLE chose (≈ depart-7 … depart+52). rangeEnd: string; // It is not selectable, see the note below. points: GooglePricePoint[]; // ascending by departure date cheapest: GooglePricePoint | null; // ties resolve to the earliest date url: string; checkedAt: string; warnings?: string[]; // from a parseSearchUrl query: legs dropped, currency not applied, the URL's own }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/google_flights/getPriceGraphCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.google_flights.getPriceGraph({ from: "SFO", to: "JFK", depart: { $daysFromNow: 30 } });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.google_flights.getPriceGraph({"from": "SFO", "to": "JFK", "depart": {"$daysFromNow": 30}}))curl -X POST https://api.bowmark.ai/v1/sites/google_flights/getPriceGraph \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"query":{"from":"SFO","to":"JFK","depart":{"$daysFromNow":30}}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.google_flights.getPriceGraph({ from: "SFO", to: "JFK", depart: { $daysFromNow: 30 } });parseSearchUrlReads the current trip (from, to, dates, cabin, passengers, stops) out of a Google Flights URL, in either the ?q= or the encoded ?tfs= spelling.Arguments
Name Type Required args{ url: string }Yes Returns
GoogleParsedSearch | nullinterface GoogleFlightQuery { from: string; // IATA or city, e.g. "SFO" to: string; depart: string; // YYYY-MM-DD return?: string; // omit for one-way cabin?: "economy" | "premium" | "business" | "first"; stops?: "any" | "nonstop" | "1"; passengers?: number; // Carried from parseSearchUrl, so its result can be passed straight in. Each is applied // or reported, never ignored. tripType?: "one way" | "round trip" | "multi-city"; // carried from parseSearchUrl: "one way" + a return is refused; "multi-city" searches leg 1 and warns legs?: { from: string; to: string; date: string }[]; // carried from parseSearchUrl: legs 2+ are dropped and named currency?: string; // carried from parseSearchUrl: this provider prices USD; another one is warned source?: "tfs" | "q"; // carried from parseSearchUrl: which URL form was read warnings?: string[]; // carried from parseSearchUrl: repeated as "from the URL: …" } // What parseSearchUrl returns: a GoogleFlightQuery plus what the URL says. interface GoogleParsedSearch extends GoogleFlightQuery { tripType: "one way" | "round trip" | "multi-city"; legs?: { from: string; to: string; date: string }[]; // multi-city only currency?: string; // the URL's curr= param, passed through source: "tfs" | "q"; warnings: string[]; // what could not be read exactly }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/google_flights/parseSearchUrlCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.google_flights.parseSearchUrl({});import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.google_flights.parseSearchUrl({}))curl -X POST https://api.bowmark.ai/v1/sites/google_flights/parseSearchUrl \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.google_flights.parseSearchUrl({});searchRuns the itinerary search and returns its result rows.Arguments
Name Type Required fromstringIATA or city, e.g. "SFO".Yes tostringYes departstringYYYY-MM-DD.Yes returnstringOmit for one-way.No cabin"economy" | "premium" | "business" | "first"No stops"any" | "nonstop" | "1"No passengersnumberNo tripType"one way" | "round trip" | "multi-city"Or reported, never ignored.No legs{ from: string; to: string; date: string }[]Carried from parseSearchUrl: legs 2+ are dropped and named.No currencystringCarried from parseSearchUrl: this provider prices USD; another one is warned.No source"tfs" | "q"Carried from parseSearchUrl: which URL form was read.No warningsstring[]Carried from parseSearchUrl: repeated as "from the URL: …".No Returns
GoogleFlight[]// Google Flights' OWN shapes, not the `flights` capability contract. interface GoogleFlight { id: string; price: number | null; currency: string; tripType: "round trip" | "one way"; airlines: string[]; stops: number; depart: string; arrive: string; durationMinutes: number | null; url?: string; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/google_flights/searchCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.google_flights.search({ from: "SFO", to: "JFK", depart: { $daysFromNow: 30 } });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.google_flights.search({"from": "SFO", "to": "JFK", "depart": {"$daysFromNow": 30}}))curl -X POST https://api.bowmark.ai/v1/sites/google_flights/search \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"query":{"from":"SFO","to":"JFK","depart":{"$daysFromNow":30}}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.google_flights.search({ from: "SFO", to: "JFK", depart: { $daysFromNow: 30 } });
Use it from code
- Node
npm i @bowmark/web - Python
pip install bowmark-web - HTTP
POST /v1/sites/google_flights/<function> - OpenAPI
/v1/sites/google_flights/openapi.json