Cheapflights MCP server for AI agents
Let Claude, ChatGPT or your own agent read Cheapflights: 4 typed functions through one MCP server. No Cheapflights API key needed.
- Site
- cheapflights.com
- Functions
- 4
- Sign-in
- Not needed
- Works with
- MCP, HTTP, Node, Python
Connect
An MCP server for Cheapflights 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/cheapflightsOne MCP server for Cheapflights 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.
getBookingOptionsFor one result, reads who actually sells the fare and at what price.Arguments
Name Type Required idstringYes pricenumber | nullYes currencystringYes tripType"round trip" | "one way"Yes airlinesstring[]Yes stopsnumberYes departstringISO-ish local departure.Yes arrivestringYes durationMinutesnumber | nullYes urlstringThis brand's results URL for the query.No Returns
KayakBookingOption[]// One seller's offer for a specific itinerary. Nulls mean "Cheapflights does not // report it for this offer", never "we failed to read it". interface KayakBookingOption { provider: string | null; // who you buy from, e.g. "Super.com", "JetBlue" providerCode: string; // their raw code, e.g. "SUPERAIR", "B6" fareType: string | null; // "Basic Economy", "Main Cabin", "Main Flex", "Mint" cabin: string | null; // "Economy", "Prem Economy", "Business", "First" price: number | null; currency: string; deepLink: string | null; // absolute link into this seller's booking flow carryOn: string | null; // "Included", "Not Included (+$55)", "Unknown" checkedBag: string | null; carryOnIncluded: boolean | null; // null = the site says "Unknown" checkedBagIncluded: boolean | null; personalItem: boolean | null; // the under-seat bag, null = not reported checkedBagCount: number | null; // bags included free; null = not reported checkedBagFee: number | null; // numeric fee for a checked bag, null if free/unreported freeCancellation: boolean | null; seatsRemaining: number | null; // The handoff: open checkout.url (it carries this exact offer) and book with the // seller yourself. Bowmark never books. Null when the offer has no booking link. 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/cheapflights/getBookingOptionsCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.cheapflights.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.cheapflights.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/cheapflights/getBookingOptions \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"flight":{"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.cheapflights.getBookingOptions({ id: "<id>", price: 1, currency: "<currency>", tripType: "round trip", airlines: [], stops: 1, depart: "<depart>", arrive: "<arrive>", durationMinutes: 1 });searchRuns the itinerary search on cheapflights.com and returns its result rows price-ascending.Arguments
Name Type Required queryKayakQuery & CheapflightsMarketOptionYes interface KayakQuery { 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"; } type CheapflightsMarket = "com" | "co.uk" | "ca"; // Add to any search, searchHotels or searchCars query: { ...query, market: "co.uk" }. // Omitted → cheapflights.com. cheapflights.co.uk prices in GBP, cheapflights.ca in CAD. // An undeclared storefront is refused by name. interface CheapflightsMarketOption { market?: CheapflightsMarket }Returns
KayakFlight[]// Cheapflights's OWN row shape, not the `flights` capability contract. interface KayakFlight { id: string; price: number | null; currency: string; tripType: "round trip" | "one way"; airlines: string[]; stops: number; depart: string; // ISO-ish local departure arrive: string; durationMinutes: number | null; url?: string; // this brand's results URL for the query }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/cheapflights/searchCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.cheapflights.search({ from: "SFO", to: "JFK", depart: { $daysFromNow: 30 } });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.cheapflights.search({"from": "SFO", "to": "JFK", "depart": {"$daysFromNow": 30}}))curl -X POST https://api.bowmark.ai/v1/sites/cheapflights/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.cheapflights.search({ from: "SFO", to: "JFK", depart: { $daysFromNow: 30 } });searchCarsRuns the car-hire search on cheapflights.com and returns priced vehicles for a pickup location and date range, cheapest-first.Arguments
Name Type Required queryKayakCarQuery & CheapflightsMarketOptionYes interface KayakCarQuery { pickup: string; // IATA airport code, e.g. "SFO" dropoff?: string; // defaults to pickup pickupDate: string; // YYYY-MM-DD dropoffDate: string; // YYYY-MM-DD pickupHour?: number; // 0-23, default 10 dropoffHour?: number; // 0-23, default 10 driverAge?: number; // default 30; under-25 changes what is quotable } type CheapflightsMarket = "com" | "co.uk" | "ca"; // Add to any search, searchHotels or searchCars query: { ...query, market: "co.uk" }. // Omitted → cheapflights.com. cheapflights.co.uk prices in GBP, cheapflights.ca in CAD. // An undeclared storefront is refused by name. interface CheapflightsMarketOption { market?: CheapflightsMarket }Returns
KayakCar[]// Cheapflights's OWN row shape for car hire. interface KayakCar { id: string; price: number | null; // total for the whole rental dayPrice: number | null; // per day currency: string; agency: string; // who you collect the car from seller: string; // who sells the booking, often a different company carName: string; // "Mitsubishi Mirage" (or similar) carClass: string; // "Economy", "Compact SUV" // null on these two means the site quoted no usable figure for this offer: it // sends 0 for "unstated" and 24 for the range "2/4 doors", and neither is a count. passengers: number | null; doors: number | null; bags: number | null; // 0 IS a real answer here, so it is published as one transmission: "automatic" | "manual" | null; airConditioning: boolean | null; unlimitedMileage: boolean | null; freeCancellation: boolean | null; pickupType: string | null; // "IN_TERMINAL" | "SHUTTLE" | … pickupAddress: string | null; url: string; // deep link to this offer // The handoff: open checkout.url to book with the seller yourself. Bowmark never // books. Null when the row has no usable link. 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/cheapflights/searchCarsCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.cheapflights.searchCars({ pickup: "SFO", pickupDate: { $daysFromNow: 30 }, dropoffDate: { $daysFromNow: 34 } });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.cheapflights.searchCars({ "pickup": "SFO", "pickupDate": {"$daysFromNow": 30}, "dropoffDate": {"$daysFromNow": 34} }))curl -X POST https://api.bowmark.ai/v1/sites/cheapflights/searchCars \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"query":{"pickup":"SFO","pickupDate":{"$daysFromNow":30},"dropoffDate":{"$daysFromNow":34}}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.cheapflights.searchCars({ pickup: "SFO", pickupDate: { $daysFromNow: 30 }, dropoffDate: { $daysFromNow: 34 } });searchHotelsRuns the stays search on cheapflights.com.Arguments
Name Type Required queryKayakHotelQuery & CheapflightsMarketOptionYes interface KayakHotelQuery { location: string; // IATA airport code, e.g. "SFO", or a resolvable city checkIn: string; // YYYY-MM-DD checkOut: string; // YYYY-MM-DD adults?: number; // default 2 rooms?: number; // default 1 } type CheapflightsMarket = "com" | "co.uk" | "ca"; // Add to any search, searchHotels or searchCars query: { ...query, market: "co.uk" }. // Omitted → cheapflights.com. cheapflights.co.uk prices in GBP, cheapflights.ca in CAD. // An undeclared storefront is refused by name. interface CheapflightsMarketOption { market?: CheapflightsMarket }Returns
KayakHotel[]// Cheapflights's OWN row shape for stays. interface KayakHotel { id: string; name: string; price: number | null; // per NIGHT, cheapest seller (normalized, see below) totalPrice: number | null; // the WHOLE stay, what rows are sorted on currency: string; seller: string; // who sells that rate ("Priceline") sellerCount: number | null; // how many sellers quoted this property stars: number | null; // property stars, 1-5 score: number | null; // guest score out of 10 reviewCount: number | null; propertyType: string; // "Hotel", "Motel", "Apartment" neighborhood: string | null; city: string | null; distance: string | null; // "11.7 mi", as the site renders it distanceFrom: string | null; url: string; // deep link to the property // The handoff: open checkout.url to pick a rate and book with the seller yourself. // Bowmark never books. Null when the row has no usable link. 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/cheapflights/searchHotelsCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.cheapflights.searchHotels({ location: "SFO", checkIn: { $daysFromNow: 30 }, checkOut: { $daysFromNow: 33 } });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.cheapflights.searchHotels({ "location": "SFO", "checkIn": {"$daysFromNow": 30}, "checkOut": {"$daysFromNow": 33} }))curl -X POST https://api.bowmark.ai/v1/sites/cheapflights/searchHotels \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"query":{"location":"SFO","checkIn":{"$daysFromNow":30},"checkOut":{"$daysFromNow":33}}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.cheapflights.searchHotels({ location: "SFO", checkIn: { $daysFromNow: 30 }, checkOut: { $daysFromNow: 33 } });
Use it from code
- Node
npm i @bowmark/web - Python
pip install bowmark-web - HTTP
POST /v1/sites/cheapflights/<function> - OpenAPI
/v1/sites/cheapflights/openapi.json