String API
Site integrations

Google Flights

Google Flights search: itineraries with prices, airlines, flight numbers, legs and layovers.

Call these actions with your String API key; see Authentication. Every call answers with the envelope described in Responses & errors, whose data holds the rows below.

  • Site: googleflights
  • Version: 1.1.0
  • Reads from: google.com
ActionDescriptionListed price
searchSearch Google Flights for one-way or round-trip itineraries between two airports on a date, with passengers, cabin and a stops filter. Rows carry the price for all passengers, the airlines, every leg's flight number, times, aircraft and legroom, the layovers, Google's CO2 estimate and a booking token. A round trip returns the outbound flights, each priced for the whole trip, as Google Flights lists them before a return flight is chosen.Billed per request at your plan's rates
return-flightsList the return flights for a round trip's chosen outbound flight, as Google Flights does once an outbound flight is picked. Pass the selectionToken of a search row whose search had a returnDate. Rows have the search's shape, each priced for the whole round trip, and each selectionToken goes to booking-options.Billed per request at your plan's rates
calendarPrice every departure date in a range, up to 180 days, as Google Flights' date picker does: the lowest price for one way on each date, or with tripDays for the round trip leaving that date and returning tripDays later. Dates past the 330 days ahead Google Flights sells are left out.Billed per request at your plan's rates
booking-optionsList where and at which fares an itinerary can be booked, as Google Flights' booking page does: each seller, fare family and price, the flights it covers, and the request that leads to the seller's booking page. Pass the selectionToken of a one-way search row or of a return-flights row.Billed per request at your plan's rates

Search Google Flights for one-way or round-trip itineraries between two airports on a date, with passengers, cabin and a stops filter. Rows carry the price for all passengers, the airlines, every leg's flight number, times, aircraft and legroom, the layovers, Google's CO2 estimate and a booking token. A round trip returns the outbound flights, each priced for the whole trip, as Google Flights lists them before a return flight is chosen.

POST https://request.usestring.ai/v1/integrations/googleflights/search

Input

Unknown fields are rejected.

FieldTypeDescription
originstringRequired. The departure airport's IATA code, such as JFK. Matches ^[A-Za-z]{3}$.
destinationstringRequired. The arrival airport's IATA code, such as LAX. Matches ^[A-Za-z]{3}$.
departureDatestringRequired. The outbound date, YYYY-MM-DD. Matches ^\d{4}-\d{2}-\d{2}$.
returnDatestringThe return date, YYYY-MM-DD, for a round trip. Omit for one way. Matches ^\d{4}-\d{2}-\d{2}$.
adultsintegerAdult passengers. Defaults to 1. From 1 to 9.
childrenintegerChild passengers, aged 2 to 11. From 0 to 9.
infantsInSeatintegerInfants under 2 with their own seat. From 0 to 9.
infantsOnLapintegerInfants under 2 on an adult's lap, at most one per adult. From 0 to 9.
cabineconomy premiumEconomy business firsteconomy, premiumEconomy, business or first. Defaults to economy.
maxStopsinteger | nullThe most stops an itinerary may make on each way: 0 for nonstop only, 1 or 2. Omit for any number. From 0 to 2.
countrystringThe country to search from, ISO 3166-1 alpha-2, which sets the point of sale prices are quoted for. Defaults to US. Matches ^[A-Za-z]{2}$.
currencystringThe currency of prices, ISO 4217 such as USD or EUR. Defaults to USD. Matches ^[A-Za-z]{3}$.

Output

data is an array of rows, one per result. Each row has:

