80trust / 100

Google Flights Booking

by StableTravel in Weather & location

x402 APIPassing, checked 37 min ago

Get booking options for a specific flight. Requires a departure_token from a search result.

GET https://stabletravel.dev/api/google-flights/booking

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
218 ms typical, 310 ms slowest 5%
Last check
37 min ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://stabletravel.dev/api/google-flights/booking?adults=1&arrival_id=LAX&children=0&currency=USD&departure_id=JFK&departure_token=token-abc123&hl=en&infants_in_seat=0&infants_on_lap=0&outbound_date=2026-12-01&return_date=2026-12-08&type=1"
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fstabletravel.dev%2Fapi%2Fgoogle-flights%2Fbooking
const res = await pay("https://stabletravel.dev/api/google-flights/booking?adults=1&arrival_id=LAX&children=0&currency=USD&departure_id=JFK&departure_token=token-abc123&hl=en&infants_in_seat=0&infants_on_lap=0&outbound_date=2026-12-01&return_date=2026-12-08&type=1");
console.log(await res.json());

Example input

{
  "adults": 1,
  "arrival_id": "LAX",
  "children": 0,
  "currency": "USD",
  "departure_id": "JFK",
  "departure_token": "token-abc123",
  "hl": "en",
  "infants_in_seat": 0,
  "infants_on_lap": 0,
  "outbound_date": "2026-12-01",
  "return_date": "2026-12-08",
  "type": "1"
}

Example output

{
  "booking_options": [
    {
      "book_with": "American Airlines",
      "option_title": "Book with American Airlines",
      "price": 350,
      "url": "https://www.aa.com/booking"
    }
  ],
  "selected_flights": [
    {
      "flights": [
        {
          "airline": "American",
          "arrival_airport": {
            "id": "LAX",
            "name": "LAX",
            "time": "2026-12-01 11:00"
          },
          "departure_airport": {
            "id": "JFK",
            "name": "JFK",
            "time": "2026-12-01 08:00"
          },
          "duration": 360,
          "flight_number": "AA 100"
        }
      ],
      "price": 350,
      "total_duration": 360
    }
  ]
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
37 min agoPassed402410 ms$0.02
4 h agoPassed402153 ms$0.02
8 h agoPassed402237 ms$0.02
11 h agoPassed402198 ms$0.02
16 h agoPassed402297 ms$0.02
19 h agoPassed402165 ms$0.02
22 h agoPassed402218 ms$0.02
27 h agoPassed402310 ms$0.02