API Hop

दस्तावेज़

API Hop दस्तावेज़

Google Flights संदर्भ

Google Flights पर उड़ानें, हवाई अड्डे के सुझाव और उड़ान ऑफ़र खोजें।

समवर्ती अनुरोध सीमा

AI और Data के लिए खाते में अलग-अलग साझा समवर्ती स्लॉट हैं: डिफ़ॉल्ट रूप से 5 AI / 2 Data, जो सदस्यता के अनुसार बदलते हैं। endpoint की अलग सीमा भी श्रेणी की कुल सीमा के अधीन रहती है। किसी भी सीमा पर पहुँचने पर 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प्रस्थान हवाई अड्डे या शहर की ID (departure_id); departure_id: optional; ^(?:[A-Z]{3}|/[mg]/[A-Za-z0-9_]+)(?:,(?:[A-Z]{3}|/[mg]/[A-Za-z0-9_]+))*$JFK
arrival_idstringगंतव्य हवाई अड्डे, शहर या क्षेत्र की ID (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प्रस्थान हवाई अड्डे या शहर की ID (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": []
    }
  }
}