FieldTypeDescription
positionintegerPosition in the results, from 1, best flights first and then the rest, in Google Flights' order.
bestbooleanWhether Google Flights lists the itinerary under its best flights.
pricenumber | nullThe lowest price for every passenger together: the round trip's total when returnDate is set. Null when Google Flights shows no price.
currencystring—
airlinesstring[]The marketing airlines' names.
departureAirportstring—
arrivalAirportstring—
departureTimestringLocal time at the departure airport, YYYY-MM-DDTHH:MM.
arrivalTimestringLocal time at the arrival airport, YYYY-MM-DDTHH:MM.
durationMinutesintegerTotal travel time, layovers included.
stopsinteger—
legsobject[]Each flight of the itinerary, in order.
legs[].flightNumberstringAirline code and number, such as B6 1023.
legs[].airlineCodestring—
legs[].airlinestring—
legs[].operatedBystring | nullThe operating carrier when it is not the marketing airline, such as a regional partner.
legs[].departureAirportstring—
legs[].departureAirportNamestring—
legs[].arrivalAirportstring—
legs[].arrivalAirportNamestring—
legs[].departureTimestringLocal time at the departure airport, YYYY-MM-DDTHH:MM.
legs[].arrivalTimestringLocal time at the arrival airport, YYYY-MM-DDTHH:MM.
legs[].durationMinutesinteger—
legs[].aircraftstring | null—
legs[].legroomstring | nullSeat pitch as Google Flights shows it, such as 31 in.
layoversobject[]—
layovers[].airportstringWhere the previous leg lands.
layovers[].airportNamestring—
layovers[].citystring—
layovers[].durationMinutesinteger—
layovers[].nextDepartureAirportstringWhere the next leg leaves from, which differs from airport when the connection changes airports.
emissionsGramsinteger | nullGoogle's estimate of the itinerary's CO2 per passenger, in grams.
typicalEmissionsGramsinteger | nullGoogle's typical CO2 per passenger for the route, in grams.
bookingTokenstringGoogle Flights' opaque token for this itinerary and fare, which its booking options page is requested with.
selectionTokenstringChooses this itinerary: pass it to return-flights for a round trip's outbound flight, or to booking-options for a one-way flight or a chosen return flight.

Example

curl https://request.usestring.ai/v1/integrations/googleflights/search \
  -H "Authorization: Bearer $STRING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "origin": "JFK",
    "destination": "LAX",
    "departureDate": "2026-11-12"
  }'

data starts with these rows:

