Google API

Google Flights API

Send two airport codes and a date and get the flights Google Flights shows as JSON: price, airline, flight numbers, departure and arrival times, duration, stops, layovers and emissions, with Google's price level for the route.

  • 10 free credits
  • No card needed
  • No scraper to build or maintain
curl "https://pipefetch.com/v1/google/flights?from=LAX&to=JFK&date=2026-12-20" \
  -H "x-api-key: YOUR_API_KEY"
The response

What you get

  • Up to 30 flights, one way or round trip
  • Price in US dollars, and which flight is best and which cheapest
  • Airlines, flight numbers, departure and arrival times
  • Duration, stops and layovers
  • Emissions against the route's typical, and Google's price level
200 OK · application/json
{
  "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
  }
}
Reference

One GET request

Everything the endpoint accepts. The full reference, with the complete example response, is in the docs.

GET/v1/google/flights

Costs 1 credit per request. Only requests that return data are charged.

Parameters

NameTypeDescription
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.

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.

Open the reference

Use cases

What people build with it

  • Fare tracking

    Check a route every day and catch price drops.

  • Travel apps

    Show real flight options and prices in your product.

  • Route research

    Compare airlines, durations and stops on a route.

  • Trip planning for AI agents

    An agent planning a trip gets flight options in one call.

Pricing

Buy credits once. Use them whenever.

This endpoint costs 1 credit per request, and a request that returns no data costs nothing. Move the slider to see what your volume costs.

5,000credits a month
5005,00050,000250,000
5,000requests at 1 credit
1,666jobs requests at 3 credits

Each endpoint says what a request costs. Requests that return nothing are free.

Best fit
Builder pack
12,000 credits, one-time payment
$29once
  • $2.42 per 1,000 credits
  • About $12.08 a month at this pace
  • Lasts about 2.4 months at this pace
  • Credits never expire
Start with 10 free credits

See all packs and what a credit buys

FAQ

Questions and answers

Is this the official Google Flights API?

No. Pipefetch is an independent service and is not affiliated with Google Flights. It returns what Google Flights shows publicly to a visitor who is not signed in; you need no Google Flights account, only one Pipefetch API key.

Can I book through it?

No. The answer lists flights and prices with a link to the search on Google Flights; booking happens there.

What does a request cost?

One request costs 1 credit. Credit packs start at $9 for 3,000 credits, never expire, and a request that returns no data is not charged. New accounts get 10 free credits without a card.

More

More Google APIs

Also on the same key

Other sources

Make your first request in a minute

Sign in, copy your key and call an endpoint. Your account starts with 10 free credits.