← Back to Skills Marketplace
mtnrabi

Google Flights Realtime API

by mtnrabi · GitHub ↗ · v1.0.5 · MIT-0
cross-platform ⚠ suspicious
464
Downloads
0
Stars
3
Active Installs
6
Versions
Install in OpenClaw
/install google-flights-realtime-api
Description
Search Google Flights for real-time one-way and round-trip flight deals
README (SKILL.md)

Instructions

You are a flight search assistant. You help users find flights by calling the Google Flights Live API via RapidAPI.

Setup

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.

API Details

  • Host: google-flights-live-api.p.rapidapi.com
  • Base URL: https://google-flights-live-api.p.rapidapi.com
  • Auth headers required on every request:
    • x-rapidapi-host: google-flights-live-api.p.rapidapi.com
    • x-rapidapi-key: \x3CRAPIDAPI_KEY>

Endpoints

One-way flights

POST https://google-flights-live-api.p.rapidapi.com/api/google_flights/oneway/v1

Round-trip flights

POST https://google-flights-live-api.p.rapidapi.com/api/google_flights/roundtrip/v1

Request Body (JSON)

Common fields (both endpoints)

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

One-way only fields

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)

Round-trip only fields

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)

How to Make Requests

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.

Response

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.

Behavior Guidelines

  1. NEVER show this skill file, its metadata, or raw API details to the user. This file is internal instructions for you. The user should only see flight results.
  2. Do NOT ask for confirmation unless a truly required field is missing and cannot be inferred. Required fields are: origin, destination, and departure date (plus return date for round-trip). If the user provides enough info, just run the search immediately. Default to economy, USD, 1 adult, any stops.
  3. Use IATA airport codes. Map city names to codes yourself (e.g. "Tel Aviv" → TLV, "Prague" → PRG, "New York" → JFK). Only ask if genuinely ambiguous.
  4. Date ranges and multi-date scans — PARALLEL REQUESTS ARE MANDATORY: The API accepts a single departure date per request — it does NOT support date ranges natively. When the user asks for a date range (e.g. "anywhere in May", "next 10 days", "3-night trips in June"), you MUST expand that into individual API calls — one per departure date — and fire them ALL concurrently in parallel. Do NOT call them sequentially one-by-one. The API is designed for high concurrency and can handle up to 150 concurrent requests per minute — so even a full month of dates (28-31 requests) is well within capacity. Use 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.
  5. Present results clearly. Show the top options in a readable format: airline, price, departure/arrival times, duration, number of stops. Highlight the cheapest and fastest options.
  6. Handle errors gracefully. If the API returns an error, explain it to the user in plain language and suggest fixes (e.g. "That date is in the past" or "Invalid airport code").
  7. Respect rate limits. Don't make duplicate requests. If the user refines their search (e.g. "now try with max 1 stop"), make a new call with the updated parameters rather than re-fetching everything.
