Google Flights · Search flights
flights-google-com/flights/search_flightsGet places and reviews from maps with Google Flights · Search flights from Alexandria through one Spiral API key. Search Google Flights one-way fares or round-trip outbound options. For matching returns, call again with a chosen selection in selected_outbound. Round-trip outbound prices are starting prices; return prices cover the selected pair. It runs in the background and returns structured JSON. Pay as you go, with no subscription.
Pricing
$0.00873 per call.
Limits
- Runs
- In the background
- Returns
- json
- Longest queue wait
- 1 hour
- Run deadline
- 5 minutes
- Longest run, end to end
- 225 minutes
- Largest inline input
- 1 MB
- Largest input file
- 2 GB
- Largest output
- 5 GB
Input
| Field | Kind | Default | Description |
|---|---|---|---|
origin required | text | — | Airport IATA code or Google city id returned by suggest_places. Pattern: ^(?:[A-Z]{3}|/(?:m|g)/[A-Za-z0-9_]{1,60})$. |
destination required | text | — | Airport IATA code or Google city id returned by suggest_places. Pattern: ^(?:[A-Z]{3}|/(?:m|g)/[A-Za-z0-9_]{1,60})$. |
limit | number 1 to 50 | 10 | Maximum rows from Google’s first results page, in its ranked order. Not pagination. |
adults | number 1 to 9 | 1 | adults |
market | text | US | Display/sales market; does not change the proxy country. Pattern: ^[A-Z]{2}$. |
airlines | list | — | Google's Airlines filter, applied to every direction: 2-character IATA airline codes (SK, BA) and/or alliances STAR_ALLIANCE, ONEWORLD, SKYTEAM. Google keeps itineraries where a listed airline or alliance member markets or codeshares a segment, so a row can include a partner-operated segment under another airline code (an SK search can list a Delta-marketed EWR-BOS feeder sold as SK). Unknown codes make Google return an error response. |
children | number 0 to 8 | 0 | At most 9 passengers total, including infants. |
currency | text | USD | Pattern: ^[A-Z]{3}$. |
max_stops | number | — | max_stops |
cabin_class | one of economy, premium_economy, business, first | economy | cabin_class |
return_date | text | — | return_date |
checked_bags | number 0 to 1 | 0 | Checked bags to add to every quoted fare through Google's Bags filter (0 or 1; Google clamps larger counts). Google reprices only fares whose allowance it knows (US domestic and similar); international fares keep their unchanged price and a null checked allowance. With several passengers it applies the filter once and stops stating per-fare inclusions. See price_with_requested_bags. |
carry_on_bags | number 0 to 1 | 0 | Carry-on bags to add to every quoted fare through Google's Bags filter (0 or 1; Google clamps larger counts). Google reprices only fares whose allowance it knows (US domestic and similar); international fares keep their unchanged price and a null checked allowance. With several passengers it applies the filter once and stops stating per-fare inclusions. See price_with_requested_bags. |
departure_date | text | — | departure_date |
infants_on_lap | number 0 to 8 | 0 | Infants under 2 on an adult’s lap (Google passenger type 4). At most one per adult; counts toward the 9-passenger limit. |
infants_in_seat | number 0 to 8 | 0 | Infants under 2 in their own seat (Google passenger type 3). Counts toward the 9-passenger limit. |
selected_outbound | JSON | — | For return options, copy a flight’s selection array from the outbound search and keep the original trip parameters. Requires return_date. No session/cursor token. |
connecting_airports | JSON | — | Google's Connecting airports filter, applied to every direction. An airport may not be in both lists. Unknown codes make Google return an error response. |
Same request in code
curl https://api.spiral.ai/v1/runs \
-H "Authorization: Bearer $SPIRAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"provider": "alexandria",
"model": "flights-google-com/flights/search_flights",
"input": {
"origin": "<origin>",
"destination": "<destination>"
}
}'Frequently asked questions
How much does Google Flights · Search flights cost?
$0.00873 per call. You pay as you go from one Spiral balance, with no subscription, and a failed run is not charged.
How do I use Google Flights · Search flights through an API?
Send `POST /v1/runs` with `"provider": "alexandria"`, `"model": "flights-google-com/flights/search_flights"` and the input fields on this page, using one Spiral API key. It runs in the background: poll the run, or name a webhook to be told when it finishes.
Do I need an account with Alexandria to use Google Flights · Search flights?
No. Spiral runs it on its own Alexandria account and charges your Spiral balance.
Can my AI agent use Google Flights · Search flights?
Yes. Agents find and run it through Spiral's MCP server, CLI or agent skill, with the same API key.