API Hop

문서

API Hop 문서

Google Flights API 참조

Google Flights 항공편, 공항 제안 및 항공권 특가를 검색합니다.

동시 실행 한도

AI와 Data는 각각 계정 전체의 동시 실행 슬롯을 공유합니다. 기본값은 AI 5 / Data 2이며 구독에 따라 달라집니다. 엔드포인트별 한도도 카테고리 전체 한도를 초과할 수 없습니다. 어느 한도든 도달하면 HTTP 429를 반환합니다. 비동기 작업은 실행이 끝날 때까지 슬롯을 차지합니다.

GET /v1/google-flights/search
기본 한도: 2
GET /v1/google-flights/autocomplete
기본 한도: 2
GET /v1/google-flights/deals
기본 한도: 2

Google Flights 항공편, 공항 제안 및 항공권 특가를 검색합니다.

인증 및 요금

기본 요금은 성공한 요청당 $0.0003(300 credits)입니다. API Hop API 키를 사용합니다. 접근은 활성 게이트웨이와 권한에 따라 결정됩니다. 성공한 요청 요금은 카탈로그와 계정을 확인하세요. 계정별 요금이 우선하며 성공한 빈 결과도 과금됩니다. 실패하면 예약 금액을 해제합니다. 제한 시간은 60초이며 자동 재시도와 페이지 처리가 없습니다. 정산 오류도 공급자 요청을 반복하지 않습니다.

http
Authorization: Bearer YOUR_API_KEY

Google Flights: 항공편 검색

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

매개변수

필드유형제약예시
departure_idstring출발 공항 또는 도시 식별자 (departure_id); departure_id: optional; ^(?:[A-Z]{3}|/[mg]/[A-Za-z0-9_]+)(?:,(?:[A-Z]{3}|/[mg]/[A-Za-z0-9_]+))*$JFK
arrival_idstring도착 공항, 도시 또는 지역 식별자 (arrival_id); arrival_id: optional; ^(?:[A-Z]{3}|/[mg]/[A-Za-z0-9_]+)(?:,(?:[A-Z]{3}|/[mg]/[A-Za-z0-9_]+))*$LAX
outbound_datestring여행 날짜 (YYYY-MM-DD) 또는 지원 날짜 범위 (outbound_date); outbound_date: optional; ^[0-9]{4}-[0-9]{2}-[0-9]{2}$2026-12-12
return_datestring여행 날짜 (YYYY-MM-DD) 또는 지원 날짜 범위 (return_date); return_date: optional; ^[0-9]{4}-[0-9]{2}-[0-9]{2}$-
adultsinteger성인 수 (adults); adults: optional; min: 1; max: 91
childreninteger어린이 수 (children); children: optional; min: 0; max: 80
infants_in_seatinteger유아 수 (infants_in_seat); infants_in_seat: optional; min: 0; max: 80
infants_on_lapinteger무릎에 앉는 유아 수 (infants_on_lap); infants_on_lap: optional; min: 0; max: 80
travel_classstring좌석 등급 (travel_class); travel_class: optional; economy, premium_economy, business, firsteconomy
sort_bystring정렬; sort_by: optional; top_flights, price, departure_time, arrival_time, duration, emissionstop_flights
stopsinteger항공편 또는 목적지 필터 (stops); stops: optional; min: 0; max: 30
include_airlinesstring항공사 또는 동맹 필터 (include_airlines); 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_airlinesstring항공사 또는 동맹 필터 (exclude_airlines); 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))*$-
bagsinteger항공편 또는 목적지 필터 (bags); bags: optional; min: 0; max: 90
max_priceinteger최고 가격 (max_price); max_price: optional; min: 1; max: 21474836471
outbound_timesstring항공편 또는 목적지 필터 (outbound_times); 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_timesstring항공편 또는 목적지 필터 (return_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}$-
emissionsinteger항공편 또는 목적지 필터 (emissions); emissions: optional; 11
exclude_connsstring항공편 또는 목적지 필터 (exclude_conns); exclude_conns: optional; UTF-8 bytes: 1000; ^[A-Z]{3}(?:,[A-Z]{3})*$-
max_durationinteger여행 기간 필터 (max_duration); max_duration: optional; min: 1; max: 21474836471
show_hiddenboolean항공편 또는 목적지 필터 (show_hidden); show_hidden: optionaltrue
exclude_basicboolean항공편 또는 목적지 필터 (exclude_basic); exclude_basic: optionaltrue
typeinteger항공편 또는 목적지 필터 (type); type: optional; 1, 2, 31
multi_city_jsonstring여정 JSON (multi_city_json); multi_city_json: optional; UTF-8 bytes: 16384-
layover_durationstring여행 기간 필터 (layover_duration); layover_duration: optional; UTF-8 bytes: 21; ^[0-9]{1,10},[0-9]{1,10}$-
selected_flights_jsonstring여정 JSON (selected_flights_json); selected_flights_json: optional; UTF-8 bytes: 16384-
departure_tokenstring최신 응답에서 복사한 선택 토큰 (departure_token); departure_token: optional; UTF-8 bytes: 32768-
booking_tokenstring최신 응답에서 복사한 선택 토큰 (booking_token); booking_token: optional; UTF-8 bytes: 32768-
deep_searchboolean항공편 또는 목적지 필터 (deep_search); deep_search: optionaltrue
currencystring통화 코드 (currency); 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
countrystring국가 또는 스토어 코드 (country); country: optional; ^[A-Za-z]{2}$-
languagestring언어; language: optional-
limitinteger결과 수 제한; limit: optional; min: 1; max: 1001
devicestring기기; device: optional; desktop, mobile, tabletdesktop
zero_traceboolean응답 보관 안 함; zero_trace: optionaltrue

