Flights
Flights from Google Flights for a route and date: price, airline, flight numbers, times, duration, stops, layovers and emissions.
Try it in the dashboard 10 free credits when you sign up, no card.
GET/v1/google/flights
Costs 1 credit per request. Only requests that return data are charged.
Parameters
| Name | Type | Description |
|---|---|---|
fromrequired |
string | Departure airport or city code, such as LAX or LON. |
torequired |
string | Arrival airport or city code, such as JFK or PAR. |
daterequired |
string | Departure date, YYYY-MM-DD. |
returnoptional |
string | Return date for a round trip, YYYY-MM-DD. Without it: one way. |
adultsoptional |
integer | Number of adult passengers. Default: 1. From 1 to 9. |
cabinoptional |
string | Cabin class. One of: economy, premium_economy, business, first. Default: economy. |
limitoptional |
integer | How many flights to return. Default: 20. From 1 to 30. |
Example request
curl "https://pipefetch.com/v1/google/flights?from=LAX&to=JFK&date=2026-12-20" \
-H "x-api-key: YOUR_API_KEY"const res = await fetch('https://pipefetch.com/v1/google/flights?from=LAX&to=JFK&date=2026-12-20', {
headers: { 'x-api-key': process.env.PIPEFETCH_API_KEY },
});
const { data, credits } = await res.json();import os, requests
res = requests.get(
"https://pipefetch.com/v1/google/flights",
params={"from": "LAX", "to": "JFK", "date": "2026-12-20"},
headers={"x-api-key": os.environ["PIPEFETCH_API_KEY"]},
)
data = res.json()["data"]Example response
A real answer to the request above. Long texts and lists are shortened here, and the people who wrote comments, reviews or posts are replaced by a stand-in.
{
"data": {
"search": {
"from": "LAX",
"to": "JFK",
"date": "2026-12-20",
"return": null,
"adults": 1,
"cabin": "economy",
"currency": "USD"
},
"priceLevel": null,
"typicalPriceLow": null,
"typicalPriceHigh": null,
"flights": [
{
"rank": 1,
"isBest": true,
"isCheapest": true,
"price": 205,
"airline": "American",
"airlines": [
"American"
],
"flightNumbers": [
"AA28"
],
"origin": "LAX",
"destination": "JFK",
"departAt": "2026-12-20T15:30",
"arriveAt": "2026-12-20T23:51",
"durationMinutes": 321,
"stops": 0,
"layovers": [],
"emissionsKg": 579,
"emissionsVsTypicalPercent": 75,
"googleFlightsUrl": "https://www.google.com/travel/flights/booking?tfs=CBwQAho-EgoyMDI2LTEyLTIwIh4KA0xBWBIKMjAyNi0xMi0yMBoDSkZLKgJBQTICMjhqBwgBEgNMQVhyBwgBEgNKRktAAUgBcAGC…"
},
{
"rank": 2,
"isBest": true,
"isCheapest": false,
"price": 329,
"airline": "Delta",
"airlines": [
"Delta"
],
"flightNumbers": [
"DL960"
],
"origin": "LAX",
"destination": "JFK",
"departAt": "2026-12-20T22:15",
"arriveAt": "2026-12-21T06:25",
"durationMinutes": 310,
"stops": 0,
"layovers": [],
"emissionsKg": 236,
"emissionsVsTypicalPercent": -29,
"googleFlightsUrl": "https://www.google.com/travel/flights/booking?tfs=CBwQAho_EgoyMDI2LTEyLTIwIh8KA0xBWBIKMjAyNi0xMi0yMBoDSkZLKgJETDIDOTYwagcIARIDTEFYcgcIARIDSkZLQAFIAXAB…"
}
]
},
"credits": {
"used": 1,
"remaining": 99
}
}Good to know
- Flights come in Google's order ("best" first); isCheapest marks the cheapest. Prices are in US dollars, for all passengers together.
- A round trip lists the outbound flights with the price of the whole trip, as Google Flights does.
- A date in the past or a route without flights answers 404 no_flights and costs nothing.
Errors
Every error has the same shape, and none of them is charged. The full list is in the error reference.
Looking for an overview and use cases? See the Google Flights API page.