# Google Flights API

> Create a Google Flights report with route, travel dates, passengers, and cabin options.

Canonical: https://docs.georanker.com/SERP-API/Google-Flights-API

Use the Google Flights API to find flight itineraries for an origin, destination, departure date, and passenger count. The API returns normalized listings in `data.flights`.

## Create a flight search

Set `HV_API_KEY` to your [HV API key](https://docs.georanker.com/SERP-API/Getting-Started). This cURL 7.87 or later example searches one economy passenger from San Francisco to New York. Replace the departure date with a future date when running it.

```bash
curl --fail-with-body --silent --show-error \
  --request POST 'https://api.highvolume.georanker.com/serp/new' \
  --url-query "apikey=$HV_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{"searchEngine":"google-flights","region":"US","asynchronous":true,"travel":{"origin":"SFO","destination":"JFK","departureDate":"2027-01-15","passengers":1,"cabin":"economy","currency":"USD","hl":"en"}}'
```

HTTP `200` returns a report ID. Save it and [retrieve the report](https://docs.georanker.com/SERP-API/Get-Results) with `GET /serp/{id}`. Check `ready` and `faulty` before reading the flight listings.

## Flight request fields

| Field | How to use it |
| --- | --- |
| `searchEngine` | Set to `google-flights`. |
| `region` | Required. Sets the search location, such as `US`. |
| `travel.origin`, `travel.destination` | Required three-letter airport or city codes. |
| `travel.departureDate` | Required date in `YYYY-MM-DD` format. |
| `travel.returnDate` | Add a date on or after departure for a round trip. Omit it for a one-way search. |
| `travel.passengers` | Passenger count, at least 1. |
| `travel.cabin` | `economy`, `premium-economy`, `business`, or `first`. The default is `economy`. |
| `travel.currency` | Three-letter currency code, such as `USD`. |
| `travel.hl` | Two-letter search language, such as `en`. |
| `asynchronous` | Set to `true` to submit and retrieve later. |
| `maxResults` | Limits normalized flight listings. Available limits depend on the engine and plan. |
| `saveRawData` | Set to `true` to retain the provider output in `data.raw`. |

The API generates a descriptive keyword when `keyword` is omitted. Send the route and dates inside `travel`. [All flight request fields and errors](https://docs.georanker.com/SERP-API/Google-Flights-API?fields=1#tag/serps-api/POST/serp/new)

## Read the flight results

When `ready` is `true` and `faulty` is `false`, read `data.flights`. Listings can include `company`, `price`, `departureTime`, `arrivalTime`, `duration`, `stops`, `priceType`, and `airports`. Fields can be absent when the source does not provide them.

Keep the returned price text and `priceType` together when displaying a quote. The `price` field alone does not establish whether a quote covers each passenger or the full party. A successful flight report can have an empty `data.organic` array.

With `saveRawData: true`, provider entries with `type: "JSON"` contain JSON encoded as a string in `content`. Parse that string separately. The provider payload can contain more listings than the normalized array limited by `maxResults`. [Flight response fields](https://docs.georanker.com/SERP-API/Google-Flights-API?fields=1#tag/serps-api/GET/serp/%7Bid%7D)

## Try a flight search

Select **Try API** on this page and connect your key. Check [pricing](https://docs.georanker.com/HV-API/Pricing) and [credits](https://docs.georanker.com/HV-API/Usage-and-Credits) before submitting. If submission times out before you receive an ID, check whether the report was created before sending it again.