검증

쿼리 매개변수만 허용하며 요청 본문은 사용하지 않습니다. 알 수 없거나 중복된 값, 빈 값, 잘못된 값은 거부됩니다. JSON만 지원하며 자동 페이지 조회나 재시도는 없습니다. 규칙: AND = 모두, OR = 또는, XOR = 하나만, NOT = 제외, => = 필요.

  • 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

예시

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 https://api.apihop.ai/v1/google-flights/autocomplete

매개변수

필드유형제약예시
querystring검색어; query: REQUIREDNew York
countrystring국가 또는 스토어 코드 (country); country: optional; ^[A-Za-z]{2}$-
languagestring언어; language: optional-
limitinteger결과 수 제한; limit: optional; min: 1; max: 1001
devicestring기기; device: optional; desktop, mobile, tabletdesktop
zero_traceboolean응답 보관 안 함; zero_trace: optionaltrue
exclude_regionsboolean항공편 또는 목적지 필터 (exclude_regions); exclude_regions: optionaltrue

검증

쿼리 매개변수만 허용하며 요청 본문은 사용하지 않습니다. 알 수 없거나 중복된 값, 빈 값, 잘못된 값은 거부됩니다. JSON만 지원하며 자동 페이지 조회나 재시도는 없습니다. 규칙: AND = 모두, OR = 또는, XOR = 하나만, NOT = 제외, => = 필요.

  • 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})?$/

예시

bash
curl --get "https://api.apihop.ai/v1/google-flights/autocomplete" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "query=New York"

Google Flights: 항공권 특가 조회

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

매개변수

필드유형제약예시
querystring검색어; query: optionalWeek long trip to a city with great food
departure_idstring출발 공항 또는 도시 식별자 (departure_id); departure_id: REQUIRED; ^(?:[A-Z]{3}&#124;/[mg]/[A-Za-z0-9_]+)(?:,(?:[A-Z]{3}&#124;/[mg]/[A-Za-z0-9_]+))*$JFK
adultsinteger성인 수 (adults); adults: optional; min: 1; max: 91
outbound_datestring여행 날짜 (YYYY-MM-DD) 또는 지원 날짜 범위 (outbound_date); outbound_date: optional; UTF-8 bytes: 21-
return_datestring여행 날짜 (YYYY-MM-DD) 또는 지원 날짜 범위 (return_date); return_date: optional; UTF-8 bytes: 21-
travel_durationinteger여행 기간 필터 (travel_duration); travel_duration: optional; min: 1; max: 31
trip_lengthstring여행 기간 필터 (trip_length); trip_length: optional; UTF-8 bytes: 21; ^[0-9]{1,10}(?:,[0-9]{1,10})?$-
childreninteger어린이 수 (children); children: optional; min: 0; max: 80
infants_in_seatinteger유아 수 (infants_in_seat); infants_in_seat: optional; min: 0; max: 80
infants_on_lapinteger무릎에 앉는 유아 수 (infants_on_lap); infants_on_lap: optional; min: 0; max: 80
travel_classstring좌석 등급 (travel_class); travel_class: optional; economy, premium_economy, business, firsteconomy
typeinteger항공편 또는 목적지 필터 (type); type: optional; 1, 21
stopsinteger항공편 또는 목적지 필터 (stops); stops: optional; min: 0; max: 30
include_airlinesstring항공사 또는 동맹 필터 (include_airlines); 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_airlinesstring항공사 또는 동맹 필터 (exclude_airlines); 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_priceinteger최고 가격 (max_price); max_price: optional; min: 1; max: 21474836471
max_durationinteger여행 기간 필터 (max_duration); max_duration: optional; min: 1; max: 21474836471
currencystring통화 코드 (currency); 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
countrystring국가 또는 스토어 코드 (country); country: optional; ^[A-Za-z]{2}$-
languagestring언어; language: optional-
limitinteger결과 수 제한; limit: optional; min: 1; max: 10010
devicestring기기; device: optional; desktop, mobile, tabletdesktop
zero_traceboolean응답 보관 안 함; zero_trace: optionaltrue

검증

쿼리 매개변수만 허용하며 요청 본문은 사용하지 않습니다. 알 수 없거나 중복된 값, 빈 값, 잘못된 값은 거부됩니다. JSON만 지원하며 자동 페이지 조회나 재시도는 없습니다. 규칙: AND = 모두, OR = 또는, XOR = 하나만, NOT = 제외, => = 필요.

  • 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

예시

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"

응답 및 오류

원본 JSON과 숫자 정밀도를 유지합니다. 예시는 성공한 빈 결과입니다. HTTP 400: 입력; 401: 인증; 402: 잔액; 403: 접근; 405: 메서드; 429: 제한; 5xx: 서비스. X-Request-Id를 보관하세요.

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