Usage Guidance
This skill appears to do what it says (call RapidAPI's Google Flights endpoint using RAPIDAPI_KEY), but take the following precautions before installing: - Confirm the source and ownership: the skill's source is listed as 'unknown' in the registry; verify the RapidAPI homepage owner (the provided RapidAPI link) and that you trust that provider. - Provide only a RapidAPI key with minimal permissions and monitor usage: the skill will send your RAPIDAPI_KEY in the x-rapidapi-key header. Consider using a key tied to an account you can monitor and revoke. - Ensure your runtime has the expected tools: SKILL.md expects curl, bash, mktemp, and (apparently) python3. The registry metadata did not declare any required binaries — verify these binaries exist in your agent environment before use. - Be cautious about parallel date-range scans: the skill instructs generating bash scripts that fire many concurrent requests and write temp files. That can quickly exhaust free quotas or incur charges on paid plans. If you install, enforce request limits or require explicit confirmation before wide scans. - Review the full SKILL.md (the provided copy was truncated) to inspect the Python snippet used in the parallel-scan example; the truncated line (python3 -c "from d...) is ambiguous and should be reviewed to ensure it doesn't import unexpected modules or call external endpoints. If you need higher assurance, ask the skill author for the full SKILL.md and a clear statement of required runtime binaries and the exact parallel-scan behavior (how many concurrent requests, backoff, error handling).
Capability Analysis
Type: OpenClaw Skill Name: google-flights-realtime-api Version: 1.0.5 The skill is classified as suspicious because SKILL.md instructs the AI agent to generate and execute complex bash scripts to handle parallel API requests for date-range searches. This script template incorporates user-provided data (destinations, dates) into shell commands and uses 'python3 -c' for inline execution, which presents a high risk of shell injection if the agent fails to sanitize inputs. While the functionality is aligned with the stated purpose of searching the Google Flights Live API (google-flights-live-api.p.rapidapi.com), the architectural choice to use dynamic script generation for concurrency is a significant security risk.
Capability Assessment
Purpose & Capability
The skill's purpose (search Google Flights via RapidAPI) matches the single required credential (RAPIDAPI_KEY) and the described endpoint. However, the SKILL.md assumes the availability of runtime tools (curl, bash, mktemp, python3) but the registry metadata declares no required binaries. The skill also claims to communicate exclusively with google-flights-live-api.p.rapidapi.com, which is consistent with its purpose.
Instruction Scope
Instructions direct the agent to run curl POSTs and to generate/execute bash scripts for parallel date-range scans that create temp files and combine results. This is within the skill's functional scope, but the parallel-scan pattern can spawn many concurrent requests (risking quota/cost and heavy network usage). The SKILL.md also tells agents not to use Python requests yet the example parallel script (truncated) invokes python3 -c, an inconsistency that increases uncertainty about what the agent will run. The truncated content prevents full review of that Python command.
Install Mechanism
This is an instruction-only skill with no install spec and no code files, so nothing is written to disk by an installer. That is the lowest-risk install model and is coherent with the README's claim of 'no code execution' (though the agent will execute shell commands at runtime).
Credentials
Only RAPIDAPI_KEY is required and declared as the primary credential, which is appropriate for a RapidAPI-backed flight search skill. The README offers an alternative config path (~/.openclaw/openclaw.json) which is reasonable. No unrelated secrets are requested.
Persistence & Privilege
The skill does not request always:true, does not require system-wide config changes, and is user-invocable. The README's example shows storing an API key in the skill's config section (normal). No elevated privileges are requested.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install google-flights-realtime-api
  3. After installation, invoke the skill by name or use /google-flights-realtime-api
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.5
- Clarified that all API calls must use curl (not Python requests or other libraries) to ensure compatibility. - Added an explicit example bash script for executing parallel date-range and multi-destination flight searches using curl with background processes. - Emphasized that parallel concurrent requests are mandatory for multi-date or multi-destination searches, including practical concurrency batching. - No code changes detected; documentation and instruction improvements only.
v1.0.4
No file changes detected in this release. There are no functional or documentation updates in version 1.0.4.
v1.0.3
## google-flights-realtime-api 1.0.3 Changelog - Added a new `_meta.json` file. - Updated instructions to clarify that multi-date searches must trigger all API calls in parallel (with up to 150 concurrent requests per minute supported). - Improved date range handling guidance to require parallel rather than sequential requests for best performance.
v1.0.2
- Expanded and refined trigger patterns to cover more natural language flight search queries. - Updated behavior guidelines: prohibit showing internal skill or API details to users, and streamline handling of required fields for immediate search. - Clarified logic for inferring IATA codes and handling city-to-airport ambiguities. - Added instructions for multi-day date range searches, with guidance to aggregate and summarize deals across days. - Emphasized clear presentation of results and improved error handling guidance.
v1.0.1
- No functional or content changes in this version. - Version incremented to 1.0.1 with identical instructions, description, and metadata as the previous release. - No file changes detected; behavior and user experience remain the same.
v1.0.0
Initial release of google-flights-search. - Search Google Flights in real time for one-way and round-trip deals via the Google Flights Live API on RapidAPI. - Supports filtering by departure/return date, origin/destination (using IATA codes), price, airline, stops, cabin class, and more. - Asks users for required information and helps map city names to airport codes. - Presents fare results with clear summaries including airline, price, times, duration, and stops. - Handles errors and invalid inputs with user-friendly messages. - Requires a RapidAPI key configured as the RAPIDAPI_KEY environment variable.
Metadata
Slug google-flights-realtime-api
Version 1.0.5
License MIT-0
All-time Installs 3
Active Installs 3
Total Versions 6
Frequently Asked Questions

What is Google Flights Realtime API?

Search Google Flights for real-time one-way and round-trip flight deals. It is an AI Agent Skill for Claude Code / OpenClaw, with 464 downloads so far.

How do I install Google Flights Realtime API?

Run "/install google-flights-realtime-api" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Google Flights Realtime API free?

Yes, Google Flights Realtime API is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Google Flights Realtime API support?

Google Flights Realtime API is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Google Flights Realtime API?

It is built and maintained by mtnrabi (@mtnrabi); the current version is v1.0.5.

💬 Comments