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

Just Google Flights

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_flights
Every site

One 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/mcp
Set it up in your client

Both 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.

Read 4
  • getBookingOptionsSelects one result from the same search and reads its booking panel.

    Arguments

    NameTypeRequired
    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/getBookingOptions

    Call 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
    });
  • getPriceGraphAnswers "when is this route cheapest".

    Arguments

    NameTypeRequired
    fromstring
    IATA or city, e.g. "SFO".
    Yes
    tostringYes
    departstring
    YYYY-MM-DD.
    Yes
    returnstring
    Omit 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
    currencystring
    Carried 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/getPriceGraph

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = 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

    NameTypeRequired
    args{ url: string }Yes

    Returns GoogleParsedSearch | null

    interface 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/parseSearchUrl

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = await bowmark.providers.google_flights.parseSearchUrl({});

Use it from code