API Hop Docs
Google Flights endpoint reference
Search flights, airport suggestions and flight deals on Google Flights.
Concurrency limit
AI and Data each share an account-wide pool of concurrent slots: 5 AI / 2 Data by default, adjusted by your subscription. Endpoint overrides still cannot exceed the category pool. Reaching either limit returns HTTP 429. Asynchronous tasks occupy a slot until execution ends.
GET /v1/google-flights/search GET /v1/google-flights/autocomplete GET /v1/google-flights/deals Search flights, airport suggestions and flight deals on Google Flights.
Authentication and billing
The default price is $0.0003 (300 credits) per successful request. Use your API Hop API key. Availability depends on active gateways and key permissions. Check the current catalog and your account for the price per successful request; account-specific pricing takes precedence. Successful empty results are billable. Failed requests release the credit reservation. Requests time out after 60 seconds, with no automatic retry or pagination. Settlement failures never repeat the upstream request.
Authorization: Bearer YOUR_API_KEYGoogle Flights: Search flights
GET https://api.apihop.ai/v1/google-flights/search
Request parameters
| Field | Type | Constraints | Example |
|---|---|---|---|
departure_id | string | One or more comma-separated IATA airport or Google travel city IDs. Use flight autocomplete to resolve identifiers.; departure_id: optional; ^(?:[A-Z]{3}|/[mg]/[A-Za-z0-9_]+)(?:,(?:[A-Z]{3}|/[mg]/[A-Za-z0-9_]+))*$ | JFK |
arrival_id | string | One or more comma-separated IATA airport or Google travel city IDs. Use flight autocomplete to resolve identifiers.; arrival_id: optional; ^(?:[A-Z]{3}|/[mg]/[A-Za-z0-9_]+)(?:,(?:[A-Z]{3}|/[mg]/[A-Za-z0-9_]+))*$ | LAX |
outbound_date | string | Departure date in YYYY-MM-DD format.; outbound_date: optional; ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ | 2026-12-12 |
return_date | string | Return date in YYYY-MM-DD format; omit for a one-way trip.; return_date: optional; ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ | - |
adults | integer | Number of adult travelers, from 1 to 9.; adults: optional; min: 1; max: 9 | 1 |
children | integer | Number of children aged 2–11. At most nine travelers total.; children: optional; min: 0; max: 8 | 0 |
infants_in_seat | integer | Number of infants under 2 traveling in their own seats. At most nine travelers total.; infants_in_seat: optional; min: 0; max: 8 | 0 |
infants_on_lap | integer | Number of infants under 2 traveling on an adult’s lap; cannot exceed adults. At most nine travelers total.; infants_on_lap: optional; min: 0; max: 8 | 0 |
travel_class | string | Cabin class supported by the selected flight operation.; travel_class: optional; economy, premium_economy, business, first | economy |
sort_by | string | Sort by overall quality, price, departure time, arrival time, duration, or emissions.; sort_by: optional; top_flights, price, departure_time, arrival_time, duration, emissions | top_flights |
stops | integer | 0: any stops; 1: nonstop; 2: at most one stop; 3: at most two stops.; stops: optional; min: 0; max: 3 | 0 |
include_airlines | string | Comma-separated IATA airline codes or STAR_ALLIANCE, SKYTEAM, ONEWORLD.; include_airlines: optional; UTF-8 bytes: 1000; ^(?:[A-Z][A-Z0-9]|[0-9][A-Z]|STAR_ALLIANCE|SKYTEAM|ONEWORLD)(?:,(?:[A-Z][A-Z0-9]|[0-9][A-Z]|STAR_ALLIANCE|SKYTEAM|ONEWORLD))*$ | - |
exclude_airlines | string | Exclude comma-separated IATA airline codes or alliances.; exclude_airlines: optional; UTF-8 bytes: 1000; ^(?:[A-Z][A-Z0-9]|[0-9][A-Z]|STAR_ALLIANCE|SKYTEAM|ONEWORLD)(?:,(?:[A-Z][A-Z0-9]|[0-9][A-Z]|STAR_ALLIANCE|SKYTEAM|ONEWORLD))*$ | - |
bags | integer | Carry-on bags; cannot exceed adults, children and seated infants combined.; bags: optional; min: 0; max: 9 | 0 |
max_price | integer | Maximum total fare in the requested currency.; max_price: optional; min: 1; max: 2147483647 | 1 |
outbound_times | string | Two or four hours, 0..23: earliest/latest departure, optionally earliest/latest arrival. Latest hours include their entire hour.; outbound_times: optional; UTF-8 bytes: 11; ^(?:[0-9]|1[0-9]|2[0-3])(?:,(?:[0-9]|1[0-9]|2[0-3])){1,3}$ | - |
return_times | string | Round-trip return departure/arrival hour ranges, in the same format as outbound_times.; return_times: optional; UTF-8 bytes: 11; ^(?:[0-9]|1[0-9]|2[0-3])(?:,(?:[0-9]|1[0-9]|2[0-3])){1,3}$ | - |
emissions | integer | 1 restricts results to flights with lower emissions.; emissions: optional; 1 | 1 |
exclude_conns | string | Comma-separated IATA connecting airports to exclude.; exclude_conns: optional; UTF-8 bytes: 1000; ^[A-Z]{3}(?:,[A-Z]{3})*$ | - |
max_duration | integer | Maximum flight duration in minutes.; max_duration: optional; min: 1; max: 2147483647 | 1 |
show_hidden | boolean | Include additional flights normally hidden behind View more flights.; show_hidden: optional | true |
exclude_basic | boolean | Exclude basic economy fares. Requires US localization and economy class; supported for domestic US travel.; exclude_basic: optional | true |
type | integer | 1: round trip; 2: one way; 3: multi-city. If omitted, return_date selects a round trip; otherwise one way. Response metadata uses trip_type; metadata type retains the operation kind.; type: optional; 1, 2, 3 | 1 |
multi_city_json | string | JSON array of two through five legs with departure_id, arrival_id, date (YYYY-MM-DD), and optional times. Requires type 3.; multi_city_json: optional; UTF-8 bytes: 16384 | - |
layover_duration | string | Minimum and maximum layover duration in minutes, comma-separated and ordered.; layover_duration: optional; UTF-8 bytes: 21; ^[0-9]{1,10},[0-9]{1,10}$ | - |
selected_flights_json | string | JSON object containing ordered outbound flight segments and return segments for round trips. Each segment has flight_number, departure_id, arrival_id, date. Top-level airports and dates are optional; if provided they must match the segments. Returns selected itineraries and booking options.; selected_flights_json: optional; UTF-8 bytes: 16384 | - |
departure_token | string | Select an itinerary and retrieve the next leg. Use the token returned in results and repeat the original search parameters.; departure_token: optional; UTF-8 bytes: 32768 | - |
booking_token | string | Retrieve booking options for the complete selection. Use the token returned in results and repeat the original search parameters.; booking_token: optional; UTF-8 bytes: 32768 | - |
deep_search | boolean | Compatibility control for full browser-equivalent search. This API already uses the complete streaming search for both true and false.; deep_search: optional | true |
currency | string | Three-letter currency code, such as USD.; currency: optional; ALL, DZD, ARS, AMD, AWG, AUD, AZN, BSD, BHD, BYN, BMD, BAM, BRL, GBP, BGN, XPF, CAD, CLP, CNY, COP, CRC, CUP, CZK, DKK, DOP, EGP, EUR, GEL, HKD, HUF, ISK, INR, IDR, IRR, ILS, JMD, JPY, JOD, KZT, KWD, LBP, MKD, MYR, MXN, MDL, MAD, TWD, NZD, NOK, OMR, PKR, PAB, PEN, PHP, PLN, QAR, RON, RUB, SAR, RSD, SGD, ZAR, KRW, SEK, CHF, THB, TRY, USD, UAH, AED, VND; ^[A-Z]{3}$ | USD |
country | string | Two-letter country or storefront code, such as us or gb.; country: optional; ^[A-Za-z]{2}$ | - |
language | string | Provider-supported language code, such as en.; language: optional | - |
limit | integer | Maximum number of items to return. The provider may return fewer.; limit: optional; min: 1; max: 100 | 1 |
device | string | Device presentation for the source request.; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | Do not archive source or parsed response artifacts.; zero_trace: optional | true |
Validation rules
Send query parameters only, without a request body. Unknown, repeated, empty or invalid values are rejected. Only JSON responses are supported. No automatic pagination or retry is performed. The rules below use AND, OR, XOR (exactly one), NOT and => (requires).
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedstring: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integerlanguage: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/adults (default 1) + children + infants_in_seat + infants_on_lap <= 9; infants_on_lap <= adultsbags <= adults + children + infants_in_seatdeparture_id AND arrival_id AND outbound_date: required unless selected_flights_json OR multi_city_json supplies the itineraryDates: valid YYYY-MM-DD; return_date >= outbound_date; type = 1 requires return_date; type = 2 excludes return_date; type = 3 requires multi_city_jsonmulti_city_json: JSON array of 2..5 ordered legs with departure_id, arrival_id, date and optional timesselected_flights_json: native JSON object of outbound flight segments and optional return segments; each segment has flight_number, departure_id, arrival_id, date; the data service validates the segment structureNOT (departure_token AND booking_token); tokens require original itinerary parametersoutbound_times, return_times: 2 OR 4 hours (0..23); layover_duration: ordered min,max minutesexclude_basic = true => country = us (default) AND travel_class = economy (default)Tokens: copy the exact token from a fresh response; do not invent or reuse expired tokens; each page or token lookup is a separate billable successful request
Examples
curl --get "https://api.apihop.ai/v1/google-flights/search" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "arrival_id=LAX" \
--data-urlencode "currency=USD" \
--data-urlencode "departure_id=JFK" \
--data-urlencode "outbound_date=2026-12-12"Google Flights: Get airport suggestions
GET https://api.apihop.ai/v1/google-flights/autocomplete
Request parameters
| Field | Type | Constraints | Example |
|---|---|---|---|
query | string | Text to search for on the selected service. At most 8,192 UTF-8 bytes.; query: REQUIRED | New York |
country | string | Two-letter country or storefront code, such as us or gb.; country: optional; ^[A-Za-z]{2}$ | - |
language | string | Provider-supported language code, such as en.; language: optional | - |
limit | integer | Maximum number of items to return. The provider may return fewer.; limit: optional; min: 1; max: 100 | 1 |
device | string | Device presentation for the source request.; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | Do not archive source or parsed response artifacts.; zero_trace: optional | true |
exclude_regions | boolean | Exclude region suggestions such as countries and multi-country areas. Defaults to false.; exclude_regions: optional | true |
Validation rules
Send query parameters only, without a request body. Unknown, repeated, empty or invalid values are rejected. Only JSON responses are supported. No automatic pagination or retry is performed. The rules below use AND, OR, XOR (exactly one), NOT and => (requires).
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedstring: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integerlanguage: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/
Examples
curl --get "https://api.apihop.ai/v1/google-flights/autocomplete" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=New York"Google Flights: Find flight deals
GET https://api.apihop.ai/v1/google-flights/deals
Request parameters
| Field | Type | Constraints | Example |
|---|---|---|---|
query | string | Text to search for on the selected service. At most 8,192 UTF-8 bytes.; query: optional | Week long trip to a city with great food |
departure_id | string | One or more comma-separated IATA airport or Google travel city IDs. Use flight autocomplete to resolve identifiers.; departure_id: REQUIRED; ^(?:[A-Z]{3}|/[mg]/[A-Za-z0-9_]+)(?:,(?:[A-Z]{3}|/[mg]/[A-Za-z0-9_]+))*$ | JFK |
adults | integer | Number of adult travelers, from 1 to 9.; adults: optional; min: 1; max: 9 | 1 |
outbound_date | string | One YYYY-MM-DD date or two ordered, comma-separated dates. Exact round trips require exact departure and return dates; flexible return windows require a flexible departure window.; outbound_date: optional; UTF-8 bytes: 21 | - |
return_date | string | One YYYY-MM-DD date or two ordered, comma-separated dates. Exact round trips require exact departure and return dates; flexible return windows require a flexible departure window.; return_date: optional; UTF-8 bytes: 21 | - |
travel_duration | integer | Flexible round-trip duration: 1 one week (default); 2 weekend; 3 two weeks. Cannot be combined with query or exact dates.; travel_duration: optional; min: 1; max: 3 | 1 |
trip_length | string | Exact trip length in days, or comma-separated minimum and maximum; positive and ordered. Uses flexible departure dates.; trip_length: optional; UTF-8 bytes: 21; ^[0-9]{1,10}(?:,[0-9]{1,10})?$ | - |
children | integer | Number of children aged 2–11. At most nine travelers total.; children: optional; min: 0; max: 8 | 0 |
infants_in_seat | integer | Number of infants under 2 traveling in their own seats. At most nine travelers total.; infants_in_seat: optional; min: 0; max: 8 | 0 |
infants_on_lap | integer | Number of infants under 2 traveling on an adult’s lap; cannot exceed adults. At most nine travelers total.; infants_on_lap: optional; min: 0; max: 8 | 0 |
travel_class | string | Cabin class supported by the selected flight operation.; travel_class: optional; economy, premium_economy, business, first | economy |
type | integer | 1: round trip (default); 2: one way. Response metadata uses trip_type.; type: optional; 1, 2 | 1 |
stops | integer | 0: any stops; 1: nonstop; 2: at most one stop; 3: at most two stops.; stops: optional; min: 0; max: 3 | 0 |
include_airlines | string | Comma-separated IATA airline codes or STAR_ALLIANCE, SKYTEAM, ONEWORLD.; include_airlines: optional; UTF-8 bytes: 1000; ^(?:[A-Z][A-Z0-9]|[0-9][A-Z]|STAR_ALLIANCE|SKYTEAM|ONEWORLD)(?:,(?:[A-Z][A-Z0-9]|[0-9][A-Z]|STAR_ALLIANCE|SKYTEAM|ONEWORLD))*$ | - |
exclude_airlines | string | Exclude comma-separated IATA airline codes or alliances.; exclude_airlines: optional; UTF-8 bytes: 1000; ^(?:[A-Z][A-Z0-9]|[0-9][A-Z]|STAR_ALLIANCE|SKYTEAM|ONEWORLD)(?:,(?:[A-Z][A-Z0-9]|[0-9][A-Z]|STAR_ALLIANCE|SKYTEAM|ONEWORLD))*$ | - |
max_price | integer | Maximum total fare in the requested currency.; max_price: optional; min: 1; max: 2147483647 | 1 |
max_duration | integer | Maximum flight duration in minutes.; max_duration: optional; min: 1; max: 2147483647 | 1 |
currency | string | Three-letter currency code, such as USD.; currency: optional; ALL, DZD, ARS, AMD, AWG, AUD, AZN, BSD, BHD, BYN, BMD, BAM, BRL, GBP, BGN, XPF, CAD, CLP, CNY, COP, CRC, CUP, CZK, DKK, DOP, EGP, EUR, GEL, HKD, HUF, ISK, INR, IDR, IRR, ILS, JMD, JPY, JOD, KZT, KWD, LBP, MKD, MYR, MXN, MDL, MAD, TWD, NZD, NOK, OMR, PKR, PAB, PEN, PHP, PLN, QAR, RON, RUB, SAR, RSD, SGD, ZAR, KRW, SEK, CHF, THB, TRY, USD, UAH, AED, VND; ^[A-Z]{3}$ | ALL |
country | string | Two-letter country or storefront code, such as us or gb.; country: optional; ^[A-Za-z]{2}$ | - |
language | string | Provider-supported language code, such as en.; language: optional | - |
limit | integer | Maximum number of items to return. The provider may return fewer.; limit: optional; min: 1; max: 100 | 10 |
device | string | Device presentation for the source request.; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | Do not archive source or parsed response artifacts.; zero_trace: optional | true |
Validation rules
Send query parameters only, without a request body. Unknown, repeated, empty or invalid values are rejected. Only JSON responses are supported. No automatic pagination or retry is performed. The rules below use AND, OR, XOR (exactly one), NOT and => (requires).
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedstring: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integerlanguage: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/adults (default 1) + children + infants_in_seat + infants_on_lap <= 9; infants_on_lap <= adultsoutbound_date, return_date: valid YYYY-MM-DD or ordered YYYY-MM-DD,YYYY-MM-DD window; return dates cannot precede departure datestype = 2 => NOT return_date; flexible return windows require flexible departure windowstravel_duration: flexible round-trip duration; cannot combine with exact datestrip_length: positive days or ordered min,max; requires flexible departure dates; query => NOT travel_duration
Examples
curl --get "https://api.apihop.ai/v1/google-flights/deals" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "departure_id=JFK" \
--data-urlencode "limit=10" \
--data-urlencode "query=Week long trip to a city with great food"Responses and errors
The native JSON response and numeric precision are preserved. The example below illustrates an empty successful result, not a live call. HTTP 400 means invalid input; 401 authentication required; 402 insufficient credit; 403 unavailable or unauthorized; 405 unsupported method; 429 rate limit; 5xx service or upstream failure. Keep X-Request-Id for diagnosis.
{
"success": true,
"request_id": "example-request",
"data": {
"format": "json",
"content": {
"results": []
}
}
}