To get Google Flights prices programmatically, use Scavio's Google Flights API. POST /api/v2/google/flights with a departure airport, an arrival airport and a date returns the itineraries Google Flights shows, each with price, airline, flight numbers, legs, layovers and duration, plus price_insights with the lowest fare, Google's price level and its typical price range. Add a return date for a round trip, a cabin, a stop limit or several origin airports. Every call is 1 credit, about $0.001 on the Growth plan.
Google retired its own flight-search API, QPX Express, in 2018, so there is no first-party endpoint to call. The steps below use responses we captured on November 29, 2026.
Step 1: Price a route on one date
curl -s https://api.scavio.dev/api/v2/google/flights \
-H "Authorization: Bearer $SCAVIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"departure_id": "JFK", "arrival_id": "LAX", "outbound_date": "2027-01-12", "type": 2}'type is 1 for a round trip (the default, which needs return_date), 2 for one way and 3 for multi-city. This call returned 27 itineraries, 3 in best_flights and 24 in other_flights. The response is flat, with no data wrapper. The first best flight, as captured (booking token trimmed):
{
"flights": [
{
"departure_airport": {
"name": "John F. Kennedy International Airport",
"id": "JFK",
"time": "2027-01-12 13:59"
},
"arrival_airport": {
"name": "Los Angeles International Airport",
"id": "LAX",
"time": "2027-01-12 17:21"
},
"duration": 382,
"airplane": "Airbus A320",
"airline": "JetBlue",
"airline_logo": "https://www.gstatic.com/flights/airline_logos/70px/B6.png",
"travel_class": "Economy",
"flight_number": "B6 723",
"legroom": "33 in",
"extensions": [
"Above average legroom (33 in)",
"Free Wi-Fi",
"In-seat power & USB outlets",
"Live TV",
"Carbon emissions estimate: 436 kg"
]
}
],
"total_duration": 382,
"carbon_emissions": {
"this_flight": 437000,
"typical_for_this_route": 326000,
"difference_percent": 34
},
"price": 179,
"type": "One way",
"airline_logo": "https://www.gstatic.com/flights/airline_logos/70px/B6.png",
"departure_token": "gfDJff",
"booking_token": "CjRIWUFvUzl1ZkYtT1lBSkFQ..."
}flights[] has one entry per leg, durations are in minutes, and times are local to each airport. Connecting itineraries add a layovers[] array with each stop's airport and minutes on the ground. search_parameters echoes what was priced, including the defaults ("adults": 1, "currency": "USD", "gl": "us", "hl": "en"), so store it with every fare.
Step 2: Read Google's price insights
The same response carries Google's verdict on the fare:
"price_insights": {
"lowest_price": 179,
"price_level": "high",
"typical_price_range": [70, 215]
}lowest_price is the lowest itinerary price in the response. price_level is Google's label, and it is relative to typical_price_range, which changes with the date: for December departures on this route the range was $160 to $345, so $253 read "typical", while January's range of $70 to $215 made $179 read "high". On 14 of 62 dates around Christmas and New Year, price_level was missing altogether. Treat it as optional, and keep the range next to it.
Step 3: Narrow by cabin, stops and sort order
curl -s https://api.scavio.dev/api/v2/google/flights \
-H "Authorization: Bearer $SCAVIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"departure_id": "JFK", "arrival_id": "LAX", "outbound_date": "2027-01-12", "type": 2, "travel_class": 3, "stops": 1, "sort_by": 2}'travel_class 3 is business, stops 1 is nonstop only and sort_by 2 sorts by price. This returned 27 nonstop business itineraries on American, Delta and JetBlue, from $905 (JetBlue B6 2715 and B6 1723) to $4,449, with price_insights of {"lowest_price": 905, "price_level": "typical", "typical_price_range": [730, 1100]}. With price sorting, every result arrived in other_flights and best_flights was empty, so read both arrays. include_airlines and exclude_airlines take comma-separated airline codes.
Step 4: Search several airports at once
curl -s https://api.scavio.dev/api/v2/google/flights \
-H "Authorization: Bearer $SCAVIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"departure_id": "JFK,EWR,LGA", "arrival_id": "LAX", "outbound_date": "2027-01-12", "type": 2}'All three New York airports returned 37 itineraries: 27 from JFK, 9 from Newark and 1 from LaGuardia, with United and Frontier appearing alongside American, Delta, JetBlue and Alaska. The lowest fare fell from $179 (JFK only) to $145, a Frontier connection from Newark through Atlanta taking 957 minutes, and Alaska's AS 287 from Newark was a $174 nonstop. Check flights[0].departure_airport.id to see which airport each itinerary leaves from.
Step 5: Price a round trip
curl -s https://api.scavio.dev/api/v2/google/flights \
-H "Authorization: Bearer $SCAVIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"departure_id": "JFK", "arrival_id": "LAX", "outbound_date": "2027-01-12", "return_date": "2027-01-19", "type": 1}'A round trip returns the outbound flights, each priced as the whole round trip: 28 options with "type": "Round trip", most at $357 and the lowest at $352, against a typical range of $140 to $360. The return flights themselves are not listed; departure_token comes back in the response, but the endpoint does not take it as input. If you need the exact return flight, price the return leg as its own one-way search.
Step 6: Find the cheapest dates
There is no calendar endpoint, so loop over dates and keep price_insights.lowest_price from each response:
import datetime, requests
API_KEY = "sk_live_your_key" # load from your secret store in real code
day, last = datetime.date(2026, 12, 1), datetime.date(2027, 1, 31)
fares = {}
while day <= last:
r = requests.post(
"https://api.scavio.dev/api/v2/google/flights",
headers={"Authorization": f"Bearer {API_KEY}"},
json={"departure_id": "JFK", "arrival_id": "LAX",
"outbound_date": day.isoformat(), "type": 2},
timeout=150,
)
if r.ok:
fares[day.isoformat()] = r.json()["price_insights"]["lowest_price"]
day += datetime.timedelta(days=1)
print(min(fares.items(), key=lambda kv: kv[1]))We ran this on November 29, 2026: 62 dates, 62 credits, a median of 1.8 seconds per call. The lowest fare was $174 on January 16, 23 and 30 and $459 on December 28; the full chart is in the best Google Flights APIs. A few calls returned a 503 after 90 seconds and succeeded on retry, so retry 502, 503 and 429 responses after a short wait rather than dropping the date.
The endpoint and its parameters
| Endpoint | What it returns | Credits |
|---|---|---|
/api/v2/google/flights | Itineraries in best_flights and other_flights with legs, layovers, duration, emissions and price; price_insights; airport details | 1 |
| Parameter | Values |
|---|---|
departure_id, arrival_id | IATA codes; comma-separate several airports |
outbound_date, return_date | YYYY-MM-DD; return_date required when type is 1 |
type | 1 round trip (default), 2 one way, 3 multi-city |
travel_class | 1 economy, 2 premium economy, 3 business, 4 first |
stops | 0 any, 1 nonstop, 2 one stop or fewer, 3 two stops or fewer |
sort_by | 1 top, 2 price, 3 departure, 4 arrival, 5 duration, 6 emissions |
adults, children, infants_in_seat, infants_on_lap | Passenger counts |
include_airlines, exclude_airlines | Comma-separated airline codes |
currency, gl, hl | Currency, country and language; London to New York with "currency": "GBP", "gl": "uk" came back in pounds |
For a side-by-side of every option, including APIs with a fare calendar, see the best Google Flights APIs for flight prices.
Getting started
- Sign up at dashboard.scavio.dev/sign-up: 50 free credits, no card required.
- Copy your API key from the dashboard.
- Send a POST to
/api/v2/google/flightswith a route and a date.
Try the Google Flights API free in the playground first, or call it from Claude and other agents through the MCP server.
Reference: Google Flights API overview · flight search docs · Google Hotels API · is there a free, unlimited flight price API?
Frequently asked questions
Is there an official Google Flights API?
No. Google shut down QPX Express, its flight-search API, on April 10, 2018, and Google Flights has no public developer endpoint. Scavio's Google Flights API returns the itineraries Google Flights shows for a route and date as JSON, with one API key and no airline or GDS agreement.
How do I get Google Flights prices in Python?
Send a POST to https://api.scavio.dev/api/v2/google/flights with departure_id, arrival_id and outbound_date in the JSON body and your key in the Authorization header, using requests or the scavio package (pip install scavio). Read best_flights and other_flights for itineraries and price_insights for the lowest price and Google's price level.
How do I find the cheapest day to fly?
Call the endpoint once per departure date and keep each response's price_insights.lowest_price. On November 29, 2026, 62 calls priced JFK to LAX for every date from December 1 to January 31: $459 on December 28 and $174 on three January Saturdays.
How much does a Google Flights API call cost on Scavio?
1 credit per call, whatever the route, cabin or trip type: about $0.001 on the Growth plan. New accounts get 50 free credits with no card, enough to price one route on 50 dates.