API Hop

Documentation

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
Default limit: 2
GET /v1/google-flights/autocomplete
Default limit: 2
GET /v1/google-flights/deals
Default limit: 2

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.

http
Authorization: Bearer YOUR_API_KEY

Google Flights: Search flights

GET https://api.apihop.ai/v1/google-flights/search

Request parameters

FieldTypeConstraintsExample
departure_idstringOne 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_idstringOne 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_datestringDeparture date in YYYY-MM-DD format.; outbound_date: optional; ^[0-9]{4}-[0-9]{2}-[0-9]{2}$2026-12-12
return_datestringReturn date in YYYY-MM-DD format; omit for a one-way trip.; return_date: optional; ^[0-9]{4}-[0-9]{2}-[0-9]{2}$-
adultsintegerNumber of adult travelers, from 1 to 9.; adults: optional; min: 1; max: 91
childrenintegerNumber of children aged 2–11. At most nine travelers total.; children: optional; min: 0; max: 80
infants_in_seatintegerNumber of infants under 2 traveling in their own seats. At most nine travelers total.; infants_in_seat: optional; min: 0; max: 80
infants_on_lapintegerNumber 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: 80
travel_classstringCabin class supported by the selected flight operation.; travel_class: optional; economy, premium_economy, business, firsteconomy
sort_bystringSort by overall quality, price, departure time, arrival time, duration, or emissions.; sort_by: optional; top_flights, price, departure_time, arrival_time, duration, emissionstop_flights
stopsinteger0: any stops; 1: nonstop; 2: at most one stop; 3: at most two stops.; stops: optional; min: 0; max: 30
include_airlinesstringComma-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_airlinesstringExclude 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))*$-
bagsintegerCarry-on bags; cannot exceed adults, children and seated infants combined.; bags: optional; min: 0; max: 90
max_priceintegerMaximum total fare in the requested currency.; max_price: optional; min: 1; max: 21474836471
outbound_timesstringTwo 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_timesstringRound-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}$-
emissionsinteger1 restricts results to flights with lower emissions.; emissions: optional; 11
exclude_connsstringComma-separated IATA connecting airports to exclude.; exclude_conns: optional; UTF-8 bytes: 1000; ^[A-Z]{3}(?:,[A-Z]{3})*$-
max_durationintegerMaximum flight duration in minutes.; max_duration: optional; min: 1; max: 21474836471
show_hiddenbooleanInclude additional flights normally hidden behind View more flights.; show_hidden: optionaltrue
exclude_basicbooleanExclude basic economy fares. Requires US localization and economy class; supported for domestic US travel.; exclude_basic: optionaltrue
typeinteger1: 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, 31
multi_city_jsonstringJSON 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_durationstringMinimum 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_jsonstringJSON 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_tokenstringSelect 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_tokenstringRetrieve 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_searchbooleanCompatibility control for full browser-equivalent search. This API already uses the complete streaming search for both true and false.; deep_search: optionaltrue
currencystringThree-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
countrystringTwo-letter country or storefront code, such as us or gb.; country: optional; ^[A-Za-z]{2}$-
languagestringProvider-supported language code, such as en.; language: optional-
limitintegerMaximum number of items to return. The provider may return fewer.; limit: optional; min: 1; max: 1001
devicestringDevice presentation for the source request.; device: optional; desktop, mobile, tabletdesktop
zero_tracebooleanDo not archive source or parsed response artifacts.; zero_trace: optionaltrue

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 supported
  • string: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integer
  • language: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/
  • adults (default 1) + children + infants_in_seat + infants_on_lap <= 9; infants_on_lap <= adults
  • bags <= adults + children + infants_in_seat
  • departure_id AND arrival_id AND outbound_date: required unless selected_flights_json OR multi_city_json supplies the itinerary
  • Dates: valid YYYY-MM-DD; return_date >= outbound_date; type = 1 requires return_date; type = 2 excludes return_date; type = 3 requires multi_city_json
  • multi_city_json: JSON array of 2..5 ordered legs with departure_id, arrival_id, date and optional times
  • selected_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 structure
  • NOT (departure_token AND booking_token); tokens require original itinerary parameters
  • outbound_times, return_times: 2 OR 4 hours (0..23); layover_duration: ordered min,max minutes
  • exclude_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

bash
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

