API Anything

Google Flights APIunofficial

Logged-out one-way flight search and a cheapest-date price calendar on Google Flights. Prices in USD, en-US.

all live 3 operations, checked by the installs that call them.

Try it

Set up API Anything for your agents:

npx -y api-anything setup

Then 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-30

Operations

OperationMethodLoginWritesStatus
priceCalendar(origin, destination, start, end) -> date, price

Cheapest 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, via

One-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, via

One-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 search or top. "Cheapest flight next month" is one priceCalendar call per airport pair (for a metro area, one per airport: New York is JFK, LGA, EWR), then search and top for the cheapest date.
  • In search and top, a metro code or city name covers all its airports, and each item's from/to says which one. An ambiguous city name is resolved the way Google's search box resolves it.
  • priceCalendar's pattern refuses 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 search and top return input: check the date and places. priceCalendar with an empty range returns input.

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.

← All shared sites