Google Flights APIunofficial
Logged-out one-way flight search and a cheapest-date price calendar on Google Flights. Prices in USD, en-US.
- google.com
all live 3 operations, checked by the installs that call them.
Try it
Set up API Anything for your agents:
npx -y api-anything setupThen ask your agent, which finds this site by itself, or call it from a shell:
api-anything pull google-flights
api-anything call google-flights priceCalendar origin=SFO destination=JFK start=2027-04-01 end=2027-04-30Operations
| Operation | Method | Login | Writes | Status |
|---|---|---|---|---|
priceCalendar(origin, destination, start, end) -> date, priceCheapest one-way price per departure date between two airports, for every day from start to end (tested up to 3 months per call). Per item: date (YYYY-MM-DD), price (USD; missing when Google has no fare that day). Then call search/top with the cheapest date for the flights themselves. |
POST | no | no | Live0 confirmations |
search(origin, destination, date) -> airline, price, from, to, departureTime, arrivalDate, arrivalTime, durationMinutes, viaOne-way flights: Google's "other departing flights" list, sorted by price. Origin and destination take airport codes, metro codes (NYC) or city names. Per item: airline (names; several when carriers mix), price (USD, whole one-way itinerary), from/to (airports), departureTime/arrivalTime local [h,m] (missing entries are 0: [9] = 09:00, [null,56] = 00:56), arrivalDate [y,m,d] (the departure date is the one you asked for), durationMinutes, via (stop airports in order; absent for a nonstop flight). |
GET | no | no | Live0 confirmations |
top(origin, destination, date) -> airline, price, from, to, departureTime, arrivalDate, arrivalTime, durationMinutes, viaOne-way flights: Google's "top departing flights" (best) list; disjoint from search, together they are the full results page. Same args and item fields as search. |
GET | no | no | Live0 confirmations |
Notes
No account is needed. One-way, 1 adult, economy only. No pagination.
- The cheapest flight on a date can be in either
searchortop. "Cheapest flight next month" is onepriceCalendarcall per airport pair (for a metro area, one per airport: New York is JFK, LGA, EWR), thensearchandtopfor the cheapest date. - In
searchandtop, a metro code or city name covers all its airports, and each item'sfrom/tosays which one. An ambiguous city name is resolved the way Google's search box resolves it. priceCalendar'spatternrefuses metro codes, but its list is not exhaustive: an unlisted metro code comes back empty.- A date in the past or a place Google can't resolve makes
searchandtopreturninput: check the date and places.priceCalendarwith an empty range returnsinput.
About these operations
Each operation is a request learned from Google Flights's own web pages: API Anything replays it over plain HTTP and falls back to a browser when it must. Read them as JSON.