Install
openclaw skills install google-flights-realtime-apiSearch Google Flights for real-time one-way and round-trip flight deals
openclaw skills install google-flights-realtime-apiYou are a flight search assistant. You help users find flights by calling the Google Flights Live API via RapidAPI.
The user must have a RapidAPI key with a subscription to the Google Flights Live API. Get one at: https://rapidapi.com/mtnrabi/api/google-flights-live-api
The key should be configured as the RAPIDAPI_KEY environment variable.
google-flights-live-api.p.rapidapi.comhttps://google-flights-live-api.p.rapidapi.comx-rapidapi-host: google-flights-live-api.p.rapidapi.comx-rapidapi-key: <RAPIDAPI_KEY>POST https://google-flights-live-api.p.rapidapi.com/api/google_flights/oneway/v1
POST https://google-flights-live-api.p.rapidapi.com/api/google_flights/roundtrip/v1
| Field | Type | Required | Description |
|---|---|---|---|
departure_date | string | Yes | Departure date in YYYY-MM-DD format |
from_airport | string | Yes | Departure airport IATA code (e.g. JFK, TLV, LAX) |
to_airport | string | Yes | Destination airport IATA code |
currency | string | No | Currency code, default usd |
max_price | integer | No | Maximum price filter |
seat_type | integer | No | 1 = Economy, 3 = Business |
passengers | int[] | No | Passenger age codes |
| Field | Type | Description |
|---|---|---|
max_stops | integer | Maximum number of stops |
airline_codes | string[] | Include only these airline IATA codes |
exclude_airline_codes | string[] | Exclude these airline IATA codes |
departure_time_min | integer | Earliest departure hour (0-23) |
departure_time_max | integer | Latest departure hour (0-23) |
arrival_time_min | integer | Earliest arrival hour (0-23) |
arrival_time_max | integer | Latest arrival hour (0-23) |
| Field | Type | Description |
|---|---|---|
return_date | string | Return date in YYYY-MM-DD format (required for round-trip) |
max_departure_stops | integer | Max stops on outbound leg |
max_return_stops | integer | Max stops on return leg |
departure_airline_codes | string[] | Include only these airlines on outbound |
departure_exclude_airline_codes | string[] | Exclude these airlines on outbound |
return_airline_codes | string[] | Include only these airlines on return |
return_exclude_airline_codes | string[] | Exclude these airlines on return |
departure_departure_time_min | integer | Outbound earliest departure hour (0-23) |
departure_departure_time_max | integer | Outbound latest departure hour (0-23) |
departure_arrival_time_min | integer | Outbound earliest arrival hour (0-23) |
departure_arrival_time_max | integer | Outbound latest arrival hour (0-23) |
return_departure_time_min | integer | Return earliest departure hour (0-23) |
return_departure_time_max | integer | Return latest departure hour (0-23) |
return_arrival_time_min | integer | Return earliest arrival hour (0-23) |
return_arrival_time_max | integer | Return latest arrival hour (0-23) |
IMPORTANT: Always use curl to call the API. Do NOT use Python requests or any other library that may not be installed. curl is always available and is the preferred method. Always include both RapidAPI headers.
Example one-way search:
curl -X POST "https://google-flights-live-api.p.rapidapi.com/api/google_flights/oneway/v1" \
-H "Content-Type: application/json" \
-H "x-rapidapi-host: google-flights-live-api.p.rapidapi.com" \
-H "x-rapidapi-key: $RAPIDAPI_KEY" \
-d '{
"departure_date": "2026-04-15",
"from_airport": "JFK",
"to_airport": "TLV",
"max_stops": 1,
"currency": "usd"
}'
Example round-trip search:
curl -X POST "https://google-flights-live-api.p.rapidapi.com/api/google_flights/roundtrip/v1" \
-H "Content-Type: application/json" \
-H "x-rapidapi-host: google-flights-live-api.p.rapidapi.com" \
-H "x-rapidapi-key: $RAPIDAPI_KEY" \
-d '{
"departure_date": "2026-04-15",
"return_date": "2026-04-22",
"from_airport": "JFK",
"to_airport": "TLV",
"currency": "usd"
}'
Example parallel date-range scan (MUST use this pattern for date ranges):
When the user asks for a date range, generate a bash script that fires all curl requests in parallel using background processes. Write each response to a temp file, then combine.
#!/bin/bash
TMPDIR=$(mktemp -d)
# Expand ALL dimensions from the user's request:
NIGHTS=(3 4 5) # e.g. "3-5 night trips" → 3, 4, 5
DESTINATIONS=("CDG" "PRG") # e.g. "Paris or Prague" → CDG, PRG
DATES=("2026-05-01" "2026-05-02" "2026-05-03") # expand to all dates in range
for DEST in "${DESTINATIONS[@]}"; do
for N in "${NIGHTS[@]}"; do
for DATE in "${DATES[@]}"; do
RETURN=$(python3 -c "from datetime import datetime,timedelta; print((datetime.strptime('$DATE','%Y-%m-%d')+timedelta(days=$N)).strftime('%Y-%m-%d'))")
curl -s -X POST "https://google-flights-live-api.p.rapidapi.com/api/google_flights/roundtrip/v1" \
-H "Content-Type: application/json" \
-H "x-rapidapi-host: google-flights-live-api.p.rapidapi.com" \
-H "x-rapidapi-key: $RAPIDAPI_KEY" \
-d "{\"departure_date\": \"$DATE\", \"return_date\": \"$RETURN\", \"from_airport\": \"TLV\", \"to_airport\": \"$DEST\", \"currency\": \"usd\"}" \
-o "$TMPDIR/${DEST}_${N}n_${DATE}.json" &
done
done
done
wait
cat "$TMPDIR"/*.json | jq -s 'flatten'
rm -rf "$TMPDIR"
This fires ALL combinations concurrently. For example, "3-5 nights from TLV to Paris or Prague anywhere in May" = 31 dates × 3 night options × 2 destinations = 186 requests — all in parallel. The API handles up to 150 concurrent requests per minute, so batch into groups of ~100 with a short sleep between batches if the total exceeds 150.
The API returns a JSON array of flight results sorted by best overall value. Each flight includes airline, price, duration, stops, departure/arrival times, and booking details.
TLV, "Prague" → PRG, "New York" → JFK). Only ask if genuinely ambiguous.Promise.all, concurrent tool calls, or whatever parallelism mechanism is available to you. After all responses return, combine and summarize the results: show the best deals across all dates, and highlight which departure date offers the cheapest/best option.