Google APIflights.google.com ↗
Search Google Flights itineraries by route and date. Get prices, airlines, stop counts, layovers, segments, emissions, and price insights via one endpoint.
What is the Google API?
The Google Flights API exposes 1 endpoint — search_flights — that returns all itineraries Google Flights lists for a given origin–destination pair and departure date, covering up to 10 response fields per search including per-itinerary price, airline names, stop count, full segment detail, and Google's own price-guidance object. It handles both one-way and round-trip queries with optional filters for cabin class, passenger count, and maximum stops.
curl -X GET 'https://api.parse.bot/scraper/3fc1f751-74f4-4577-8d87-93d6809f072e/search_flights?origin=PTY&destination=LAS&departure_date=2026-10-09' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace flights-google-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: Google Flights SDK — search itineraries, inspect segments."""
from parse_apis.flights_google_com_api import GoogleFlights, Cabin, InputNotFound
client = GoogleFlights()
# Search one-way flights from Panama City to Las Vegas in economy.
try:
result = client.flight_searches.search(
origin="PTY",
destination="LAS",
departure_date="2026-10-09",
cabin=Cabin.ECONOMY,
)
except InputNotFound as e:
print("Airport not recognized:", e.message)
raise
# Top-level search metadata
print(f"{result.origin} → {result.destination} on {result.departure_date}")
print(f"Trip: {result.trip_type}, cabin: {result.cabin}, currency: {result.currency}")
print(f"Total itineraries: {result.total}")
# Price guidance when available
if result.price_insight is not None:
pi = result.price_insight
print(f"Price insight — lowest: {pi.lowest_price}, typical: {pi.typical_low}–{pi.typical_high}")
# Walk every returned flight
for flight in result.flights:
print(f"\n${flight.price} {flight.currency} | {flight.airline_names} | "
f"{flight.stops} stop(s) | {flight.duration_minutes} min | "
f"CO₂ {flight.co2_kg} kg ({flight.emissions_vs_typical_percent}% vs typical)")
# Layover details
for lay in flight.layovers:
print(f" Layover: {lay.airport} ({lay.city}) — {lay.duration_minutes} min")
# Per-segment detail
for seg in flight.segments:
operated = f" (operated by {seg.operated_by})" if seg.operated_by else ""
legroom_info = f", legroom {seg.legroom}" if seg.legroom else ""
print(f" {seg.carrier_code}{seg.flight_number}{operated}: "
f"{seg.departure_airport} {seg.departure_time} → "
f"{seg.arrival_airport} {seg.arrival_time} | "
f"{seg.duration_minutes} min | {seg.aircraft}{legroom_info}")
print("\nexercised: flight_searches.search / Flight / Segment / Layover / PriceInsight")
Returns the itineraries Google Flights lists for a route and departure date, in one round trip to the site. Each row is one bookable itinerary for the outbound direction (airline(s), departure/arrival times, total duration, stop count, layovers, per-segment flights with aircraft and legroom, CO2 estimate) with its total price for all requested passengers. When return_date is given the search is a round trip: rows still describe the outbound leg only, and price is the round-trip fare. Rows flagged is_best are the ones Google ranks as its top picks; the rest come from Google's full list. price_insight carries Google's lowest current price and the typical low/high range for the route when Google publishes it (null otherwise). Results are the set Google renders on the first page load (typically 5-15 itineraries); there is no pagination. An empty flights array means Google shows no itineraries for that request (e.g. max_stops excludes everything). Dates in the past, unknown cabin names, or non-IATA airport codes are rejected before any request; an airport code Google does not recognize returns a not-found input error.
| Param | Type | Description |
|---|---|---|
| cabin | string | Cabin class to price. |
| adults | integer | Number of adult passengers, 1 to 9. Prices are totals for all passengers. |
| originrequired | string | Departure airport as a 3-letter IATA code (case-insensitive). |
| currency | string | 3-letter ISO currency code for prices. Only USD was exercised during the build; other codes are forwarded to Google as-is. |
| max_stops | integer | Maximum number of stops per itinerary: 0 (nonstop only), 1 or 2. Omitted = any number of stops. |
| destinationrequired | string | Arrival airport as a 3-letter IATA code (case-insensitive). |
| return_date | string | Return date, ISO YYYY-MM-DD, on or after departure_date. Omitted = one-way search; present = round-trip search (prices become round-trip fares). |
| departure_daterequired | string | Outbound date, ISO YYYY-MM-DD, today or later. |
{
"type": "object",
"fields": {
"cabin": "cabin class priced",
"total": "number of itineraries returned",
"adults": "passenger count priced",
"origin": "IATA code searched",
"flights": "array of itineraries: price (number, total for all passengers), airline_codes/airline_names, departure/arrival airport, date and 24h time, duration_minutes, stops, layovers [{airport, airport_name, city, duration_minutes}], segments [{carrier_code, carrier_name, flight_number, operated_by, departure/arrival airport+name+date+time, duration_minutes, aircraft, legroom, codeshares}], co2_kg, emissions_vs_typical_percent, is_best",
"currency": "currency of all prices",
"trip_type": "one_way or round_trip",
"destination": "IATA code searched",
"return_date": "ISO return date, or null for one-way",
"price_insight": "object {lowest_price, typical_low, typical_high} from Google's price guidance, or null",
"departure_date": "ISO date searched"
},
"sample": {
"data": {
"cabin": "economy",
"total": 7,
"adults": 1,
"origin": "PTY",
"flights": [
{
"price": 953,
"stops": 0,
"co2_kg": 386,
"is_best": true,
"currency": "USD",
"layovers": [],
"segments": [
{
"legroom": "31 in",
"aircraft": "Boeing 737",
"codeshares": [
"UA7112"
],
"operated_by": null,
"arrival_date": "2026-10-01",
"arrival_time": "22:30",
"carrier_code": "CM",
"carrier_name": "COPA",
"flight_number": "456",
"departure_date": "2026-10-01",
"departure_time": "17:51",
"arrival_airport": "LAS",
"duration_minutes": 399,
"departure_airport": "PTY",
"arrival_airport_name": "Harry Reid International Airport",
"departure_airport_name": "Tocumen International Airport Panama"
}
],
"arrival_date": "2026-10-01",
"arrival_time": "22:30",
"airline_codes": [
"CM"
],
"airline_names": [
"COPA"
],
"departure_date": "2026-10-01",
"departure_time": "17:51",
"arrival_airport": "LAS",
"duration_minutes": 399,
"departure_airport": "PTY",
"emissions_vs_typical_percent": -3
},
{
"price": 577,
"stops": 1,
"co2_kg": 388,
"is_best": false,
"currency": "USD",
"layovers": [
{
"city": "Miami",
"airport": "MIA",
"airport_name": "Miami International Airport",
"duration_minutes": 258
}
],
"segments": [
{
"legroom": "30 in",
"aircraft": "Boeing 737",
"codeshares": [],
"operated_by": null,
"arrival_date": "2026-10-01",
"arrival_time": "17:23",
"carrier_code": "AA",
"carrier_name": "American",
"flight_number": "2964",
"departure_date": "2026-10-01",
"departure_time": "13:16",
"arrival_airport": "MIA",
"duration_minutes": 187,
"departure_airport": "PTY",
"arrival_airport_name": "Miami International Airport",
"departure_airport_name": "Tocumen International Airport Panama"
},
{
"legroom": "30 in",
"aircraft": "Boeing 737MAX 8 Passenger",
"codeshares": [],
"operated_by": null,
"arrival_date": "2026-10-01",
"arrival_time": "23:58",
"carrier_code": "AA",
"carrier_name": "American",
"flight_number": "726",
"departure_date": "2026-10-01",
"departure_time": "21:41",
"arrival_airport": "LAS",
"duration_minutes": 317,
"departure_airport": "MIA",
"arrival_airport_name": "Harry Reid International Airport",
"departure_airport_name": "Miami International Airport"
}
],
"arrival_date": "2026-10-01",
"arrival_time": "23:58",
"airline_codes": [
"AA"
],
"airline_names": [
"American"
],
"departure_date": "2026-10-01",
"departure_time": "13:16",
"arrival_airport": "LAS",
"duration_minutes": 762,
"departure_airport": "PTY",
"emissions_vs_typical_percent": -3
}
],
"currency": "USD",
"trip_type": "one_way",
"destination": "LAS",
"return_date": null,
"price_insight": {
"typical_low": 375,
"lowest_price": 577,
"typical_high": 600
},
"departure_date": "2026-10-01"
},
"status": "success"
}
}About the Google API
What the API Returns
The search_flights endpoint accepts two required IATA airport codes (origin, destination) and a departure_date, then returns a flights array where each element is one bookable outbound itinerary. Each itinerary includes the total price for all passengers, carrier codes and full airline names, departure and arrival airports, scheduled times, total journey duration, stop count, individual layover details, and per-segment flight numbers with aircraft type. A top-level price_insight object carries Google's price guidance — lowest_price, typical_low, and typical_high — when the source makes it available, or null otherwise.
Trip Type and Filtering
Omit return_date for a one-way search; include it (ISO YYYY-MM-DD, on or after departure_date) for a round-trip search. The response reflects the trip type in the trip_type field. Use max_stops to restrict results to nonstop (0), one-stop (1), or two-stop (2) itineraries. The cabin parameter accepts standard cabin class strings, and adults (1–9) scales all prices to the full passenger total, returned alongside the currency field.
Coverage and Known Behavior
The endpoint mirrors the itinerary list Google Flights surfaces for the queried route and date — the same flights a user would see on that page. The currency parameter forwards your preferred ISO code; USD is the tested value, so results in other currencies should be validated. The total field at the top of the response reports how many itineraries were returned, useful for confirming that the filter combination (max_stops, cabin) produced results. CO₂ emissions data, where Google Flights shows it, is included per itinerary.
The Google API is a managed, monitored endpoint for flights.google.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when flights.google.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official flights.google.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Monitor daily price changes on a specific route using
price_insight.lowest_priceto trigger fare alerts - Build a flight comparison tool that surfaces nonstop options by setting
max_stops: 0 - Calculate total trip cost for group travel by passing
adultsup to 9 and reading the aggregatepricefield - Display outbound segment detail — flight numbers, aircraft types, and layover durations — in a travel itinerary planner
- Track carbon emissions per itinerary to surface lower-emissions routing options to users
- Feed round-trip fare data into a price-forecasting model using
typical_lowandtypical_highfromprice_insight - Power a cabin-class upgrade cost calculator by querying the same route across different
cabinvalues
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 200 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
| Team | $300/mo | 20,000 | 300 req/min |
| Company | $1,000/mo | 100,000 | 500 req/min |
Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Google Flights have an official developer API?+
What does `price_insight` return, and when is it null?+
price_insight is an object with three numeric fields: lowest_price (the cheapest fare found for that route), typical_low, and typical_high (the normal fare range). If Google Flights does not display price guidance for the queried route and date — which can happen for thin routes or far-future dates — the field is null.Does the API return return-leg itineraries for round-trip searches?+
flights array represents one outbound option; the return_date is echoed back and trip_type is set to round_trip, but separate return-leg itinerary arrays are not currently included. You can fork this API on Parse and revise it to add a return-leg itineraries endpoint.Is there pagination — can I retrieve more than the first page of results?+
page or offset parameter. The total field shows how many itineraries are in that response. Pagination across additional result pages is not currently supported. You can fork this API on Parse and revise it to add paginated retrieval.Can I search by flexible dates or see a price calendar across a month?+
search_flights endpoint requires a specific departure_date and returns itineraries for that date only. A flexible-date or month-grid price calendar is not currently available. You can fork this API on Parse and revise it to loop across dates or add a calendar-view endpoint.