FieldTypeConstraintsExample
querystringText to search for on the selected service. At most 8,192 UTF-8 bytes.; query: REQUIREDNew York
countrystringTwo-letter country or storefront code, such as us or gb.; country: optional; ^[A-Za-z]{2}$-
languagestringProvider-supported language code, such as en.; language: optional-
limitintegerMaximum number of items to return. The provider may return fewer.; limit: optional; min: 1; max: 1001
devicestringDevice presentation for the source request.; device: optional; desktop, mobile, tabletdesktop
zero_tracebooleanDo not archive source or parsed response artifacts.; zero_trace: optionaltrue
exclude_regionsbooleanExclude region suggestions such as countries and multi-country areas. Defaults to false.; exclude_regions: optionaltrue

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 supported
  • string: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integer
  • language: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/

Examples

bash
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

FieldTypeConstraintsExample
querystringText to search for on the selected service. At most 8,192 UTF-8 bytes.; query: optionalWeek long trip to a city with great food
departure_idstringOne or more comma-separated IATA airport or Google travel city IDs. Use flight autocomplete to resolve identifiers.; departure_id: REQUIRED; ^(?:[A-Z]{3}&#124;/[mg]/[A-Za-z0-9_]+)(?:,(?:[A-Z]{3}&#124;/[mg]/[A-Za-z0-9_]+))*$JFK
adultsintegerNumber of adult travelers, from 1 to 9.; adults: optional; min: 1; max: 91
outbound_datestringOne 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_datestringOne 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_durationintegerFlexible 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: 31
trip_lengthstringExact 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})?$-
childrenintegerNumber of children aged 2–11. At most nine travelers total.; children: optional; min: 0; max: 80
infants_in_seatintegerNumber of infants under 2 traveling in their own seats. At most nine travelers total.; infants_in_seat: optional; min: 0; max: 80
infants_on_lapintegerNumber 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: 80
travel_classstringCabin class supported by the selected flight operation.; travel_class: optional; economy, premium_economy, business, firsteconomy
typeinteger1: round trip (default); 2: one way. Response metadata uses trip_type.; type: optional; 1, 21
stopsinteger0: any stops; 1: nonstop; 2: at most one stop; 3: at most two stops.; stops: optional; min: 0; max: 30
include_airlinesstringComma-separated IATA airline codes or STAR_ALLIANCE, SKYTEAM, ONEWORLD.; include_airlines: optional; UTF-8 bytes: 1000; ^(?:[A-Z][A-Z0-9]&#124;[0-9][A-Z]&#124;STAR_ALLIANCE&#124;SKYTEAM&#124;ONEWORLD)(?:,(?:[A-Z][A-Z0-9]&#124;[0-9][A-Z]&#124;STAR_ALLIANCE&#124;SKYTEAM&#124;ONEWORLD))*$-
exclude_airlinesstringExclude comma-separated IATA airline codes or alliances.; exclude_airlines: optional; UTF-8 bytes: 1000; ^(?:[A-Z][A-Z0-9]&#124;[0-9][A-Z]&#124;STAR_ALLIANCE&#124;SKYTEAM&#124;ONEWORLD)(?:,(?:[A-Z][A-Z0-9]&#124;[0-9][A-Z]&#124;STAR_ALLIANCE&#124;SKYTEAM&#124;ONEWORLD))*$-
max_priceintegerMaximum total fare in the requested currency.; max_price: optional; min: 1; max: 21474836471
max_durationintegerMaximum flight duration in minutes.; max_duration: optional; min: 1; max: 21474836471
currencystringThree-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
countrystringTwo-letter country or storefront code, such as us or gb.; country: optional; ^[A-Za-z]{2}$-
languagestringProvider-supported language code, such as en.; language: optional-
limitintegerMaximum number of items to return. The provider may return fewer.; limit: optional; min: 1; max: 10010
devicestringDevice presentation for the source request.; device: optional; desktop, mobile, tabletdesktop
zero_tracebooleanDo not archive source or parsed response artifacts.; zero_trace: optionaltrue

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 supported
  • string: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integer
  • language: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/
  • adults (default 1) + children + infants_in_seat + infants_on_lap <= 9; infants_on_lap <= adults
  • outbound_date, return_date: valid YYYY-MM-DD or ordered YYYY-MM-DD,YYYY-MM-DD window; return dates cannot precede departure dates
  • type = 2 => NOT return_date; flexible return windows require flexible departure windows
  • travel_duration: flexible round-trip duration; cannot combine with exact dates
  • trip_length: positive days or ordered min,max; requires flexible departure dates; query => NOT travel_duration

Examples

bash
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.

json
{
  "success": true,
  "request_id": "example-request",
  "data": {
    "format": "json",
    "content": {
      "results": []
    }
  }
}