Skip to main content
GET
/
v1
/
google
/
flights
/
booking_options
Google Flights booking options for a selected itinerary
curl --request GET \
  --url https://scrapebadger.com/v1/google/flights/booking_options \
  --header 'x-api-key: <api-key>'
import requests

url = "https://scrapebadger.com/v1/google/flights/booking_options"

headers = {"x-api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};

fetch('https://scrapebadger.com/v1/google/flights/booking_options', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://scrapebadger.com/v1/google/flights/booking_options",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://scrapebadger.com/v1/google/flights/booking_options"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-api-key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://scrapebadger.com/v1/google/flights/booking_options")
.header("x-api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://scrapebadger.com/v1/google/flights/booking_options")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "booking_options": [
    {
      "book_with": "<string>",
      "price": 123,
      "currency": "<string>"
    }
  ],
  "booking_url": "<string>",
  "currency": "USD"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}
Pass a selection_token from a Flights Search offer — either a one-way offer, or a round-trip offer returned by the departure_token step (i.e. with both legs selected). Prices include mandatory taxes and fees for the whole party, same as search results. An incomplete round-trip selection (outbound only, no return chosen yet) returns an empty booking_options list — follow that offer’s departure_token first.

Authorizations

x-api-key
string
header
required

Query Parameters

selection_token
string
required

selection_token from a /flights/search offer (one-way or fully-selected itinerary).

currency
string
default:USD

ISO-4217 currency code.

gl
string
default:us

Country code.

hl
string
default:en

Language for the returned booking_url.

Response

Successful Response

Response for GET /api/v1/flights/booking_options.

booking_options
BookingOption · object[]
booking_url
string | null

Google Flights booking page for this selection (the actual per-provider booking links open from here).

currency
string
default:USD