[
  {
    "position": 1,
    "best": true,
    "price": 204,
    "currency": "USD",
    "airlines": ["Delta"],
    "departureAirport": "JFK",
    "arrivalAirport": "LAX",
    "departureTime": "2026-11-12T12:00",
    "arrivalTime": "2026-11-12T15:08",
    "durationMinutes": 368,
    "stops": 0,
    "legs": [
      {
        "flightNumber": "DL 1788",
        "airlineCode": "DL",
        "airline": "Delta",
        "operatedBy": null,
        "departureAirport": "JFK",
        "departureAirportName": "John F. Kennedy International Airport",
        "arrivalAirport": "LAX",
        "arrivalAirportName": "Los Angeles International Airport",
        "departureTime": "2026-11-12T12:00",
        "arrivalTime": "2026-11-12T15:08",
        "durationMinutes": 368,
        "aircraft": "Airbus A330",
        "legroom": "31 in"
      }
    ],
    "layovers": [],
    "emissionsGrams": 261000,
    "typicalEmissionsGrams": 344000,
    "bookingToken": "CjRINDRqZ0VGZGo2dWdBSV9wTGdCRy0tLS0tLS0tLXZ0b3YyMkFBQUFBR3JMNVY4SW55c29BEgZETDE3ODgaCwj0ngEQAhoDVVNEOBxw9J4B",
    "selectionToken": "eyJxIjp7Im9yaWdpbiI6IkpGSyIsImRlc3RpbmF0aW9uIjoiTEFYIiwiZGVwYXJ0dXJlRGF0ZSI6IjIwMjYtMTEtMTIifSwicyI6W1t7ImYiOiJKRksiLCJkIjoiMjAyNi0xMS0xMiIsInQiOiJMQVgiLCJjIjoiREwiLCJuIjoiMTc4OCJ9XV0sInQiOiJDalJJTkRScVowVkdaR28yZFdkQlNWOXdUR2RDUnkwdExTMHRMUzB0TFhaMGIzWXlNa0ZCUVVGQlIzSk1OVlk0U1c1NWMyOUJFZ1pFVERFM09EZ2FDd2owbmdFUUFob0RWVk5FT0J4dzlKNEIifQ"
  },
  {
    "position": 2,
    "best": true,
    "price": 204,
    "currency": "USD",
    "airlines": ["JetBlue"],
    "departureAirport": "JFK",
    "arrivalAirport": "LAX",
    "departureTime": "2026-11-12T12:00",
    "arrivalTime": "2026-11-12T15:14",
    "durationMinutes": 374,
    "stops": 0,
    "legs": [
      {
        "flightNumber": "B6 1023",
        "airlineCode": "B6",
        "airline": "JetBlue",
        "operatedBy": null,
        "departureAirport": "JFK",
        "departureAirportName": "John F. Kennedy International Airport",
        "arrivalAirport": "LAX",
        "arrivalAirportName": "Los Angeles International Airport",
        "departureTime": "2026-11-12T12:00",
        "arrivalTime": "2026-11-12T15:14",
        "durationMinutes": 374,
        "aircraft": "Airbus A320",
        "legroom": "33 in"
      }
    ],
    "layovers": [],
    "emissionsGrams": 414000,
    "typicalEmissionsGrams": 344000,
    "bookingToken": "CjRINDRqZ0VGZGo2dWdBSV9wTGdCRy0tLS0tLS0tLXZ0b3YyMkFBQUFBR3JMNVY4SW55c29BEgZCNjEwMjMaCwj0ngEQAhoDVVNEOBxw9J4B",
    "selectionToken": "eyJxIjp7Im9yaWdpbiI6IkpGSyIsImRlc3RpbmF0aW9uIjoiTEFYIiwiZGVwYXJ0dXJlRGF0ZSI6IjIwMjYtMTEtMTIifSwicyI6W1t7ImYiOiJKRksiLCJkIjoiMjAyNi0xMS0xMiIsInQiOiJMQVgiLCJjIjoiQjYiLCJuIjoiMTAyMyJ9XV0sInQiOiJDalJJTkRScVowVkdaR28yZFdkQlNWOXdUR2RDUnkwdExTMHRMUzB0TFhaMGIzWXlNa0ZCUVVGQlIzSk1OVlk0U1c1NWMyOUJFZ1pDTmpFd01qTWFDd2owbmdFUUFob0RWVk5FT0J4dzlKNEIifQ"
  }
]

Requests and billing

  • Requests: 1–6 Web Access requests per result page.
  • Billing: passthrough. Each request the action makes bills at its own rate on your plan; there is no separate charge for the action. See Pricing.

return-flights

List the return flights for a round trip's chosen outbound flight, as Google Flights does once an outbound flight is picked. Pass the selectionToken of a search row whose search had a returnDate. Rows have the search's shape, each priced for the whole round trip, and each selectionToken goes to booking-options.

POST https://request.usestring.ai/v1/integrations/googleflights/return-flights

Input

Unknown fields are rejected.

FieldTypeDescription
selectionTokenstringRequired. A row's selectionToken. At least 1 character.

Output

data is an array of rows, one per result. Each row has:

FieldTypeDescription
positionintegerPosition in the results, from 1, best flights first and then the rest, in Google Flights' order.
bestbooleanWhether Google Flights lists the itinerary under its best flights.
pricenumber | nullThe lowest price for every passenger together: the round trip's total when returnDate is set. Null when Google Flights shows no price.
currencystring—
airlinesstring[]The marketing airlines' names.
departureAirportstring—
arrivalAirportstring—
departureTimestringLocal time at the departure airport, YYYY-MM-DDTHH:MM.
arrivalTimestringLocal time at the arrival airport, YYYY-MM-DDTHH:MM.
durationMinutesintegerTotal travel time, layovers included.
stopsinteger—
legsobject[]Each flight of the itinerary, in order.
legs[].flightNumberstringAirline code and number, such as B6 1023.
legs[].airlineCodestring—
legs[].airlinestring—
legs[].operatedBystring | nullThe operating carrier when it is not the marketing airline, such as a regional partner.
legs[].departureAirportstring—
legs[].departureAirportNamestring—
legs[].arrivalAirportstring—
legs[].arrivalAirportNamestring—
legs[].departureTimestringLocal time at the departure airport, YYYY-MM-DDTHH:MM.
legs[].arrivalTimestringLocal time at the arrival airport, YYYY-MM-DDTHH:MM.
legs[].durationMinutesinteger—
legs[].aircraftstring | null—
legs[].legroomstring | nullSeat pitch as Google Flights shows it, such as 31 in.
layoversobject[]—
layovers[].airportstringWhere the previous leg lands.
layovers[].airportNamestring—
layovers[].citystring—
layovers[].durationMinutesinteger—
layovers[].nextDepartureAirportstringWhere the next leg leaves from, which differs from airport when the connection changes airports.
emissionsGramsinteger | nullGoogle's estimate of the itinerary's CO2 per passenger, in grams.
typicalEmissionsGramsinteger | nullGoogle's typical CO2 per passenger for the route, in grams.
bookingTokenstringGoogle Flights' opaque token for this itinerary and fare, which its booking options page is requested with.
selectionTokenstringChooses this itinerary: pass it to return-flights for a round trip's outbound flight, or to booking-options for a one-way flight or a chosen return flight.

Example

curl https://request.usestring.ai/v1/integrations/googleflights/return-flights \
  -H "Authorization: Bearer $STRING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "selectionToken": "eyJxIjp7Im9yaWdpbiI6IlNGTyIsImRlc3RpbmF0aW9uIjoiU0VBIiwiZGVwYXJ0dXJlRGF0ZSI6IjIwMjYtMTEtMjAiLCJyZXR1cm5EYXRlIjoiMjAyNi0xMS0yNCIsImFkdWx0cyI6MiwibWF4U3RvcHMiOjAsImN1cnJlbmN5IjoiRVVSIn0sInMiOltbeyJmIjoiU0ZPIiwiZCI6IjIwMjYtMTEtMjAiLCJ0IjoiU0VBIiwiYyI6IlVBIiwibiI6IjQ5NCJ9XV0sInQiOiJDalJJT0RWa1RpMWtWakkwZWxGQlVITnZSa0ZDUnkwdExTMHRMUzB0TFhaM1ltbGlPVUZCUVVGQlIzSk1OVmRSUWpWTFRtbEJFZ1ZWUVRRNU5Cb0xDSW5NQWhBQ0dnTkZWVkk0SEhEeDh3ST0ifQ"
  }'

data starts with these rows:

[
  {
    "position": 1,
    "best": true,
    "price": 426,
    "currency": "EUR",
    "airlines": ["Delta"],
    "departureAirport": "SEA",
    "arrivalAirport": "SFO",
    "departureTime": "2026-11-24T07:20",
    "arrivalTime": "2026-11-24T09:43",
    "durationMinutes": 143,
    "stops": 0,
    "legs": [
      {
        "flightNumber": "DL 3034",
        "airlineCode": "DL",
        "airline": "Delta",
        "operatedBy": null,
        "departureAirport": "SEA",
        "departureAirportName": "Seattle-Tacoma International Airport",
        "arrivalAirport": "SFO",
        "arrivalAirportName": "San Francisco International Airport",
        "departureTime": "2026-11-24T07:20",
        "arrivalTime": "2026-11-24T09:43",
        "durationMinutes": 143,
        "aircraft": "Airbus A220-300 Passenger",
        "legroom": "31 in"
      }
    ],
    "layovers": [],
    "emissionsGrams": 329000,
    "typicalEmissionsGrams": 363000,
    "bookingToken": "CjRIbEdyRGtSdFhiNU1BUWlGQVFCRy0tLS0tLS12dGh4My1uMkFBQUFBR3JMNVdjRFJydlNBEgZETDMwMzQaCwiJzAIQAhoDRVVSOBxw8fMC",
    "selectionToken": "eyJxIjp7Im9yaWdpbiI6IlNGTyIsImRlc3RpbmF0aW9uIjoiU0VBIiwiZGVwYXJ0dXJlRGF0ZSI6IjIwMjYtMTEtMjAiLCJyZXR1cm5EYXRlIjoiMjAyNi0xMS0yNCIsImFkdWx0cyI6MiwibWF4U3RvcHMiOjAsImN1cnJlbmN5IjoiRVVSIn0sInMiOltbeyJmIjoiU0ZPIiwiZCI6IjIwMjYtMTEtMjAiLCJ0IjoiU0VBIiwiYyI6IlVBIiwibiI6IjQ5NCJ9XSxbeyJmIjoiU0VBIiwiZCI6IjIwMjYtMTEtMjQiLCJ0IjoiU0ZPIiwiYyI6IkRMIiwibiI6IjMwMzQifV1dLCJ0IjoiQ2pSSWJFZHlSR3RTZEZoaU5VMUJVV2xHUVZGQ1J5MHRMUzB0TFMxMmRHaDRNeTF1TWtGQlFVRkJSM0pNTlZkalJGSnlkbE5CRWdaRVRETXdNelFhQ3dpSnpBSVFBaG9EUlZWU09CeHc4Zk1DIn0"
  }
]

Requests and billing

  • Requests: 1–3 Web Access requests per result page.
  • Billing: passthrough. Each request the action makes bills at its own rate on your plan; there is no separate charge for the action. See Pricing.

calendar

Price every departure date in a range, up to 180 days, as Google Flights' date picker does: the lowest price for one way on each date, or with tripDays for the round trip leaving that date and returning tripDays later. Dates past the 330 days ahead Google Flights sells are left out.

POST https://request.usestring.ai/v1/integrations/googleflights/calendar

Input

Unknown fields are rejected.

FieldTypeDescription
originstringRequired. The departure airport's IATA code, such as JFK. Matches ^[A-Za-z]{3}$.
destinationstringRequired. The arrival airport's IATA code, such as LAX. Matches ^[A-Za-z]{3}$.
startDatestringRequired. The first departure date to price, YYYY-MM-DD. Matches ^\d{4}-\d{2}-\d{2}$.
endDatestringRequired. The last departure date to price, YYYY-MM-DD, at most 180 days after startDate. Matches ^\d{4}-\d{2}-\d{2}$.
tripDaysinteger | nullFor a round trip, the days between departure and return; each row then prices a date pair. Omit for one way. From 0 to 180.
adultsintegerAdult passengers. Defaults to 1. From 1 to 9.
childrenintegerChild passengers, aged 2 to 11. From 0 to 9.
infantsInSeatintegerInfants under 2 with their own seat. From 0 to 9.
infantsOnLapintegerInfants under 2 on an adult's lap, at most one per adult. From 0 to 9.
cabineconomy premiumEconomy business firsteconomy, premiumEconomy, business or first. Defaults to economy.
maxStopsinteger | nullThe most stops an itinerary may make on each way: 0 for nonstop only, 1 or 2. Omit for any number. From 0 to 2.
countrystringThe country to search from, ISO 3166-1 alpha-2, which sets the point of sale prices are quoted for. Defaults to US. Matches ^[A-Za-z]{2}$.
currencystringThe currency of prices, ISO 4217 such as USD or EUR. Defaults to USD. Matches ^[A-Za-z]{3}$.

Output

data is an array of rows, one per result. Each row has:

FieldTypeDescription
departureDatestringYYYY-MM-DD.
returnDatestring | nullYYYY-MM-DD, tripDays after departureDate. Null for one way.
pricenumber | nullThe lowest price for every passenger together on that date or date pair. Null when Google Flights shows none.
currencystring—

Example

