API Hop 文件
Google Travel Explore 介面參考
透過 Google Travel Explore 探索旅遊目的地。
並行上限
AI 與 Data 分別共用帳戶層級的並行名額,預設 5 AI / 2 Data,訂閱方案可調整上限。介面個別設定仍受類別總上限約束。達到任一上限回傳 HTTP 429;非同步任務執行結束前占用名額。
GET /v1/google-travel-explore/search 預設並行上限: 2
透過 Google Travel Explore 探索旅遊目的地。
驗證與計費
預設每次成功請求 $0.0003(300 credits)。 使用 API Hop API Key;可用性取決於已啟用閘道與金鑰權限。成功請求價格以目前目錄與帳戶為準,帳戶專屬價格優先。成功的空結果也會計費,失敗會釋放預留額度。逾時為 60 秒,不自動重試或分頁,結算失敗不會重複呼叫上游。
http
Authorization: Bearer YOUR_API_KEYGoogle Travel Explore: 探索旅遊目的地
GET https://api.apihop.ai/v1/google-travel-explore/search
請求參數
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
departure_id | string | 出發機場或城市識別碼 (departure_id); departure_id: REQUIRED; ^(?:[A-Z]{3}|/[mg]/[A-Za-z0-9_]+)(?:,(?:[A-Z]{3}|/[mg]/[A-Za-z0-9_]+))*$ | JFK |
arrival_id | string | 目的地機場、城市或區域識別碼 (arrival_id); arrival_id: optional; UTF-8 bytes: 128; ^(?:[A-Z]{3}|/[mg]/[A-Za-z0-9_]+)$ | - |
arrival_area_id | string | 目的地機場、城市或區域識別碼 (arrival_area_id); arrival_area_id: optional; UTF-8 bytes: 128; ^/[mg]/[A-Za-z0-9_]+$ | - |
travel_mode | integer | 航班或目的地篩選 (travel_mode); travel_mode: optional; min: 0; max: 1 | 0 |
interest | string | 航班或目的地篩選 (interest); interest: optional; 0, /g/11bc58l13w, /m/0b3yr, /m/09cmq, /m/03g3w, /m/071k0 | 0 |
type | integer | 航班或目的地篩選 (type); type: optional; 1, 2 | 1 |
outbound_date | string | 旅行日期(YYYY-MM-DD)或介面支援的日期範圍 (outbound_date); outbound_date: optional; ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ | - |
return_date | string | 旅行日期(YYYY-MM-DD)或介面支援的日期範圍 (return_date); return_date: optional; ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ | - |
month | integer | 旅行時長篩選 (month); month: optional; min: 0; max: 12 | 0 |
travel_duration | integer | 旅行時長篩選 (travel_duration); travel_duration: optional; min: 1; max: 3 | 1 |
travel_class | string | 艙等 (travel_class); travel_class: optional; economy, premium_economy, business, first | economy |
adults | integer | 成人人數 (adults); adults: optional; min: 1; max: 9 | 1 |
children | integer | 兒童人數 (children); children: optional; min: 0; max: 8 | 0 |
infants_in_seat | integer | 嬰兒人數 (infants_in_seat); infants_in_seat: optional; min: 0; max: 8 | 0 |
infants_on_lap | integer | 懷抱嬰兒人數 (infants_on_lap); infants_on_lap: optional; min: 0; max: 8 | 0 |
stops | integer | 航班或目的地篩選 (stops); stops: optional; min: 0; max: 3 | 0 |
include_airlines | string | 航空公司或聯盟篩選 (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_airlines | string | 航空公司或聯盟篩選 (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))*$ | - |
bags | integer | 航班或目的地篩選 (bags); bags: optional; min: 0; max: 9 | 0 |
max_price | integer | 最高價格 (max_price); max_price: optional; min: 1; max: 2147483647 | 1 |
max_duration | integer | 旅行時長篩選 (max_duration); max_duration: optional; min: 1; max: 2147483647 | 1 |
currency | string | 貨幣代碼 (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 |
country | string | 國家或站點代碼 (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | 語言; language: optional | - |
limit | integer | 結果上限; limit: optional; min: 1; max: 100 | 10 |
device | string | 裝置; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | 不封存回應產物; zero_trace: optional | true |
驗證規則
僅接受查詢參數,不接受本文。拒絕未知、重複、空白或無效值。僅支援 JSON 回應,不自動分頁或重試。規則中的 AND 表示同時提供,OR 表示任一,XOR 表示二選一,NOT 表示不得提供,=> 表示需要。
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_seatoutbound_date, return_date: valid YYYY-MM-DD; return_date >= outbound_date; type = 2 => NOT return_date
範例
bash
curl --get "https://api.apihop.ai/v1/google-travel-explore/search" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "departure_id=JFK" \
--data-urlencode "limit=10"回應與錯誤
保留原生 JSON 與數字精確度。以下是空成功結果範例。HTTP 400 輸入無效;401 需驗證;402 餘額不足;403 無權限或未開放;405 方法不支援;429 限流;5xx 服務錯誤。請保留 X-Request-Id。
json
{
"success": true,
"request_id": "example-request",
"data": {
"format": "json",
"content": {
"results": []
}
}
}