curl https://request.usestring.ai/v1/integrations/googleflights/calendar \
  -H "Authorization: Bearer $STRING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "origin": "JFK",
    "destination": "LAX",
    "startDate": "2026-12-01",
    "endDate": "2026-12-31",
    "tripDays": 7
  }'

data starts with these rows:

[
  {
    "departureDate": "2026-12-01",
    "returnDate": "2026-12-08",
    "price": 357,
    "currency": "USD"
  },
  {
    "departureDate": "2026-12-02",
    "returnDate": "2026-12-09",
    "price": 357,
    "currency": "USD"
  },
  {
    "departureDate": "2026-12-03",
    "returnDate": "2026-12-10",
    "price": 409,
    "currency": "USD"
  }
]

Requests and billing

  • Requests: 1–18 Web Access requests per result page.
  • Billing: passthrough. Each request the action makes bills at its own rate on your plan; there is no separate charge for the action. See Pricing.

booking-options

List where and at which fares an itinerary can be booked, as Google Flights' booking page does: each seller, fare family and price, the flights it covers, and the request that leads to the seller's booking page. Pass the selectionToken of a one-way search row or of a return-flights row.

POST https://request.usestring.ai/v1/integrations/googleflights/booking-options

Input

Unknown fields are rejected.

FieldTypeDescription
selectionTokenstringRequired. A row's selectionToken. At least 1 character.

Output

data is an array of rows, one per result. Each row has:

FieldTypeDescription
sellerstringWho sells the fare: the airline, or an online travel agency.
sellerIsAirlinebooleanWhether the seller is the airline that markets the flights.
fareNamestring | nullThe fare family, such as Delta Main Basic.
pricenumber | nullThe fare for every passenger together: the round trip's total for a round trip. Null when Google Flights shows none.
currencystring—
flightNumbersstring[]Every flight the fare covers, both ways for a round trip.
bookingDomainstring | nullThe seller's site the booking link leads to, such as www.delta.com.
bookingRequestobject | nullThe request Google Flights' Continue button sends, which redirects to the seller's booking page.
bookingRequest.urlstring—
bookingRequest.postDatastring—

Example

curl https://request.usestring.ai/v1/integrations/googleflights/booking-options \
  -H "Authorization: Bearer $STRING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "selectionToken": "eyJxIjp7Im9yaWdpbiI6IlNGTyIsImRlc3RpbmF0aW9uIjoiU0VBIiwiZGVwYXJ0dXJlRGF0ZSI6IjIwMjYtMTEtMjAiLCJyZXR1cm5EYXRlIjoiMjAyNi0xMS0yNCIsImFkdWx0cyI6MiwibWF4U3RvcHMiOjAsImN1cnJlbmN5IjoiRVVSIn0sInMiOltbeyJmIjoiU0ZPIiwiZCI6IjIwMjYtMTEtMjAiLCJ0IjoiU0VBIiwiYyI6IlVBIiwibiI6IjQ5NCJ9XSxbeyJmIjoiU0VBIiwiZCI6IjIwMjYtMTEtMjQiLCJ0IjoiU0ZPIiwiYyI6IkRMIiwibiI6IjMwMzQifV1dLCJ0IjoiQ2pSSWJFZHlSR3RTZEZoaU5VMUJVV2xHUVZGQ1J5MHRMUzB0TFMxMmRHaDRNeTF1TWtGQlFVRkJSM0pNTlZkalJGSnlkbE5CRWdaRVRETXdNelFhQ3dpSnpBSVFBaG9EUlZWU09CeHc4Zk1DIn0"
  }'

data starts with these rows:

[
  {
    "seller": "United, Delta",
    "sellerIsAirline": true,
    "fareName": null,
    "price": 423,
    "currency": "EUR",
    "flightNumbers": ["UA 494", "DL 3034"],
    "bookingDomain": null,
    "bookingRequest": null
  }
]

Requests and billing

  • Requests: 1–3 Web Access requests per result page.
  • Billing: passthrough. Each request the action makes bills at its own rate on your plan; there is no separate charge for the action. See Pricing.